1

I understand that the mechanics are slightly different, in that --newer allows you to choose an arbitrary cutoff date, whereas --listed-incremental always looks at changes since the last use of the snapshot file.

But typically I'm interested in archiving changed files since the date of the last backup, and in this scenario I can't see what the difference between the two options is.

I am particularly wondering why the GNU tar manual recommends use of --listed-incremental instead of --newer in an incremental backup scenario.

  • Since incremental restores using gnu tar do not work, it is not recommended to use incemental backups with GNU tar at all. The related bug was reported in September 2004, 2011, 2016 and 2018 to no avail. – schily Jun 27 '18 at 21:08
0

With --listed-incremental you're creating a GNU Incremental backup which uses a file to keep track of changes : read more here.

With --newer you're simply updating/creating the archive with the files that have changed since the date you pass it.

  • Yes, I've read that page, and I understand the description as you have stated it. Perhaps I'm just being dim, but I don't get how one is different from the other, or better. – jl6 Sep 2 '16 at 21:53
0

The main difference is the handling of backup levels. --listed-incremental keeps a state file containing the timestamp of the full backup an the files (and their time-offset) changed since then. On a restore you are capable of switching back to the exact state of the desired level (=date of snapshot). That means files not existed at this time are deleted, changed files get their state of the corresponding level. The restore operation needs also the --listed-incremental option, but with value /dev/null (or just --incremental) which has to be called multiple times in the order the backups has been formerly created.

With backup archives based only on --newer it's not easy to step back to the exact state for a desired time, because a successive restore of these archives (from oldest to newest) accumulates (merges) all files ever changed. There is no information when a file was gone in the meantime.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.