Re: --backup leaves window where file doesn't exist.

This is a discussion on Re: --backup leaves window where file doesn't exist. within the Rsync forums, part of the Networking and Network Related category; On Thu, Sep 15, 2005 at 10:38:04AM -0400, Dave Mielke wrote: > The only change, therefore, should be ...


Go Back   Usenet Forums > Networking and Network Related > Rsync

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-15-2005
Wayne Davison
 
Posts: n/a
Default Re: --backup leaves window where file doesn't exist.

On Thu, Sep 15, 2005 at 10:38:04AM -0400, Dave Mielke wrote:
> The only change, therefore, should be to replace the first rename()
> with link(). Since both yield EXDEV, I doubt any more complex change
> is necessary.


It's more complex than that. If the temp file is not in a position
where it can be renamed into place, it is copied into place, which would
overwrite the backup without additional logic to ensure that the
newly-hard-linked destination file was removed first. Also, the backup
calls are used for both backing up deleted files and updated files, so
the code would also need to be changed to have the delete callers remove
the destination file (as it does in the non-backup-calling case).
Finally, the code would need to handle systems where hard links don't
work by continuing to call rename() (since it is more efficient than
forcing all backups to be done with a file copy). (At least, that's all
the side-effects I can think of off the top of my head.)

...wayne..
--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:37 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0