>I want to restore a filesystem from some amanda holding disk chunk files:
>
>-rw-------   1 backup   backup   2147385344 Apr 20 04:04 mmri1001._2.0
>-rw-------   1 backup   backup   2147385344 Apr 20 04:17 mmri1001._2.0.1
>-rw-------   1 backup   backup   1540063232 Apr 20 04:30 mmri1001._2.0.2
>
>So, I need to do something like this:
>
>cat mmri1001._2.0* | amrestore -p - mmri1001 /2 | tar tf - |p

Wow, are you ever working too hard :-).

If those files are truely in the holding disk (i.e. you didn't bring
them back from tape), amrestore (certainly in 2.4.2 and I think before
that) already knows how to read from the holding disk and will do all
the chaining for you.  So it would be:

  amrestore -p /path/to/mmri1001._2.0 | tar tf ...

It doesn't look like the man page got updated until 2.4.2, but if you
look at the comments at the head of the source in 2.4.1p1 you should
see "tape-device|holdingfile".

If that doesn't work for some reason, go down a layer and use subshells
with dd:

  ( dd if=mmri1001._2.0 bs=32k skip=1 ; \
    dd if=mmri1001._2.0.1 bs=32k skip=1 ; \
    dd if=mmri1001._2.0.2 bs=32k skip=1 ) | gunzip | tar ...

(remove the gunzip if you're not using software compression, of course).

>Todd Pfaff

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

Reply via email to