Home Backups

I just setup some bash scripts leveraging rsync and triggered via cron to not only keep my external hard-drives backed up to their relative backups, but also to keep my wife’s laptop (MacBook) backed up to an external drive attached to my desktop (PowerMac).

/usr/bin/backup:
#!/bin/bash
rsync /Users/emma/ -avz -e ssh '[email protected]:/Volumes/MBP\ Backup/tongari/Users/emma/'
rsync /Applications/ -avz -e ssh '[email protected]:/Volumes/MBP\ Backup/tongari/Applications/'

/etc/crontab
# minute hour mday month wday who command
30 5 * * * emma /bin/bash /usr/bin/backup

And with ssh keys setup correctly, it should just work.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

PHP Code Snippets Powered By : XYZScripts.com