Operating System - HP-UX
1832872 Members
2743 Online
110048 Solutions
New Discussion

How to do multiple backups using CPIO on one tape?

 
SOLVED
Go to solution
Mahesh Ganga
Occasional Advisor

How to do multiple backups using CPIO on one tape?

Gurus,

I have some scripts that already use CPIO to back up files from a single directory to a tape device. I now have additional files in other directories that I want to backup to the SAME tape. Can I do it?? If so, how?

TIA,
Srikanth
6 REPLIES 6
Mel Burslan
Honored Contributor

Re: How to do multiple backups using CPIO on one tape?

I am not sure how you backed up your cpio to the tape but if you piped your output to a tar -cvf /dev/rmt/0m or something like this, you can alvay sadd files using -r option instead of -c to append to the tarfile

HTH
________________________________
UNIX because I majored in cryptology...
KapilRaj
Honored Contributor

Re: How to do multiple backups using CPIO on one tape?

Write your own script,

for DIR in $*
do
find $DIR -xdev -depth -print >>/tmp/list_bkp$$
done

cat /tmp/list_bkp$$ file and pipe it to ur existing backup script's CPIO function. Or use cpio -p so that it takes everything from STDIN.

Regds,

Kaps
Nothing is impossible
Steven E. Protter
Exalted Contributor

Re: How to do multiple backups using CPIO on one tape?

I looked at the man page for cpio for an hour and the only way i found was the second response or tar -rvf

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor
Solution

Re: How to do multiple backups using CPIO on one tape?

Use a no-rewind device, and just dump a second file onto the tape. No biggie.

At least this is what I do in both SCO (OpenServer & Unixware) and Linux systems.

The only caveat is that you need to do mulitple restores, as each file-mark ends on the tape, you need to issue another cpio command.

We use this method to back up 8-9 different machines around our office here. But we're small scale, only just starting to fill the 115GB Ultrim.
One long-haired git at your service...
KapilRaj
Honored Contributor

Re: How to do multiple backups using CPIO on one tape?

Steve,

It means -p goes with only dir ==> dir ?

Anyway the post was my assumption i never tested it.

Kaps
Nothing is impossible
Mahesh Ganga
Occasional Advisor

Re: How to do multiple backups using CPIO on one tape?

Thanks for the quick replies.
I agree with Stuart. I happened to try that last night and it worked just fine. I am going to use that approach.

Thanks Again!