Automatic `nodump' flag?

Barry Pederson bp at barryp.org
Wed Jan 30 10:50:05 PST 2008


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


More information about the freebsd-fs mailing list