[PATCH][RFC] space saving incrementals
jw schultz
jw at pegasys.ws
Sat Mar 9 10:05:14 EST 2002
On Fri, Mar 08, 2002 at 03:45:04PM -0600, Dave Dykstra wrote:
> I like link-dest, and the "-" for exclude-from/include-from was already
> something I was planning to add one of these days along with the
> --files-from option I still plan to write, but --compare-perms confuses
> me. Can you give examples of when you need it?
>
> - Dave Dykstra
sequence of commands:
admin# rsync /project /vault/monday
admin# chmod 666 /project/somefile
admin# chown bin /project/someotherfile
admin# rsync --link-dest=/vault/monday /project /vault/tuesday
Now /vault/monday/somefile has perms of 666 and
someotherfile is owned by bin. I cannot restore the perms
from /vault/monday. That info is lost. /vault/monday no
longer is an accurate representative of what existed when it
was created.
With --compare-perms somefile and someotherfile will not be
linked between monday and tuesday even though the contents
haven't changed.
compare-perms only makes sense when you are using link-dest.
>
> On Thu, Mar 07, 2002 at 01:25:50PM -0800, jw schultz wrote:
> > Please CC me directly as i'm not on the list.
> >
> > I have attached a patch against latest CVS (cvs diff -u)
> > that adds the following functionality. I can break it up if
> > you would prefer it in pieces. Comments welcome.
> >
> > o add compare-perms option
> > This creates a new inode for a file even if only
> > the perms have changed. This way if a file
> > outside of destdir is hardlinked to a dentry
> > inside destdir the permissions (uid, gid,
> > mode) will be untouched preserving history
> > etc.
> >
> > o link-dest option
> > After setting compare_dest this causes
> > unchanged files in destdir to be hardlinked
> > to link-dest.
> >
> > o modified make_exclude_list to support stdin
> > if --exclude-from has argument of "-"
> > stdin will be read.
> > This lets us pipe a include/exclude list
> > into rsync so that we can generate it on the
> > fly.
> >
> > The upshot of these is to allow rsync to make incremental
> > backups without modifying earlier versions but keep every
> > version as a complete tree. It then becomes possible to
> > make tapes or restore from any image.
> >
> > Although --compare-perms saves on block count this patch
> > only applies it to regular files so symlinks and device
> > nodes will still chew up inodes. :(
> >
> > for the sake of an example here is the command line i'm using:
> > /site/bin/rsync -v --stats -a -H -e ssh --compare-perms
> > --delete --delete-excluded --numeric-ids --exclude-from -
> > --link-dest /e/backup1/home/update1/tree leto:/efs/home/
> > /e/backup1/home/update2/tree > /e/backup1/home/update2/log
> >
> > i have tried to keep my changes small and consistent with the
> > existing coding style. Feel free to dink with it. I only
> > care about the performance.
> >
> >
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync
mailing list