Questions about rsync

Walter Dnes waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org
Mon Apr 24 03:22:27 UTC 2006


  I want to start using rsync instead of cp or scp to back up my system.
Since my 160 gig "bigdrive" is USB 1.1 (don't ask), wiping the old copy
of /mnt/bigdrive/waltdnes/ and copying over my entire /home/waltdnes/ is
painful.  Just doing the differences will obviously save time.

1)  Do I understand correctly that rsync will ensure that the copy is
identical to the source, i.e. local files that I've changed since the
last rsync will be changed on the copy, local files that have been
added and deleted will be added and deleted, respectively, on the copy?
I want to mirror my local directory.

2) "local backup"

  Given a home directory...

[m3000][waltdnes][~] ll /home/ | grep waltdnes$
drwxr-xr-x 67 waltdnes users 5432 Apr 23 21:38 waltdnes

  Given a directory on an external USB drive

[m3000][waltdnes][~] ll /mnt/bigdrive/ | grep waltdnes$
drwxr-xr-x 66 waltdnes users  5360 Apr 15 02:49 waltdnes

  If I understand the man page example properly, the command...
rsync -a /home/waltdnes/ /mnt/bigdrive/waltdnes

...will back up /home/waltdnes/ to /mnt/bigdrive/waltdnes/

3) Backup to my "hot backup" machine, a 6-year-old Dell (don't laugh, it
still does 90% of what I need).  Assume that I have the appropriate
entries in /etc/sudoers on m450, and I've set up ssh so that "ssh m450"
from my "waltdnes" user is identical to "ssh waltdnes at m450"...

#!/bin/bash
ssh m450 sudo /etc/init.d/rsyncd restart
sleep 10
rsync -a /home/waltdnes/ m450:/misc/linkback/home/waltdnes
ssh m450 sudo /etc/init.d/rsyncd stop

  I'm hazy on the transport, but I understand that ssh is the default.

-- 
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org> In linux /sbin/init is Job #1
My musings on technology and security at http://tech_sec.blog.ca
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list