few questions on rsync

Matt McCutchen matt at mattmccutchen.net
Tue Jun 22 23:56:25 MDT 2010

On Tue, 2010-06-22 at 13:59 +0200, Igor Lautar wrote:
> Different filesystems:
> Lets say I want to keep all extended attributes and everything else,
> so I use -A, -X, --perms etc., together with --fake-super.
> Now, lets say source FS supports some attributes not supported on
> target FS (for example, XFS extended attributes). Would this work as
> expected (ie. extended attributes are kept on target somehow)?

The target filesystem must support extended attributes using one of the
APIs that rsync understands, because that's where --fake-super stores
its data.

> Reversing --backup logic:
> Currently, if --backup is used (and --backup-dir), a copy of existing
> file that is replaced on rsync will be placed there. Is there a way to
> keep original copy (ie. base) the same, but just place whatever has
> changed to a different location? Taking "backup to a central backup
> server with 7 day incremental" example on rsync page, but reverse the
> logic. Instead of current, you have 'initial' and then each
> incremental only contains changed files from 'initial' (basically,
> each incremental would then be differential, but thats besides the
> point).

You can do that with --compare-dest, but you might prefer a hard-linked
backup series with --link-dest.

> delta-xfer algorithm:
> Does delta-xfer detect change in following case:
> lets say file contains data like "<data>", and is rsynced. Before next
> rsync, file data changes to "<prefix><data>", where <prefix> is some
> stream of bytes. Will rsync trasfer only <prefix> data (and detect
> content has just moved in a file) or will whole file be transfered?

The delta-transfer algorithm will handle that properly.

> Saving delta-transmition stream:
> Is it possible to save delta-transmition stream (or whatever rsync is
> sending) as intermediate result? For example, save this stream, and
> feed it later to another rsync that then applies it to base?

See --{write,read}-batch .


More information about the rsync mailing list