Re: Why or why not back up "/lost+found"
On Thu, 2023-08-10 at 22:03 +0000, Minecraftchest1 wrote:
> This post on the U&L Stack Exchange sitr summs it up fairly well.
> https://unix.stackexchange.com/a/18157.
>
> In short, `lost+found` is a place for fscheck to link filesystem
> entries that don't have an entry anywhere on the file system, during
> a filesystem check. Chances are, the files there were bring deleted,
> but weren't fully removed from the file system due to an open handle
> on
> the file. If you aren't specifically looking for a file that got lost
> due to a system crash, the files there likely aren't relavent
> and can be safely ignored.
>
>
> On August 10, 2023 9:46:27 PM UTC, Default User
> <hunguponcontent@gmail.com> wrote:
> > On Thu, 2023-08-10 at 21:45 +0200, Nicolas George wrote:
> > > Default User (12023-08-10):
> > > > And, if /lost+found should be excluded, then shouldn't
> > > > "lost+found"
> > > > in
> > > > any other directories be excluded from backups as well? Why/why
> > > > not?
> > > >
> > >
> > > Before anybody answers all your question, there is something that
> > > needs
> > > checking:
> > >
> > > Do you know what lost+found is for?
> > >
> > > If not, please read some documentation about it. The explanation
> > > of
> > > its
> > > function contains the answer to the question I left quoted above.
> > >
> > > Regards,
> > >
> > >
> >
> >
> > Hi, Nicholas.
> >
> > Well, I did read some documentation, and I have at least a
> > rudimentary
> > understanding of fsck and lost+found.
> >
> > Unfortunately, I regret to say that I did not find that the answer
> > to
> > the question(s) about lost+found in the original post were
> > contained in
> > the explanation(s) of its function - at least in what I have read
> > so
> > far.
> >
> > Or, maybe I'm just stupid.
> >
> > I'm sorry if I have bothered you.
> >
Three of my mount points, each of which is on a separate partition,
have lost+found directories:
/lost+found
/home/lost+found
/var/lost+found
All of these appear to be empty.
Of these, I have rsnapshot configured to exclude:
/lost+found
but the other two:
/home/lost+found
/var/lost+found
ARE currently being backed up.
The backups are to an external usb hard drive, mounted as:
/media/[user]/MSD00001
which has its own lost+found:
/media/[user]/MSD00001/lost+found
which also appears to be empty.
I have read a number of things online about fsck and lost+found,
including the previously mentioned:
https://unix.stackexchange.com/a/18157.
I think I understand the basic concept of how fsck puts stray files and
file parts in lost+found, and (in theory) how to manually extract whole
and partial files from lost+found.
Fortunately, since my lost+found directories are all empty, I have no
"raw material" to practice extraction on.
Now at this point, it seems that I could:
1) Continue to back up /home/lost+found and /var/lost+found, but NOT
back up /lost+found.
2) Start backing up /home/lost+found AND /var/lost+found AND
/lost+found.
3) Start NOT backing up /home/lost+found OR /var/lost+found OR
/lost+found.
What is everyone else doing about backing up, or not backing up, the
various lost+found directories on their systems?
Bonus points for why you do it that way!
:)
Reply to: