Problem with excludes and includes

Kevin Korb kmk at sanitarium.net
Sun Feb 26 09:04:32 MST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Things get much easier if you only use one file and use the +/-
syntax.  Here is a quick rewrite of your file using that syntax and
some changes and comments:

+ .vimrc
+ .gitconfig
+ .bash_aliases
+ .bashrc
# Exclude all .files except the ones commented above
- - .*
- - *~
# Have to include this or rsync will never see Playlist
+ Videos/Music/
+ Videos/Music/Playlist/
# Can't exclude Videos/ because then rsync will never look inside it
- - Videos/*
+ Downloads/Iso/
- - Downloads/*
- - Dropbox

On 02/26/12 09:54, Robert Parker wrote:
> Hi Folks,
> 
> I can't get the syntax of --include-from right, nothing at all
> gets transferred.
> 
> The rsync command: # do the backup nice -n 15 rsync -av \ 
> --include-from="/home/bob/backup_includes" \ 
> --exclude-from="/home/bob/backup_excludes" \ $fromdir $todir
> 
> The excludes file: .* *~ Videos/ Downloads/ Dropbox/
> 
> The includes file: .vimrc .gitconfig .bash_aliases .bashrc 
> Videos/Music/Playlist/ Videos/Music/Originals/ Downloads/Iso/
> 
> I've spent hours on the man page getting nowhere.
> 
> Thanks Bob
> 
> 
> 
> 
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9KWBAACgkQVKC1jlbQAQfHggCeL0dRbjClnOakbMIeLTjH/SIr
ZLgAoOiB3NTq73rVTYbvtVzSAdCapxqG
=/uH4
-----END PGP SIGNATURE-----


More information about the rsync mailing list