rsync backup

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Dec 8 23:03:22 UTC 2010


On Tue, Dec 07, 2010 at 03:02:40PM -0500, teddy mills wrote:
>
> I rsync from /home/teddy/ to an external USB hard disk. It works fine.
>
> rsync -avz --delete --exclude-from '/home/teddy/rsync-exclude'  
> /home/teddy /media/backup
>
> /home/teddy/rsync-exclude
> .gvfs
>
> (weird .gvfs, I exclude it)
>
>
> /dev/sdb1             459G  301G  136G  69% /media/backup
>
>
> I decided to put a trailing slash on /home/teddy/ and /media/backup/
> and run rsync again. rsync started deleting everything. (--delete) (301GB)
> I stopped it quick that and took out the slashes and reran rsync.
>
> It seems like I am stuck now using it without slashes.
>
> Question1:
> Is there a way I can run rsync with the trailing slashes, without  
> deleting everything?
>
> Question2:
> Before I start the backup, I would like to know if I am getting full  
> USB2 speed.
> How can I do a non-destructive hdparm test?

To rsync, 'foo/' means everything in foo, while 'foo' means foo and
everything in foo. Having the ability to make that distinction is very
important.

So rsync foo/ bar means copy everything in foo to bar.  rsync foo bar
means rsync foo under bar (so to bar/foo)

Read the manual, and learn to use -n and -v to test stuff.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list