With rsync --link-dest, is it possible to determine which files are new?

Kevin Korb kmk at sanitarium.net
Sat Oct 22 10:07:33 MDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, if a file is a different inode it will be reported by my script
even if that is the only difference.  If the inode number is different
then the file is in fact different and takes up additional disk space.
If that is the only thing that is different you might be using rsync
incorrectly.  This is also why I use md5sum to check files that have
different inode numbers but the same mtime and file size.

On 10/22/11 10:12, Andrew Gideon wrote:
> On Fri, 21 Oct 2011 12:10:09 -0400, Kevin Korb wrote:
> 
>> If you want something you can run after the fact here is a tool I wrote
>> a while back that does a sort of diff across 2 --link-dest based
>> backups:
>> http://sanitarium.net/unix_stuff/rspaghetti_backup/diff_backup.pl.txt It
>> will also tell you what files were not included in the newer backup
>> which --itemize-changes will not since it doesn't actually --delete
>> anything.
> 
> I like how comprehensive this is, but wouldn't it - by definition of what 
> it means to have a new file in the new directory tree - always report a 
> modified file as having a different inode?
> 
> That takes me a "quick and dirty" solution for this.  Simply do a find 
> looking for files with a -links (link count) of 1 to see what files are 
> newly copied in the newer directory tree.
> 
> 	- Andrew

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6i6kUACgkQVKC1jlbQAQfmXACglTh5+UXDdTSFEDZlmWnauUSh
3NEAni0s5XDg0ntixrdNWy+7nogIW9+r
=/7b8
-----END PGP SIGNATURE-----


More information about the rsync mailing list