Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

append using cpio

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
Can u append to a tape with using cpio command?
 
Do you mean append to an existing cpio save, or start an entirely new one? If the latter use mt -f <norewind device> fsf 1 to move to the end of the existing save (this assumes there is only one on the tape so far, if more replace 1 with the number of saves). HTH.
 
Sorry this is sco isn't it! Use tape eod instead, to go to the end of written data. Cheers.
 
i have loads of files to backup which wont all fit on the system at once... So i need to backup half of them onto the tape... then delete them off the system and copy the other half on and appending these to the SAME tape?

 
Sounds quite a dangerous strategy, but this is from the man page for dat:

The following example archives /dir_A onto partition 0, and /dir_B onto partition 1 of the tape in the first SCSI drive:

tape -a 0 setpart /dev/nrStp0
find /dir_A -print | cpio -oB > /dev/nrStp0
tape -a 1 setpart /dev/nrStp0
find /dir_B -print | cpio -oB > /dev/nrStp0

Is this the kind of thing you need? Are you sure you wouldn't be safer using two tapes for the two halves? HTH.
 
why do u say this can be a dangerous strategy?

I was just looking into whether i can simply do an append to a tape... but I have to partition the tape into 2 parts?

all the data can easily fit on one tape so was just thinking what was involved!
 
My only reason for thinking this was a somewhat dangerous strategy was your use of the word 'delete' above, and the possibility (believe me, it has happened!) of overwriting your first save with your second, without the fall-back of having the first set of files available, having deleted them. IF you know that you have a secure and verified copy of these files elsewhere, this scenario shouldn't apply as you can start again. Cheers.
 
ohhh right :)

the files are on a different machine all together! i'm copying them onto the SCO server which has the backup tape drive u c! so no problem with the deleting aspect.

So this is the only possible way to do an append to a tape?
think ill just use 2 tapes!! hehehe.

Cheers again for ur help!
 
FYI you don't have to partition a tape to have multiple sessions on it. As long as you use the no-rewind device &quot;/dev/nrct0 &quot; you can put as many sessions on the tape as space allows for and they don't all have to be the same type of session.

For example:
find /u -print | cpio -ocvB > /dev/nrct0
find /tmp -print | cpio -ocvB > /dev/nrct0
probackup master.db /dev/nrct0
find /etc -print | cpio -ocvB > /dev/rct0

This would give you a tape with 4 sessions on it:
<cpio1>fm<cpio2>fm<progress database>fm<cpio3>

The drawback is that you have to restore things in order or position the tape using
tape rfm /dev/nrct0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top