From owner-freebsd-questions@FreeBSD.ORG Wed Oct 7 20:02:13 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24480106568B for ; Wed, 7 Oct 2009 20:02:13 +0000 (UTC) (envelope-from kraduk@googlemail.com) Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by mx1.freebsd.org (Postfix) with ESMTP id 967C78FC0C for ; Wed, 7 Oct 2009 20:02:12 +0000 (UTC) Received: by bwz27 with SMTP id 27so4201260bwz.43 for ; Wed, 07 Oct 2009 13:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=09vfGWe/vjwv16gwoPqQda/U3zH/AbRtl4VjcPuPSWk=; b=wDGJG43lPF10nEZLM3DxeI47XoLfAXEafjxKjBIosrmoY0Vho+g63krr2Ctepe93uE 4wAY7CDBYT+IShKh9J4xDrsM+QNZXM6lkPjxG3vPateoiFdE5eqSJN+EPsHzACy6PmgF QRyx3uS8OY4FrJai6wtUIC3Ce86DQY+N5IiI4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=G/tMwxnTNxjhqgtMbFhgDXfCTla/0JqnfC7ik0xJ+LFL91mmUZ4qwJZCEtzvixen8j C6OaguJMPS8e4VJYB9UMAiUQOFLRN8FGM6sCX+ACgtElyx47KvrpX0q1bTfGlt/WGh8i h5+SjdcJXLjdrfhDajmjng5whol/x+walQVwc= MIME-Version: 1.0 Received: by 10.239.142.148 with SMTP id g20mr31140hba.34.1254945730980; Wed, 07 Oct 2009 13:02:10 -0700 (PDT) In-Reply-To: <99D3E0B6-09CA-453C-A964-AA95D4A6B35C@SOCKET.NET> References: <99D3E0B6-09CA-453C-A964-AA95D4A6B35C@SOCKET.NET> Date: Wed, 7 Oct 2009 21:02:10 +0100 Message-ID: From: krad To: Jay Hall Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: rsync include and exclude X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2009 20:02:13 -0000 2009/10/7 Jay Hall > 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.