A Linux backup system based on rsync
, cron
.
rsync -aAXv --delete \
--exclude-from rsync-excludes.txt \
--exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} \
/ /mnt/external-drive/$(date +%Y%m%d)
Add the following lines to your /etc/crontab
file:
00 12 * * * rsync -aAXv --delete --exclude-from rsync-excludes.txt --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /mnt/external-drive/daily
00 12 * * 5 rsync -aAXv --delete --exclude-from rsync-excludes.txt --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /mnt/external-drive/weekly
00 12 1 * * rsync -aAXv --delete --exclude-from rsync-excludes.txt --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /mnt/external-drive/monthly