From: Dave Chinner <david@fromorbit.com>
To: Will Dormann <wdormann@gmail.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: Silent skipping of file during xfsrestore
Date: Tue, 29 Nov 2016 08:33:51 +1100 [thread overview]
Message-ID: <20161128213350.GB28177@dastard> (raw)
In-Reply-To: <d555ad16-5b1e-1c22-5ee2-b4f248164b06@gmail.com>
On Mon, Nov 28, 2016 at 08:17:00AM -0500, Will Dormann wrote:
> On 11/28/16 3:21 AM, Dave Chinner wrote:
> > I think you misunderstand how the inventory and dump process
> > works. The dump process first builds the inventory inode map that it
> > needs to back up, then goes and backs up what it mapped in the
> > inventory. The filesystem can change between the inventory build
> > an dump trying to backup the file, and if the file does not match
> > the inventory for some reason (e.g. different inode generation
> > number) it will skip it. The file does not get removed from the
> > inventory, though, because that's already been written to the dump
> > file.
>
>
> Got it. Thanks. At the end of the backup, wouldn't xfsdump know what
> files were not able to be backed up, though? In my case, I had a level
> 0 backup, and also a level 1 backup. The problematic file wasn't
> present / able-to-be-restored in either backup set.
In many cases, yes it does. Certain types of issues end up with
inodes being placed in the "orphanage" - this happens if dump finds
open but unlinked inodes that weren't unlinked at the time the inode
map was built. The orphange updates only occur if the inode can be
read - if it's completely gone, it is simply skipped and restore
doesn't care.
Remember - xfsdump was designed to write direct to tape media - it
effectively generates a write-once stream of information, so once it
is written it can't be rewritten. It's an unfortunate side effect
of this "tape algorithm" that we see all sorts of weird behaviours
and limitations when we come across unexpected states.
> That is, if somebody does a level 0 backup, and a file isn't properly
> backed up for whatever reason, that file is flagged as "not backed up".
> That would allow it to be subsequently backed up in a
> higher-level-number backup. Note that in my case, I tried restoring
> from the most-recent level 1 backup, the most-recent level 0 backup, and
> an older level 0 backup as well. None were able to restore the file.
If it was supposed to be in the level 0 dump, and it wasn't, then
unless it was modified again before the level 1 dump it won't be in
that dump file, either.
> If this isn't possible, then I suspect that an xfsdump/xfsrestore of a
> (running?) system perhaps isn't as robust as I had hoped.
It has never been 100% robust when run on a live filesystem that is
being modified as the backup is running. If you want robust, exact
point in time backups, then snapshot the filesystem and run the
backup from the snapshot. Then remove the snapshot once the backup
completes....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2016-11-28 21:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 1:49 Silent skipping of file during xfsrestore Will Dormann
2016-11-28 1:59 ` Dave Chinner
2016-11-28 5:00 ` Will Dormann
2016-11-28 8:21 ` Dave Chinner
2016-11-28 13:17 ` Will Dormann
2016-11-28 21:33 ` Dave Chinner [this message]
2016-11-28 22:00 ` Will Dormann
2016-11-28 16:10 ` Will Dormann
2016-11-28 16:32 ` Eric Sandeen
2016-11-28 16:43 ` Will Dormann
2016-11-28 17:45 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161128213350.GB28177@dastard \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
--cc=wdormann@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).