Non-interactive multivolume restore

George Mitchell george+freebsd at m5p.com
Tue Feb 5 18:46:06 UTC 2019


On 2/4/19 8:20 PM, George Mitchell wrote:
> On 2/4/19 8:51 AM, Poul-Henning Kamp wrote:
>> --------
>> In message <alpine.BSF.2.20.1902041440510.35838 at puchar.net>, Wojciech Puchar writes:
>>>> files you want to restore, as opposed to additional dump volumes.
>>>>
>>>> I thought perhaps 'cat dumpvols... | restore -x -f -', but that
>>>> gets confused at the beginning of the second volume.
>>>>
>>>> What's the right way to do this?                          -- George
>>>>
>>>>
>>> look at -P option.
>>
>> I was just about to say:  -P is there exactly for tape libraries etc.
>>
> 
> Thanks to all who pointed this out to me!  I think I will propose a
> documentation patch to give an example of this usage, as I had to go
> poking into the code to see exactly how this works.  But first I'm
> verifying that my new understanding is correct.            -- George
> 
This does NOT work the way I expected.  I created links to the volumes
of my dump named dump1, dump2, ... dumpN.  Then I ran this command:

restore -x -s 1 -P 'cat ../dump$RESTORE_VOLUME'

Surprise number one: despite the "-s 1" option, the program asked me:

If you are extracting just a few files, start with the last volume
and work towards the first; restore can quickly skip tapes that
have no further files to extract. Otherwise, begin with volume 1.
Specify next volume #:

So I answered "1" and got my next surprise.  Before continuing from
volume 1 to volume 2, this appeared:

Mount tape volume 2
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: cat ../dump$RESTORE_VOLUME)

I pressed enter.  A similar dialog transpired at the end of each
succeeding volume of the dump.  The good news is that the restore
succeeded and I had a lot less typing to do.  But this doesn't meet
my definition of non-interactive.  What did I miss this time?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20190205/cf26baed/attachment.sig>


More information about the freebsd-hackers mailing list