Results 1 to 9 of 9

Thread: Backup Script trouble

Threaded View

  1. #1
    Join Date
    Apr 2009
    Costa Rica
    Ubuntu 10.04 Lucid Lynx

    Backup Script trouble

    Hi all,

    I wrote a very small and simple script to stop a service, backup a folder, copy it to a remote location via scp and then start the service again.

    Everything works except for one thing, the service does not want to start for some reason, I have to manually ssh into the server and execute the comand to start it.

    Here is the script, like I said, nothing fancy:

    FILE=openbravo$(date +"%d-%m-%y").tar.gz
    /etc/init.d/openbravo stop
    cd /opt
    tar cvzf $FILE OpenbravoERP-3.0
    scp $FILE
    /etc/init.d/openbravo start
    If I input the last command on the command line it works no problem, its only when the scheduled job runs that I run into this issue.

    I have also tried putting the scp command at the end to see if it made any difference, but same problem.

    How can I debug this?

    thanks a lot for the help!

    ps: I checked the scp command above and its completing succesfully (I can see the file on the remote location).
    Last edited by X1R1; October 12th, 2012 at 08:01 PM.
    Linux User#498977
    There are only 10 types of people in the world. Those who understand binary, and those who dont.
    My Blog about Linux and other stuff


Posting Permissions

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