Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2019 13:45:29 -0500
From:      George Mitchell <george+freebsd@m5p.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Non-interactive multivolume restore
Message-ID:  <fc745866-cb34-17ae-9e4c-53e330a672c8@m5p.com>
In-Reply-To: <5e7f90d8-d4a6-9ae3-3e92-2abc3103c683@m5p.com>
References:  <5fc87495-8fdc-c1f3-0b95-8609347794f0@m5p.com> <alpine.BSF.2.20.1902041440510.35838@puchar.net> <32330.1549288285@critter.freebsd.dk> <5e7f90d8-d4a6-9ae3-3e92-2abc3103c683@m5p.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--vFm0ljvzvqQCoBXTboW14UjG3Kcorz81Y
Content-Type: multipart/mixed; boundary="KumFB4YJvvFLCUFVu6wiQmL1OyI1SsN39";
 protected-headers="v1"
From: George Mitchell <george+freebsd@m5p.com>
To: freebsd-hackers@freebsd.org
Message-ID: <fc745866-cb34-17ae-9e4c-53e330a672c8@m5p.com>
Subject: Re: Non-interactive multivolume restore
References: <5fc87495-8fdc-c1f3-0b95-8609347794f0@m5p.com>
 <alpine.BSF.2.20.1902041440510.35838@puchar.net>
 <32330.1549288285@critter.freebsd.dk>
 <5e7f90d8-d4a6-9ae3-3e92-2abc3103c683@m5p.com>
In-Reply-To: <5e7f90d8-d4a6-9ae3-3e92-2abc3103c683@m5p.com>

--KumFB4YJvvFLCUFVu6wiQmL1OyI1SsN39
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

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@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.
>>
>=20
> 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
>=20
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?


--KumFB4YJvvFLCUFVu6wiQmL1OyI1SsN39--

--vFm0ljvzvqQCoBXTboW14UjG3Kcorz81Y
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEENdM4ZHktsJW5kKZXwRES3m+p4fkFAlxZ2dAACgkQwRES3m+p
4fkSIw//WcOeUDb33rbIDAlE8GBsgFAQWbxDyPB6oo/y3Jz1MGCmyMaHJ2Jo3CK6
xjvXNsP9LnMc7SEOeCXm49NLwNYV4Dm5tTKf1psxFz3JJ7hrRMMB2XqNcA9rpXAe
LX5Zk7j09y3ExcmUwNp1FANqwcpKxtAmFXwGdmjO4XyKTWDCQ5tOWTj1Kz0DL7Zs
jE89LdwcHrZTzC5Kw7V6dBBr4R8+xDv/rMv6vxgMxny2ZAtCAnhkRoWzymVX2gam
phnVaTbPTQej3fFo1I+aSv4Pup+Sk8QwLDDvbcC/290CbqXXOIxdSo7drU2PiPbu
MtTD3IY3XU9zevwHc4cDnEwztpMuz7+Z4M4l9XejnOMFZ32BPMYA6CzRHTb2YheZ
anUyzOJbgZP5XuKi4fEb85W5R8MhHeG16yT9LQQdzh+VeTmZ2QZLLa/j35IYgPSz
aXjZTeCt9ZvL3oj8MjA8rjVCls2yxFfXwBmj+SulwjgQFSU6NRuFQvbKhetwVBoH
vR/VjTM7OdM7AWW56xR4ByJGOt9xVE6SwBz2I5PYgPd/TFzAYqq4NzIbBCO6zVN9
j+8T/U1KV7QoEBQdpI+Dm6HqziMPcJ2qnMNgumw7q8l7ILinWXkosUTWML51Ui8K
qllk4OVYNInhTYEnpGU++cMwA21vluQI48DzowdpYJec91pUuQQ=
=utRQ
-----END PGP SIGNATURE-----

--vFm0ljvzvqQCoBXTboW14UjG3Kcorz81Y--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fc745866-cb34-17ae-9e4c-53e330a672c8>