- A tar to and from a local tape drive
nice tar cvphf /dev/rst0 ./public
nice tar tvf /dev/rst0
nice tar xvpf /dev/rst0
The c flag creates the tar, the x file extracts from the tar.
The t flag reads the table of contents from the tar.
The p flag preserves the file permission settings.
The h flag follows links (undesirable when backing up a device,
but desireable when backing up a directorystructure.
- An efficient copy command
even across file systems.
cd fromdir; tar cf - . | (cd todir; tar xfBp -)
- Across the Ethernet to a tape drive
How to archive files from the local machine (example)
to a tape on a remote system (host):
example% tar cvfb - 20 filenames | rsh host dd of=/dev/rmt0 obs=20b
In the example above, we are creating a tarfile with the c
key letter, asking for verbose output from tar with the v
option, specifying the name of the output tarfile using the
f option (the standard output is where the tarfile appears,
as indicated by the `-' sign), and specifying the blocksize
(20) with the b option. If you want to change the block-
size, you must change the blocksize arguments both on the
tar command and on the dd command.
Here is a real life example from Taal:
tar cvfb - 20 avo_cdps.HH avo_cdps.sepdata | rsh oas dd of=/dev/rst1 obs=20b
Next time try this:
dump 0dsbfu 54000 6000 126 - /dev/sd0a | rsh oas dd of=/dev/rst1 obs=20b
dump 0=dump all, d=54000 density tape 8mm, s=6000 size length of tape,
b=126 blocksize (block=126byte), f=- file is pipeline u=/dev/sd0a unit
- From a tape drive on a remote system to the local system
example% rsh -n host dd if=/dev/rmt0 bs=20b | tar xvBfb - 20 filenames
In the example above, we are extracting from the tarfile
with the x key letter, asking for verbose output from tar
with the v option, telling tar it is reading from a pipe
with the B option, specifying the name of the input tarfile
using the f option (the standard input is where the tarfile
appears, as indicated by the `-' sign), and specifying the
blocksize (20) with the b option.
Real Life example on alpamayo:
rsh -n oas dd if=/dev/rst1 bs=20b | tar xvBfb - 20 avo_cdps.HH avo_cdps.sepdata