Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a Workgroup
How To:
Chapter 9880
Backing Up and Recovering Directories: Quick
Reference for tar
The following examples may be useful for workstation users wanting to
make a quick backup to tape or disk. For information on system backup,
see “Backing Up Data” on page 674.
To create a tar backup to tape:
tar cv /home/me/mystuff /work/project5/mystuff
This can include files and directories.
NOTE This overwrites anything already on the tape.
v (verbose) is optional throughout.
files tarred in this way (using absolute path names) can be
recovered only to the same path name. You can use a relative
path name, or use fbackup with -X, if you want to keep your
options open.
tar assumes the system default tape device file /dev/rmt/0m;
this is implicit in all the tape examples that follow. You can
specify a different device file (or a disk file; see the next example)
by means of the f option.
In releases 10.20 and earlier, to append to the end of the tape (not
overwriting what’s already there):
tar rv /home/me/newstuff
To add files to the tape only if they are not already there, or have
been modified since they were last written to the tape:
tar uv /home/me
New and changed files in the directory /home/me are added to the
end of the tape (old versions of the files are not overwritten on the
tape).
To find out what’s already on the tape:
tar tv