|
From: | Todd Brunhoff |
Subject: | [Bug-tar] gnu tar incremental backup saves unchanged directories |
Date: | Sat, 24 Sep 2016 11:21:47 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
While writing yet another backup script using tar
--listed-incremental, I found that there was no option to prevent
archiving directories that had no changes. I see this as a problem
because when doing an incremental backup of a system with 10's of
thousands of directories, yet where only a few files have changed,
all of the directories are archived. This makes for a huge
incremental backup which is excessive and makes it difficult to
identify what actually changed. I did try some related options such as --newer-mtime=date and --atime-preserve={system,replace,}, but without success: all directories were always archived. Eventually I settled on an external solution which really ought to be in tar. And that is to use --files-from=- and feed it with something like find <path> -newermt <date>. I should note a related irritation. If the find found no files, tar would archive everything in the current directory. I understand that tar takes targets from the command line and, optionally from the --files-from argument, but there is no way to say to take files only from the --files-from argument. Thanks, Todd |
[Prev in Thread] | Current Thread | [Next in Thread] |