Advertisement
cribbageSTARSHIP

Untitled

Apr 25th, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. I am running x32 ubuntu 14.04 headless server. My wish is to do two different auto backups every monday at midnight. I just want to make sure I am making the correct steps, and not screwing my machine up at the same time. My goal is to:
  2. -duplicate the contents of dir A into dir B
  3. -duplicate the contents of dir C into dir D
  4. -do this every monday at midnight (as in 00:00:59 Monday)
  5.  
  6. I'm under the understanding I need to write a script, so:
  7. #!/bin/sh
  8. # Monday Data Backup
  9. sudo rsync -avucz --update --progress --human-readable /media/osstorage/ /media/osbunker/ && sudo rsync -avucz --update --progress --human-readable /media/storage/ /media/bunker/
  10.  
  11. I'd then save that script as "mon_sync_cron", and place it in /home/backup/script. This would be followed by "sudo chmod +x /home/backup/script/mon_sync_cron.sh"
  12.  
  13. next, I'd have to add the following to "sudo crontab -e"
  14. 0 0 * * Mon /home/backup/script/mon_sync_cron.sh
  15.  
  16.  
  17. Is this all correct?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement