pruning old files
tim.conway at philips.com
tim.conway at philips.com
Tue Oct 22 16:13:50 EST 2002
Actually, what I do also propogates deletions. Since someone may unpack a
tar containing files with earlier mtimes than a marker file, a simple
--newer won't do it for us, either. Instead, I generate a list of all
items, consisting of name and type, to which i append number of links,
size, and mtime for files; link destination for symlinks; and for
directories, fifos, chars, blocks, doors, etc., leave it at name and type.
These sorted lists are then diffed. anything on the source not on the
destination or is different source to destination, is sent across tar,
using the --files-from= option so often requested for rsync. anything on
the destination not on the source is deleted. Obviously, a changed device
won't get caught up, and a file changed without altering size or mtime
won't get updated. For our purposes and on our platform (the
nearly-worthless Maxtor Maxattach), calculating checksums is out of the
question. If we start getting odd behaviour, we can always checksum the
affected portion of the filesystem.
conway.tim at sphlihp.com reorder name and reverse domain
303.682.4917 office, 303.921.0301 cell
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, caesupport2 on AIM
"There are some who call me.... Tim?"
jw schultz <jw at pegasys.ws>
Sent by: rsync-admin at lists.samba.org
10/22/2002 01:01 AM
To: rsync at lists.samba.org
cc: (bcc: Tim Conway/LMT/SC/PHILIPS)
Subject: Re: pruning old files
On Tue, Oct 22, 2002 at 08:34:42AM +0200, Michael Salmon wrote:
> On Tuesday, October 22, 2002 09:46:36 AM +0900 Shinichi Maruyama
> <marya at st.jip.co.jp> wrote:
> | jw> In the past i found that using find was quite good for this.
> | jw> Use touch to create a file with a mod_time just before you
> | jw> started the last sync. Then from inside $src run
> | jw> find . -newer $touchfile -print|cpio -pdm $dest
> | For pruning, how about to add the feature to rsync.
> | Is it difficult ?
> | --exclude-older=SECONDs
> | exclude files older than SECONDs before
> | --ignore-older=SECONDs
> | ignore any operations with the files
> | SECONDs before
> | differ from --exclude-olders, these files
> | affected from --include files or
> Wouldn't a better solution be to add a file list option, similar to
> to rsync? That would also satisfy those who want complex include and
> exclude rules. Probably 2 options are required, one for newline
> names and the other for null terminated names.
A file list option would help for some things. Not for this
particular case. The filelist is too big for rsync to
handle but cpio doesn't have the memory footprint problems.
In this particular case the rsync algorythm doesn't buy him
anything, in fact it actually hurts performance because both
source and destination are mounted via NFS. The only
advantage rsync would in this situation of local sync of nfs
mounts is that it will recognize and propogate file
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
To unsubscribe or change options:
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
More information about the rsync