I am working on some recovery procedures on a AIX system at the moment. The
environment consists of two seperate servers with different file-systems and
mount points.
The source system is backed up regularly using a command along the following
lines
find / -name '*files*' - print | cpio -ocvB > /dev/rmt0
I want to be able restore the files from that tape on the target system but
direct the files into a different directory due to file-system space
constraints.
As the backups are using absolute referencing the cpio -id option is not
viable
The closest I have come to solving the problem is something like
cpio -ircvB "*files needed*" < /dev/rmt0
but the interactive nature of this is undesirable as it is intended as
procedures for an operator which can be kicked off and require no human
interaction, not to mention the risk of typos
Does anybody have a solution for this possibly using celver tricks with
pipes and sed/awk etc. I am out of ideas.
regards
No clever sed/awk, much easier:
use "find . -print | ..." and all files are backed up with relative
filenames to current working dir.
Nothing specific to AIX.
---
Uli
>> The source system is backed up regularly using a command along the
>following
>> lines
>>
>>
>> find / -name '*files*' - print | cpio -ocvB > /dev/rmt0
>>
>>
>> I want to be able restore the files from that tape on the target system
>but
>> direct the files into a different directory due to file-system space
>> constraints.
>use "find . -print | ..." and all files are backed up with relative
>filenames to current working dir.
That's the right solution when designing a backup methodology, but
if there is a need to restore from a cpio (or tar) tape that has
already been written the "wrong" way, then there is:
cd target_dir
pax -r -pe -s,^/,, < /dev/rmt0
--
Geoff Clare <nos...@gclare.org.uk>
> >use "find . -print | ..." and all files are backed up with relative
> >filenames to current working dir.
>
> That's the right solution when designing a backup methodology,
> but if there is a need to restore from a cpio (or tar) tape that has
> already been written the "wrong" way, then there is:
>
> cd target_dir
> pax -r -pe -s,^/,, < /dev/rmt0
>
Or use "chroot" as a simple alternative.
---
Uli
"Uli Link" <Ulrich--nO--(dot)-sPAM...@Epost.de> wrote in message
news:bdcqkt$jmr$04$1...@news.t-online.com...
can I selectively restore using a variant of the pax statment you mentioned.
e.g. the backup has files from /fs1 and /fs2 and I would like to skip /fs2 I
was using a filter in the cpio as follows
cpio -ircvB "/fs1/*" </dev/rmt0
how would I include this filtering in pax?
regards
MJW
"Geoff Clare" <ge...@clare.See-My-Signature.invalid> wrote in message
news:hh39k...@clare.See-My-Signature.invalid...
>PAX looks like it might solve my problem
>can I selectively restore using a variant of the pax statment you mentioned.
Yes, pax accepts pattern arguments the same as cpio does.
>e.g. the backup has files from /fs1 and /fs2 and I would like to skip /fs2 I
>was using a filter in the cpio as follows
>cpio -ircvB "/fs1/*" </dev/rmt0
>how would I include this filtering in pax?
pax -r -pe -s,^/,, "/fs1/*" < /dev/rmt0
(You could have found this out quicker by reading the pax man page.)
--
Geoff Clare <nos...@gclare.org.uk>
I am not back at the site until next week but when I get there I will have a
read of the man page and give pax a try out
"Geoff Clare" <ge...@clare.See-My-Signature.invalid> wrote in message
news:hh547...@clare.See-My-Signature.invalid...