You use '--exclude-from=/the/exclude/file'
and that file should look like he extract below
The following backs up all the users in my /home with the exceptions
listed in it. The ones that have 'hjm' reference my home dir. the
ones that have other users (hm/*) will completely skip those dirs.
the ones that have no user spec (*.o) will omit all obj files from
any subdir.
# use this command
# sudo rsync --exclude-from=/home/hjm/rsync.exclude -av /home \
# hjm@moon:/b/hjm/bongobak
hjm/.VirtualBox/*
hjm/.cx*
hjm/.cpan
hjm/code/*
hjm/nco_test/*
hjm/.kde/cache-bodi/http/*
hjm/.google/*
hjm/.googleearth/Cache/*
hjm/.thumbnails/*
hjm/nacs/osborne/gff*
hjm/nacs/2sigma/audio/*
hjm/.opera/cache4/*
hjm/.evolution/*
hjm/l_cc*
hjm/IDV*
hjm/code/SAS/*
hjm/SAS/*
hjm/.dods_cache/*
hjm/nco_bm/*
hjm/valgrind
hjm/.local/share/Trash/*
hjm/.ccache
hm/*
*.tmp
*.gff
*.chp
*.rpm
*.nc
*.o
*.rm
*.mov
*.deb
*out
*.iso
On Thursday 26 March 2009, gahn wrote:> Hi all:
>
> I got basic rsync working (not server mode). Basically it went to
> another server via ssh, backed up subdireactories and stored on the
> local server. But I am trying to use the feature of "exclude" and
> could not get it working rigjt.
>
> I am trying to back up /export/home/* (all of users) on another
> machine but exclude a certain types of files. here is one of my
> tested exclude files:
>
> /home/unwanted_dir
>
> this one works. rsync successfully backed up other directories
> except the "unwanted_dir"
>
> But how could I get rsync search the patterns of files in those
> user directories and exclude them?
>
> Thanks
--
Harry Mangalam - Research Computing, NACS, Rm 225, MSTB, UC Irvine
[ZOT 2225] / 92697 949 824-0084(o), 949 285-4487(c)
---
Good judgment comes from experience;
Experience comes from bad judgment. [F. Brooks.]