Quote:
Originally Posted by Fixit7
I take it that they backup just the current partition.
|
yes, whereas the OS is in /dev/sdxY = "/" and "/home" is in /dev/sdxZ although I don't call the partition in rsync, just the directories. It is fast and the first one is written for doing incremental backups of / partition however, it needs some tweaking as mine tends to grow much larger than I expected when doing incremental backups. That script is for the initial backup of "/". The script for incremental backups to the initial backup is (assuming the backup is mounted in /mnt):
Code:
rsync -aAXhv --exclude={/dev/*,/home/*,/media/*,/mnt/*,/proc/*,/run/*,/sys/*,/tmp/*,/lost+found} --link-dest=/mnt/path/to/backup/YYYY-MM-DD /* /mnt/path/to/backup/$(date -I)
The backup will be a backup of "/" minus the stuff excluded, it will create a /home folder that will be empty. As mentioned, I rsync backup home usually first the whole enchilada, then individual directories of interest thereafter by modifying the paths from/to the correct backup directories. Rsync works over WAN and LAN too but I haven't done that (no experience or need to). These scripts if there is a file in the backup that no longer exists or has changed in any way, it will get deleted and the changed file will be written to the backup. Rsync is very good at it, a simple text file with a character or two changed in it but retaining the same file name will get deleted on the backup and replaced with the changed file. I use it a lot with home directory and excellent if VBox stuff crashes rather than running VBox snapshots, just rsync the backup vdi back to the /home/~/VirtualBox \VMs/ directory and good to go