* xfsrestore and multi-tape backups
@ 2015-09-08 14:48 Iustin Pop
2015-09-15 9:36 ` Iustin Pop
0 siblings, 1 reply; 4+ messages in thread
From: Iustin Pop @ 2015-09-08 14:48 UTC (permalink / raw)
To: xfs
Hi all,
Sorry for the long email. I don't understand how xfsrestore is supposed
to work when restoring a dump spanning multiple tapes, maybe someone can
explain things to me.
I did an xfsdump:
xfsdump -p 30 -f /dev/nst0 -l 0 -L "..." -M tape_0 -J /fs
I don't have the output from it anymore, but it run out of tape,
prompted me to insert a new media (which I named tape_02), I did, and
then it finished successfully.
I went then to do the restore after recreating the filesystem (so I
don't have the original FS to do comparisons), and per the xfsrestore
man page ("If a dump spans multiple media objects, the restore must
begin with the media object containing the first media file dumped.
The operator is prompted when the next media object is needed.") I
inserted the first tape, and run the restore (note same tape ID as in
the dump):
xfsrestore -p 300 -T -J -f /dev/nst0 /fs
xfsrestore: using scsi tape (drive_scsitape) strategy
xfsrestore: version 3.1.4 (dump format 3.0) - type ^C for status and control
xfsrestore: searching media for dump
xfsrestore: preparing drive
xfsrestore: examining media file 0
=========================== dump selection dialog ============================
the following dump has been found on drive 0
…
media label: "tape_0"
…
restore this dump?
1: skip
2: restore
(default)
-> 2
this dump selected for restoral
--------------------------------- end dialog ---------------------------------
xfsrestore: searching media for directory dump
xfsrestore: reading directories
xfsrestore: 17241 directories and 875931 entries processed
…
xfsrestore: status at 01:04:03: 785594/858613 files restored, 89.2% complete, 18300 seconds elapsed
xfsrestore: attempt to read 3719168 bytes failed: end of media file
xfsrestore: restore complete: 18449 seconds elapsed
xfsrestore: Restore Summary:
xfsrestore: stream 0 /dev/nst0 OK (success)
xfsrestore: Restore Status: SUCCESS
And back to the shell, without asking me to insert a new media. I though
maybe I need to manually do the second tape, so I did insert tape_02
and run:
xfsrestore -p 300 -T -J -f /dev/nst0 /swamp
xfsrestore: using scsi tape (drive_scsitape) strategy
xfsrestore: version 3.1.4 (dump format 3.0) - type ^C for status and control
xfsrestore: searching media for dump
xfsrestore: preparing drive
xfsrestore: examining media file 0
=========================== dump selection dialog ============================
the following dump has been found on drive 0
…
media label: "tape_02"
…
restore this dump?
1: skip
2: restore
(default)
-> 2
this dump selected for restoral
--------------------------------- end dialog ---------------------------------
xfsrestore: searching media for directory dump
xfsrestore: reading directories
xfsrestore: 17241 directories and 875931 entries processed
xfsrestore: directory post-processing
xfsrestore: restoring non-directory files
…
xfsrestore: status at 01:43:32: 66021/858613 files restored, 9.7% complete, 2100 seconds elapsed
xfsrestore: examining media file 1
============================ change media dialog =============================
please change media in drive
1: media change declined
2: display media inventory status
3: list needed media objects
4: media changed (default)
->
Here I was sure that it will know to prompt me for the first tape (maybe
the restore needs to start from the last media object?), but:
(selecting list needed media objects)
-> 3
here may be unidentified media objects not yet fully restored
--------------------------------- end dialog ---------------------------------
============================ change media dialog =============================
So it didn't know about any missing media. I reinserted the first tape,
restored again it contents (long process, it did read the entire tape),
at the end it prompted me *once more* for more media. Note that now it
had a different error message than in the first restore (where it said
"attempt to read NNNN bytes failed"):
xfsrestore: status at 15:23:32: 849732/858613 files restored, 99.0% complete, 51300 seconds elapsed
xfsrestore: attempt to read 3719168 bytes failed: end of media file
xfsrestore: WARNING: hit EOD at stream 0 object 0, yet inventory indicates last object index is 1
============================ change media dialog =============================
It still didn't know about any "missing" media, and the
media inventory status at this time was:
-> 2
session inventory display
media stream 0:
media object 0:
label: "tape_0"
id: 9f0405b8-d4bc-4f13-aa80-32a587decfd3
index within object of first media file: 0
media file 0 (0):
first extent contained: ino 515 off 0
next extent to restore: ino 7522410547 off 134217728
non-directories done
may be additional unidentified media files
media object 1:
label: "tape_02"
id: 232ed239-9020-4da6-8ea5-abe6f22c9f0a
index within object of first media file: 0
media file 0 (0):
used for directory restoral
first extent contained: ino 7522410547 off 134217728
next extent to restore: ino 8283659327 off 0
non-directories done
media file 1 (1):
is stream terminator
--------------------------------- end dialog ---------------------------------
I don't know how to parse this output. tape_02 seems consistent, tape_0
seems to not have all the information needed maybe?
I inserted the 2nd tape again:
4: media changed (default)
-> 4
examining new media
--------------------------------- end dialog ---------------------------------
xfsrestore: status at 15:28:32: 858069/858613 files restored, 100.0% complete, 51600 seconds elapsed
xfsrestore: preparing drive
xfsrestore: examining media file 0
xfsrestore: restore complete: 51946 seconds elapsed
xfsrestore: Restore Summary:
xfsrestore: stream 0 /dev/nst0 OK (success)
xfsrestore: Restore Status: SUCCESS
This time it didn't actually read anything from tape beyond the index
(mt tell said block 1 afterwards, and there was no "tape reading"
noise). It looks like it finished correctly, but also the first
incomplete restore also said "SUCCESS".
So at this point: I don't know what I did wrong, or if there was an
issue with my tape unit where it didn't write things correctly to the
end of the first tape. Or is the man page out of date?
I also don't know for sure if everything was restored (858069/858613
files restored means I lost at most 544 files lost, but I presume that
was just because the progress report interval was high). I didn't do a
"find" before the dump to compare file lists.
Hope someone can enlighten me :)
thanks in advance,
iustin
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: xfsrestore and multi-tape backups
2015-09-08 14:48 xfsrestore and multi-tape backups Iustin Pop
@ 2015-09-15 9:36 ` Iustin Pop
2015-09-15 12:13 ` Carlos E. R.
0 siblings, 1 reply; 4+ messages in thread
From: Iustin Pop @ 2015-09-15 9:36 UTC (permalink / raw)
To: xfs
On 2015-09-08 16:48:06, Iustin Pop wrote:
> Hi all,
>
> Sorry for the long email. I don't understand how xfsrestore is supposed
> to work when restoring a dump spanning multiple tapes, maybe someone can
> explain things to me.
Anyone? A TL;DR version is:
- restoring from tape 1 doesn't ask for the 2nd, reads finishes with
"failed; end of file" but restore is SUCCESS
- restoring from tape 2 asks for more tapes, inserting tape 1 continues
the restore but at the end asks for more tapes
So what's the correct way to restore a multi-tape dump? (Man page says
to start with tape 1, but that doesn't seem to be working).
thanks in advance,
iustin
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: xfsrestore and multi-tape backups
2015-09-15 9:36 ` Iustin Pop
@ 2015-09-15 12:13 ` Carlos E. R.
2015-09-15 12:53 ` Iustin Pop
0 siblings, 1 reply; 4+ messages in thread
From: Carlos E. R. @ 2015-09-15 12:13 UTC (permalink / raw)
To: XFS mailing list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 2015-09-15 11:36, Iustin Pop wrote:
> So what's the correct way to restore a multi-tape dump? (Man page
> says to start with tape 1, but that doesn't seem to be working).
I don't know about your case, so I maybe totally wrong. But it is
possible that the catalog or index is stored on the last tape only,
which might explain why starting with the second tape works (if I read
correctly your post).
- --
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 "Bottle" (Minas Tirith))
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iF4EAREIAAYFAlX4C3AACgkQja8UbcUWM1zclgD7BDYcqlZDq7CGDP2wMaOe/f8Z
LRcM/QZVK7LBw92ptBAA/iI9mB8Y/hP7fxcESBe9FIrKxguAcsVq8tr9FJDq+hiM
=Cf72
-----END PGP SIGNATURE-----
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: xfsrestore and multi-tape backups
2015-09-15 12:13 ` Carlos E. R.
@ 2015-09-15 12:53 ` Iustin Pop
0 siblings, 0 replies; 4+ messages in thread
From: Iustin Pop @ 2015-09-15 12:53 UTC (permalink / raw)
To: Carlos E. R.; +Cc: XFS mailing list
[-- Attachment #1.1: Type: text/plain, Size: 926 bytes --]
On 2015-09-15 14:13:36, Carlos E. R. wrote:
> On 2015-09-15 11:36, Iustin Pop wrote:
> > So what's the correct way to restore a multi-tape dump? (Man page
> > says to start with tape 1, but that doesn't seem to be working).
>
> I don't know about your case, so I maybe totally wrong. But it is
> possible that the catalog or index is stored on the last tape only,
> which might explain why starting with the second tape works (if I read
> correctly your post).
I suspect as much myself - since if during the backup if you run out of
tape writing a normal object, you can't write the index anymore.
But then why does the man page recommend starting with the first tape?
And why, when starting with the last tape, doesn't it know exactly which
tapes are needed?
If the man page is just wrong, I'll happily update it. Just want to get
a confirmation from someone familiar with the code.
thanks!
iustin
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-15 12:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-08 14:48 xfsrestore and multi-tape backups Iustin Pop
2015-09-15 9:36 ` Iustin Pop
2015-09-15 12:13 ` Carlos E. R.
2015-09-15 12:53 ` Iustin Pop
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.