Rsync on a single server

David Schoen dave at
Wed Apr 28 06:24:14 MDT 2010

On 28 April 2010 12:48, Legionnaire1 <michael at> wrote:
> Addendum:
> I seem to have been successful in copying files from one of the domains to
> the other using the following:
> rsync -auvn /path/to/source/directory /path/to/destination/directory

That seems a tad unlikely... close, but unlikely.

The '-n' arg is short for '--dry-run' or 'perform a trial run with no
changes made'. In other words it should tell you what it was going to
copy if it was actually allowed to run, but not actually do anything,
but maybe you knew that when you were testing it but forgot to change
it for the email...

Also '-a' implies '-t' which is perfectly fine for most mirroring
operations. '-u' will probably work in this case, but I prefer '-t'
it's a sensible default for almost everything.

rsnapshot is fine if you want to do archiving style backups but rsync
on its own makes more sense if you are only trying to mirror file
system data.

As others have said though, the contents of a MySQL DB is complex and
you will probably not get a sane copy if you simply copy the files
while they are in use on either end. There are almost certainly tools
better suited to your needs.

Also when I use rsync I like to put slashes on the end of all paths as
it works closer to the way you're thinking, e.g.:
rsync -av /path/to/source/directory/ /path/to/destination/directory/

other wise you will probably end up with two copies after your second
run, one in /path/to/destination/directory and the second in
/path/to/destination/directory/directory . Which probably isn't what
you want.


More information about the rsync mailing list