Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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:
- -duplicate the contents of dir A into dir B
- -duplicate the contents of dir C into dir D
- -do this every monday at midnight (as in 00:00:59 Monday)
- I'm under the understanding I need to write a script, so:
- #!/bin/sh
- # Monday Data Backup
- sudo rsync -avucz --update --progress --human-readable /media/osstorage/ /media/osbunker/ && sudo rsync -avucz --update --progress --human-readable /media/storage/ /media/bunker/
- 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"
- next, I'd have to add the following to "sudo crontab -e"
- 0 0 * * Mon /home/backup/script/mon_sync_cron.sh
- Is this all correct?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement