From owner-freebsd-questions@FreeBSD.ORG Wed Jan 30 18:50:05 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9510E16A41B; Wed, 30 Jan 2008 18:50:05 +0000 (UTC) (envelope-from bp@barryp.org) Received: from eden.barryp.org (host-42-60-230-24.midco.net [24.230.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7303713C4D1; Wed, 30 Jan 2008 18:50:05 +0000 (UTC) (envelope-from bp@barryp.org) Received: from geo.med.und.nodak.edu ([134.129.166.11]) by eden.barryp.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67 (FreeBSD)) (envelope-from ) id 1JKHQK-000DuA-CS; Wed, 30 Jan 2008 12:12:36 -0600 Message-ID: <47A0BE14.3040804@barryp.org> Date: Wed, 30 Jan 2008 12:12:36 -0600 From: Barry Pederson User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: Mikhail Teterin References: <200801301139.21989.mi+mill@aldan.algebra.com> In-Reply-To: <200801301139.21989.mi+mill@aldan.algebra.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org, fs@freebsd.org Subject: Re: Automatic `nodump' flag? 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, 30 Jan 2008 18:50:05 -0000 Mikhail Teterin wrote: > Hello! > > I'd like the entire contents of each user's .mozilla/firefox/*/Cache directory > to be excluded from the regular filesystem dumps. > > Running ``chflags -R nodump /home/*/.mozilla/firefox/*/Cache'' does the trick, > but this needs to be redone daily -- prior to running the backup -- because > new entries appear in the caches, obviously... The new entries don't have the > nodump flag set. > > Is there a way, the flag can be set automatically? For example, inherited from > the directory? Thanks! The dump man page for 6.2 says: Directories and regular files which have their ``nodump'' flag (UF_NODUMP) set will be omitted along with everything under such directories, subject to the -h option. So if the "Cache" directories themselves are flagged, I think you'd be OK. Maybe chflags nodump /home/*/.mozilla/firefox/*/Cache (without the -R) would be a good thing to quickly make sure the directories are flagged in case the users delete/recreate the Cache folders, but wouldn't take as long as flagging each and every cache file. You'd probably also want to add "-h 0" to the dump args, otherwise the cache files would be included in level 0 dumps. Barry