[aklug] Re: Rsync file updating

From: Jason McEachen <jason@brightshinyobject.com>
Date: Sun Dec 05 2010 - 00:37:15 AKST

Hey Christoper,

Rsync is one of my favorite tools. I use it all the time to make huge
arrays of rolling backups, because I'm a data-whore.

The answer to your question is: receiver deletes before transfer
(default) (from http://www.samba.org/ftp/rsync/rsync.html --delete-before )

BUT there are four different command line directives you can specify
--delete-before receiver deletes before transfer (default)
--delete-during receiver deletes during xfer, not before
--delete-delay find deletions during, delete after
--delete-after receiver deletes after transfer, not before
IF you want to take more control and choose when rsync cleans out the old.

Personally I'm a fan of "--delete-after," but use whatever fits your need,

--Jason

On 12/05/2010 12:11 AM, Christopher Howard wrote:
> Question about rsync: say you are syncing local directory "localdir" to remotedir "remotedir". If a file in localdir is changed, but not deleted or moved, does rsync /delete/ the corresponding file in remotedir and /recreate/ it? (And, hence, create a new file with a new inode...) Or does it just /truncate/ the corresponding remote file and give it new data?
>
> Reason I ask: I created my own "poor man's" incremental-snapshot backup solution, using rsync, hard-links, and shifting directories, similiar to what is described here:
>
> http://www.mikerubel.org/computers/rsync_snapshots/
>
> So far, it seems to be working. But for it to work, it would seem as though rsync must always create new files (rather than edit old ones), or the hard links in the older "snapshots" would get updated as well. Am I making sense?
>
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sun Dec 5 00:37:44 2010

This archive was generated by hypermail 2.1.8 : Sun Dec 05 2010 - 00:37:44 AKST