On Wed, 15 Jan 2003, Colin Humphreys wrote:

> On Wed, Jan 15, 2003 at 05:10:16PM +1100, Matthew Dalton wrote:
> > You could use tar's 'only store files newer than DATE' option (-N) to do
> > this. See the tar manpage for details.
>
> That will probably do for now. (and so easy too) Note that it doesn't quite do what 
>I want
> in that deleted files on the source system will not be deleted on the
> remote system.

You're also quite dependent on file dates.  If for example someone uploads
a file from another machine and it retains its last-modified date from the
machine it was transferred from, then that file may not be picked up by
tar, so your target system won't receive it.

If you wind up rolling your own system with md5 sums, 'L5' might be a
useful component.  It's available from the COAST security archive.


        ftp://coast.cs.purdue.edu/pub/tools/unix/sysutils/l5/L5.tgz

        Abstract:
        L5 simply walks down Unix or DOS filesystems, sort of like "ls -R"
        or "find" would, generating listings of anything it finds there.
        It tells you everything it can about a file's status, and adds on
        the MD5 hash of it.  Its output is rather "numeric", but it is a
        very simple format and is designed to be post-treated by scripts
        that call L5.

If you run L5 on each system, then a `diff` of the output listings should
give you a complete listing of what files need to be transferred, deleted
or updated.

Andrew

------------------------------------------------------------------
Andrew McNaughton                   In Sydney and looking for work
[EMAIL PROTECTED]          http://staff.scoop.co.nz/andrew/cv.doc
Mobile: +61 422 753 792



-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to