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.


Added a solution, see below.

1 Answer 1


Through trial and error, reading this other question, and reading the man pages on rsync I was able to get it to work. I'll post a proper solution when stackexchange.com allows me to. For now here's what I did:

  1. Used a different external USB drive that is formatted at ext4, so that file permissions and extended attributes will be copied.
  2. Used the following command:

rsync -rtDHh --checksum --links -A -X -pEgo --info=progress2 --no-i-r --delete --delete-excluded -v --chmod=Du+wx --exclude="/root/.local/share/backintime" --exclude=".local/share/backintime/mnt" --exclude=".gvfs" --exclude=".cache/*" --exclude=".thumbnails*" --exclude="[Tt]rash*" --exclude="*.backup*" --exclude="*~" --exclude=".dropbox*" --exclude="/proc/*" --exclude="/sys/*" --exclude="/dev/*" --exclude="/run/*" --exclude="/etc/mtab" --exclude="/var/cache/apt/archives/*.deb" --exclude="lost+found/*" --exclude="/tmp/*" --exclude="/var/tmp/*" --exclude="/var/backups/*" --exclude=".Private" --exclude="/opt" --exclude="/home" --exclude="/media" --include="/" --include="/**" --exclude="*" / "/media/username/USB/full-system-backup/"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .