I have compiled and installed Back In Time to perform automated, full, system backups of my desktop computer running Debian Stretch (kernel 4.90.0-8-amd64). Back In Time uses rsync
under the hood. When I run a full system backup after clicking the button Modify for Full System Backup
it throws a few errors about symlinks and other files it has problems copying.
I decided to figure out the exact options required to pass to rysnc
, so that I can have greater control over how Back In Time performs the backup. I would like to backup everything on my drive except for:
- /home/*
- /opt/*
- /media/*
- any other system files that should not be included in the backup
Here is the command I think I need to run, but I'm not sure if I have it completely correct. Can you see any problems with my proposed rsync
command?
rsync -rptgoEAXl --safe-links --inplace -F --exclude /opt/* --exclude /home/* --exclude /media/* --exclude /tmp/* --exclude /var/tmp/* --exclude /var/backups/* --exclude /etc/mtab --exclude /proc/* --exclude /run/* --exclude *~ --exclude [Tt]rash* --exclude /dev/* --exclude lost+found/* --exclude .Private / /media/username/USB/my_backup_folder
Note: I have read this question, but it does not suite my needs because it uses dd
and not rsync
.
P.S.: my backup drive is an external USB disk, and is formatted as exfat
on a gpt
partition. I'll be re-doing my backup drive later to use ext4
on a gpt
partition, but I can not do that until I get this backup in taken care of. Kind of a catch 22.
UPDATE
Added a solution, see below.