3

Tip #740   Incremental backup with tar

The tar command can be used to make a quick incremental backup as follows:

tar -Pvuf backup.tar /home/user/username

This will backup the directory /home/user/username. If any changes are made to the files in this directory and the above command is run again, the files will be added/changed in the tar file. Deleted files are not removed from the archive.

An alternative method is to use find to get a list of files newer than the backup and add these to the tar using the '-r' (append) option.

find /home/user/username ! -type d -newer backup.tar -exec tar -rvf backup.tar {} \;