kmk at sanitarium.net
Mon Mar 12 18:54:56 MDT 2012
-----BEGIN PGP SIGNED MESSAGE-----
While a file is being updated it is stored as a temporary name
(.filename.string). When the file is complete the old version is
deleted and the temp file is renamed into place. If rsync aborts
during this process the temp file is deleted to ensure that bogus
files are not left laying around.
There are options that change this...
- --partial tells rsync to not delete the temp file. This can be useful
as the transfer can likely be resumed later.
- --inplace tells rsync to skip the temp file process and just write to
the file directly. --inplace implies --partial but if you abort in
the middle you will have part old version and part new version. The
benefit is in saving the disk IO and space required to write out an
entire new file.
On 03/12/12 20:35, Jack Tavares wrote:
> I am trying to figure out what happens in the following scenario:
> I use rsync to copy files from hostA:/dir1 to hostB:/dir1 with the
> command (from hostB)
> rsync -abvt --delete-after --suffix=~ hostA:/dir1 /dir1
> So if fileA exists already on both boxes (it has previously been
> rsynce-d) and
> fileA changes on hostA. rsync starts from hostB, fileA starts
> If the transfer aborts before it is complete (due to a network
> failure) what happens?
> In a successful transfer dir1 on hostB will have fileA fileA~
> But if the transfer aborts midway will the results be
> fileA <<- partial results fileA~ <<- original file
> Or will it recover intelligently and the results will be fileA <<-
> original file with no changes
> I have looked in the man page and FAQs and I have not found a
> definitive answer to this question. If it is documented somewhere,
> a pointer to the documentation would be much appreciated.
> Thank you
> -- Jack Tavares
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/
-----END PGP SIGNATURE-----
More information about the rsync