I have created a large tar archive and am now looking to do an incremental backup. The documentation indicates that a snapshot file can only be created when the initial tar backup file is created.

Is it possible to list the contents of an existing tar archive to create a file in the snapshot file format?

Is there enough detail in the original tar archive to allow an incremental backup to work correctly? (assuming some info such as inode numbers are fudged)

  • GNU tar is known to be unable to do incremental restores. Do you really like to make your backups to rely on this program?
    – schily
    Commented Jun 28, 2018 at 8:40

1 Answer 1


It depends on the amount of fudging you're willing to do.

Let's use format 1 for a moment. It's a list only of the directories in the tarball.

The fields relevant to each entry in the list tarball are: mtime(seconds+nsecs), device, inode.

In later incremental passes, if the device/inode fields no longer match, or if the mtime has moved backwards, ALL the files in the directory will be added to the incremental tarball. If the device/inode match, and mtime is the same or greater, it will pick up all new files greater than or equal to the mtime (The equal-to part matters for filesystems with low mtime resolution, otherwise files might be skipped).

Format 2 extended this via the Dumpdir format, which complicates it, mostly adding cases where files aren't backed up as they came with an older mtime.

So, given a tarball, is it possible to recreate a snapshot file? Yes, but it's messy, and you'll probably miss some files. There is --no-check-device which skips the device check, but the directory inodes are the big risk.

You must log in to answer this question.

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