Commie Pinko Dirtbag
(1000+ posts)
Send PM |
Profile |
Ignore
|
Fri Dec-17-04 08:01 AM
Original message |
| Random tape backup goodies |
|
One: To position the tape after the end of the last valid file (so you don't overwrite things):
mt -f /dev/nst0 seod
If you want to make sure the tape head starts from a sane position but you don't want to do a full rewind before the above positioning, try this:
mt -f /dev/nst0 bsf 1 && mt -f /dev/nst0 seod
From that point on you can write the tape to your heart's content and you won't be overwriting any previous files on it.
Two: Have you ever recorded a sequence of tarballs into tape and upon reading them find out there's a "null" tarball between each one and the next? Use the "i" flag so tar skips any block of zeros at the end of file:
tar xzivf /dev/nst0
That way the next tar will read the next file the way it should be.
(Your tape device may be in a different place than /dev/nst0. If so, change accordingly)
|
Commie Pinko Dirtbag
(1000+ posts)
Send PM |
Profile |
Ignore
|
Sun Dec-19-04 10:03 AM
Response to Original message |
| 1. Small correction: the second command line won't work if... |
|
...tape is already rewound. (rewinded?) Use this instead:
mt -f /dev/nst0 bsf 1 2>/dev/null ; mt -f /dev/nst0 seod
|
DU
AdBot (1000+ posts) |
Wed Oct 22nd 2025, 12:04 PM
Response to Original message |