Re: Automatic `nodump' flag?

2008-01-30 Thread Kirk McKusick
> From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <[EMAIL PROTECTED]>
> To: Mikhail Teterin <[EMAIL PROTECTED]>
> Date: Wed, 30 Jan 2008 18:54:02 +0100
> Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Subject: Re: Automatic `nodump' flag?
> 
> Mikhail Teterin <[EMAIL PROTECTED]> writes:
> > 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!
> 
> Hmm, shoudn't whichever backup tool you're using stop when it encounters
> a nodump directory?  You shouldn't need to set nodump on the files
> themselves.
> 
> DES
> -- 
> Dag-Erling Smørgrav - [EMAIL PROTECTED]

The dump program runs on the raw disk partition dumping sequentially
by inode number. So, it has no idea of the file-tree hierarchy. Thus
any propagation of the "nodump" flag would have to be done by the
filesystem (or by using a different archiving program). It seems to
me that possible changes that could be made would be to update the
semantics of the existing "nodump" flag to say that if it is set
on a directory, then any new files or directories created within 
that directory would also have the "nodump" flag set. Or a new
"nodumpall" flag could be added that when set on a directory would
propagate to any new files or directories created within that
directory. Both of these would be easy to implement.

Kirk McKusick
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Automatic `nodump' flag?

2008-01-30 Thread Kirk McKusick
> Date: Wed, 30 Jan 2008 16:13:54 -0600
> From: Barry Pederson <[EMAIL PROTECTED]>
> To: Kirk McKusick <[EMAIL PROTECTED]>
> CC: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <[EMAIL PROTECTED]>, [EMAIL 
> PROTECTED],
> [EMAIL PROTECTED]
> Subject: Re: Automatic `nodump' flag?
> X-ASK-Info: Message Queued (2008/01/30 14:14:17)
> X-ASK-Info: Confirmed by User (2008/01/30 16:37:01)
> 
> Kirk McKusick wrote:
> 
> > The dump program runs on the raw disk partition dumping sequentially
> > by inode number. So, it has no idea of the file-tree hierarchy. 
> 
> I was just looking at the source to dump, specifically traverse.c and 
> from what I can see, doesn't dump pass #2 scan through all directories 
> and then in the searchdir() function remove a directory's children from 
> the list of inodes to backup if the directory has the nodump flag?
> 
> -
> 414 if (nodump) {
> 415 ip = getino(dp->d_ino, &mode);
> 416 if (TSTINO(dp->d_ino, dumpinomap)) {
> 417 CLRINO(dp->d_ino, dumpinomap);
> 418 *tapesize -= blockest(ip);
> -
> 
>   Barry

You are completely correct. This does prune out everything below a
directory marked `nodump' even if those files are not also marked
`nodump'. Note that by default, level 0 dumps will ignore the
`nodump' flag. You have to use `-h 0' if you want a level 0 dump
to honor the `nodump' flag.

You would think I would remember code that I wrote (though in my
defense it was written over 20 years ago :-)

Kirk McKusick
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"