From owner-freebsd-questions@FreeBSD.ORG Wed Oct 7 18:19:36 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 270071065695 for ; Wed, 7 Oct 2009 18:19:36 +0000 (UTC) (envelope-from JHALL@SOCKET.NET) Received: from mf5.socket.net (mf5a.socket.net [216.106.26.209]) by mx1.freebsd.org (Postfix) with ESMTP id 0B6318FC20 for ; Wed, 7 Oct 2009 18:19:35 +0000 (UTC) Received: from [10.129.40.201] (216.106.12.14.reverse.socket.net [216.106.12.14]) by mf5.socket.net (Postfix) with ESMTP id E351160657 for ; Wed, 7 Oct 2009 13:19:34 -0500 (CDT) Message-Id: <99D3E0B6-09CA-453C-A964-AA95D4A6B35C@SOCKET.NET> From: Jay Hall To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Wed, 7 Oct 2009 13:19:34 -0500 X-Mailer: Apple Mail (2.935.3) Subject: 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 18:19:36 -0000 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