[K12OSN] Simple RSYNC question
Les Mikesell
les at futuresource.com
Wed Oct 5 21:42:59 UTC 2005
On Wed, 2005-10-05 at 12:10, Jim Kronebusch wrote:
> > rsync -arvv --delete /mnt/mailhome/ /home
> >
> > Also try "man rsync" to learn about the command options available.
> >
> > Be careful, rsync really will delete files. Be sure your
> > source and target are correct before you accidentally wipe
> > out a bunch of stuff.
>
> Thanks Bill. I figured I would ask just to be safe. I saw the option
> in man rsync but it always makes me nervous.
One trick is to add -n to the options which will make rsync not
really do anything, but if you are also using -v it will show
you what would happen in a real run. If everything looks
reasonable, then run it again without the -n to really do it.
When I build new servers I usually set the new one up with
a different name/ip address and rsync most stuff over ahead
of the switch and check that things generally work. Then at
the last minute I shut down services on the old server, do
a final rsync of user data like /home and /var/spool/mail with
the --delete option on. This goes quickly unless there are a
lot of changes. Then I change the names and IP numbers on both
servers and reboot so in a few minutes more than a reboot, the
new box takes over.
--
Les Mikesell
les at futuresource.com
More information about the K12OSN
mailing list