Gentoo Archives: gentoo-user

From: Peter Ruskin <peter.ruskin@×××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] rsync to a USB stick
Date: Sat, 29 May 2010 09:50:22
Message-Id: 201005291049.20655.peter.ruskin@dsl.pipex.com
In Reply to: [gentoo-user] rsync to a USB stick by Mick
1 On Saturday 29 May 2010 10:01:39 Mick wrote:
2 > Hi All,
3 >
4 > I run:
5 >
6 > rsync -a -l --delete -v /mnt/Business_dir /media/sdf1
7 >
8 > to back up a directory from a PC to a USB stick. However, from a
9 > cursory look this *seems* to copy the complete directory (every
10 > time I run it) and overwrites the USB stick. Carrying on like
11 > this it will life-expire the USB stick in no time, plus it takes
12 > ages to complete as it copies over every single file again and
13 > again.
14 >
15 > Is there a cleverer option I can add to rsync so that it only
16 > copies new files, overwrites older versions of the same and only
17 > deletes any files or directories that have been deleted from the
18 > source directory?
19
20 Try adding a stroke after the directories:
21 rsync -a -l --delete -v /mnt/Business_dir/ /media/sdf1/
22
23 Does that help?
24 --
25 Peter
26 ========================================================================
27 Gentoo Linux: Portage 2.2_rc67 kernel-2.6.34-gentoo
28 AMD Phenom(tm) 9950 Quad-Core Processor gcc(Gentoo: 4.4.3-r2)
29 KDE: 3.5.10 Qt: 3.3.8b
30 ========================================================================