--link-dest --inplace updates files without unlinking. What to do?

Kevin Korb kmk at sanitarium.net
Fri Dec 26 15:47:05 MST 2014


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

Yes, but there are issues to keep in mind...

Normally --link-dest is used to keep previous copies (to make a backup
system) and the target directory is always empty.  In this mode
- --inplace and --append-verify would be irrelevant since rsync will
always be either making a link or writing an entire new file.

However, if you have an unstable link you might be using the same
target directory until it completes.  In this case --inplace and/or
- --append-verify would matter on files that already exist in the target
but are different than the source.

If you are doing the latter there is a huge gotcha you need to be
aware of...

When using --link-dest and the target directory is not empty then
rsync can "update" links within the target.  This means that if you
have a partially completed target and you run rsync again against it
it will complete the directory but if a file that has already been
linked into the directory has a metadata change that change will be
propagated to all instances of that file rather than making a new one
with the new metadata.

I want my metadata to be correct on each backup so if one of my
- --link-dest backups fails for some reason I delete the entire target
and start over using the same link-dest and a new empty target.

On 12/26/2014 08:24 AM, Askar Safin wrote:
>> - --inplace and --append-verify are essentially irrelevant when -
>> --link-dest is in play.  With --link-dest in play the target
>> system must write an entirely new file even for a change in
>> permissions or timestamps so any potential benefit by these
>> options are out the window from the start.  The only thing they
>> can do is add the possibility of incomplete or corrupt copies on
>> the target.
> Okey, so, I should remove --inplace and --append-verify? But then
> copying large file over unstable inet will not work, right? Is
> there any way to keep --link-dest working right and simultaneously
> have possibility to copy large file over unstable inet? == Askar
> Safin http://vk.com/safinaskar Kazan, Russia
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	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

iEYEARECAAYFAlSd5WkACgkQVKC1jlbQAQfLTACeOjwhbl+aniJnYzseAltzI5tY
Nt4AnRVEtCkQVmNWr/16uc/7MsGJa/Oq
=92vx
-----END PGP SIGNATURE-----


More information about the rsync mailing list