Date: Wed, 7 Oct 2009 16:43:17 -0500 From: Jay Hall <JHALL@socket.net> To: krad <kraduk@googlemail.com> Cc: freebsd-questions@freebsd.org Subject: Re: rsync include and exclude Message-ID: <BCEFF74E-D82A-429C-AD2E-745777BFCFF0@socket.net> In-Reply-To: <d36406630910071302u6d5164b1k816a32db00b1ba3f@mail.gmail.com> References: <99D3E0B6-09CA-453C-A964-AA95D4A6B35C@SOCKET.NET> <d36406630910071302u6d5164b1k816a32db00b1ba3f@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks. That took care of the problem. Jay On Oct 7, 2009, at 3:02 PM, krad wrote: > > > 2009/10/7 Jay Hall <JHALL@socket.net> > Ladies and Gentlemen, > > I am using rsync to backup some information and I am having some > problem with including and excluding directories. > > I want to include everything in the user's mail directory and > everything in the user's documents directory. Everything else > should be excluded. And, it is possible to have multiple users on a > single computer. > > Following is what I am using for my include/exclude patterns. > > + /Users/*/Library/Mail/ > + /Users/*/Documents/ > - /Users/*/Documents/* > - /Users/*/Library/* > > This gives me close to the desired result. However, there are some > extra files included which I do not need to backup which are stored > in /Users/username directory. > > If I add -/Users/*, no files are backed up. > > After reading the man pages and several examples, I thought I had a > handle on this. Any suggestions would be greatly appreciated. > > Thanks, > > > Jay > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org > " > > try adding this line to the top > > + /Users/* > > then this to the bottom > > - /Users/*/* > > > I use lists like this at work a lot and you have to be careful. The > ordering of the rules is very important. The common on for people to > get wrong is the mysql rules.. We generally dont copy the binary db > files as they would never be consistent, so we dump the db else > where and exclude the files. Except we need to capture the my.cnf > file. The following ruleset does it > > + /var/db/mysql > + /var/db/mysql/my.cnf > - /var/db/mysql/** > > If you deviate from this things dont tend to work.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BCEFF74E-D82A-429C-AD2E-745777BFCFF0>