Results 1 to 6 of 6

Thread: Offline Backup

  1. #1
    Join Date
    Sep 2004
    Posts
    12

    Unanswered: Offline Backup

    DB2 8.1 fixpack 4
    CM 8.2 fixpack 2
    Solaris 8

    I started running an offline backup on Sundays at 2030hrs.......nobody is using the system at that time. While I'm actually getting the backup to work, I AM getting an error when trying to stop and start the Library Service monitor. I run a cronjob as root when doing this.

    /etc/rc.cmlsproc[54]: whoami: not found
    /etc/rc.cmlsproc: ERROR!!! Only root or icmadmin can execute this "-shutdown" option

    /etc/rc.cmlsproc[54]: whoami: not found
    /etc/rc.cmlsproc: ERROR!!! Only root or icmadmin can launch the CM monitor daemon!

    Here is the script:

    echo "Starting db2 backup script at: "`date`

    /opt/WebSphere/AppServer/bin/stopServer.sh eClient_Server;
    /opt/WebSphere/AppServer/bin/stopServer.sh icmrm;

    su - icmadmin -c "/etc/rc.cmlsproc -shutdown"
    su - db2inst1 -c "db2stop force"
    su - db2inst1 -c "db2start"

    su - db2inst1 -c "db2 backup database icmpcodb to /icm/dbbackup/offline"
    su - db2inst1 -c "db2 backup database rmpcodb1 to /icm/dbbackup/offline"

    su - icmadmin -c "/etc/rc.cmlsproc"
    /opt/WebSphere/AppServer/bin/startServer.sh icmrm;
    /opt/WebSphere/AppServer/bin/startServer.sh eClient_Server;


    echo "Done with db2 backup script at: "`date`
    echo "********************************************* *"


    Any help would be greatly appreciated.


    Ted

  2. #2
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186
    WHy not just to a force applications all before you start the back and wait about 30 seconds to see if you can do it. The other option is to revoke all access to the database except for your id that runs the backup then force application all then backup, You might also want to look at the quisce command and see if that will work for you.


    Your error looks like a permission problem, make sure the profile that the user uses to log in is being called in the script


    Do a seach on backups in this section and you'll see lots of suggestions.

    hope this helps
    David Quigley

  3. #3
    Join Date
    Sep 2004
    Posts
    12
    Quote Originally Posted by quigleyd
    Your error looks like a permission problem, make sure the profile that the user uses to log in is being called in the script.

    hope this helps
    Thanks for the reply David:

    The user in this case is root running one of it's own cron jobs. I'm confused as to why root wouldn't be able to run ANY script w/o the error. It even says you have to be root or icmadmin. I will look through the other posts to see if I can glean anything.

    Ted

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by ted_smith
    I will look through the other posts to see if I can glean anything.
    I would first look at this line here:
    /etc/rc.cmlsproc[54]: whoami: not found
    whoami is not installed on your system, or it's not in the path, so /etc/rc.cmlsproc is failing.

  5. #5
    Join Date
    Mar 2004
    Posts
    448
    What I am seeing ..

    You become that user... not root.

    su - icmadmin -c "/etc/rc.cmlsproc -shutdown"

    For icmadmin user, is that user has whoami in its path to verify its identity,
    check the script by running at the
    command prompt.

    regards

    Mujeeb

  6. #6
    Join Date
    Sep 2004
    Posts
    12
    Thanks for the help you guys.

    whoami is a /usr/ucb command and wasn't in /etc/profile. I opted to put it at the end instead of doing it by user.

    From the Admin Guide:

    The examples in this book are for a basic SunOS software installation without the
    Binary Compatibility Package installed and without /usr/ucb in the path.


    Caution - If /usr/ucb is included in a search path, it should always be at the end
    of the search path. Commands like ps or df are duplicated in /usr/ucb with
    different formats and options from the SunOS commands.


    Problem fixed............

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •