[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Questions with rsync

GMS S wrote:
I would pretty much recommend that you specifically omit /dev and /proc

Save the filter to a text file and make it look something like this (I
like the first one but you might not). + and - symbols should be

- ~*
- /lost+found/
+ **/home/user/backup

rsync -vpa --filter='. /path/to/rsync-filter' $source $destination

I didn't think '-a' option indicates compression at all, only 'archive'
and you might want '-u' option for update.


So what would be the final command if I exclude these directory?


I use this sort of thing with a 500GB USB drive (automounted at
"/media/500GB-Drive" by Gnome):

	# Back up system to a specific directory given on the command
	# line or a default based on today's date.  Excludes the /proc,
	# /sys, /dev and /media directories
	TODAY=`date +%d-%b-%Y`
	if [ $# -lt 1 ]; then

	rsync -avXA --exclude-from=/etc/skipdirs.rsync / $TGT

with /etc/skipdirs.rsync containing:


Tweak as you see fit.
- Rick Stevens, Systems Engineer                      ricks nerd com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-                   To err is human, to moo bovine.                  -

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]