Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2006 00:14:41 +0200
From:      Erik Norgaard <>
To:        Paul Schmehl <>
Subject:   Re: Sync files locally?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Paul Schmehl wrote:
> What's the best way to sync files locally?
> I'm running rsync over ssh to backup files from a server.  Now I'm setting 
> up a new server, so I rsynced to it as well.  The files end up in a subdir 
> of my home directory, because my account is being used for the rsync.  I've 
> been using cp -R to put them in the right place on the server and the chmod 
> and chown to get the perms right, but I'm thinking there has to be a way to 
> sync the files locally so that only the ones that have changed or are new 
> have to be copied to the right place.
> I can use find to set the perms, but I'm not sure how to sync the files. 
> This is unix, so there's got to be a built-in utility that does this, but I 
> can't seem to find it.

It's really a question of reading far enough in the man-page. I have 
eventually arrived at the options


C for CVS omissions (exclude *.bak, *.tmp, *~ etc)
p for preserve permisions
t for preserving time
u for update (using mtime I suppose)
a for archive - recursive
z for compression

and with that, there should be no reason to sync into a separate dir and 
then copy.

Cheers, Erik
Ph: +34.666334818                      web:
X.509 Certificate:
Key ID: 69:79:B8:2C:E3:8F:E7:BE:5D:C3:C3:B1:74:62:B8:3F:9F:1F:69:B9

Want to link to this message? Use this URL: <>