Linux Lite Forums

Full Version: Cron job to automate backup????
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Well fellas.....I tried a few more options from the links you provided, but still had no luck running grsync. It appears the GUI for rsync is fussy about starting from cron or scheduler.


So, I decided to grab the rsync command that grsync was sending and dropped that direct into scheduler......that seemed to work fine. Then I copied that command into my backup.sh script and ran the shell script from scheduler.....that worked fine too. I even setup rsync to send a log file of the backup, so I can see that everything went fine.


Thanks for the help......
glad you sorted it... GL
(12-15-2015, 05:24 PM)Wirezfree link Wrote: [ -> ]glad you sorted it... GL

Ditto  ;D 8)
Hi,

You need to set EDITOR environment variable to some text editor.
I use nano here, you may use emacs, vi or anything really
For example:

shell >  export EDITOR=nano
shell >  crontab -e

## Insert or append a line like:
# min hour day_of_the_month  month  day_of_the_week  command
# So 5 past midnight of every Tuesday do...

5 0 * * 2  tar -cf  ~/back.tar  ~/Documents && mv ~/back.tar  /where-ever  2>&1 > /dev/null

# Save settings = CTRL+O
# exit = CTRL+X

Pages: 1 2