The AdvFS file system provides extended file system backup capabilities
with the
vdump
and
vrestore
commands.
The
rvdump
and
rvrestore
commands provide
the same capabilities for remote storage devices.
In addition, you can use
the AdvFS
clonefset
utility with the
vdump
command to back up mounted AdvFS filesets.
AdvFS fileset clones provide a
static snapshot of files for the backup.
This chapter covers the following:
Section 3.1
introduces the
vdump
and
vrestore
commands.
Section 3.2 explains ways to save data.
Section 3.3 discusses clones.
Section 3.4 explains database backup.
Section 3.5 details methods to restore data.
Section 3.6 discusses AdvFS and NetWorker.
You can use the
vdump
command to back up AdvFS filesets
as well as UFS and other standard file systems.
This means that you can have
a single backup utility for your facility.
The
dump
and
restore
commands function differently from the
vdump
and
vrestore
commands.
The
dump
command
works at the inode level so it can handle only UFS files.
The
vdump
command works at the file level.
It scans the directories and uses
regular POSIX file system calls to access directories and files.
See
vdump
(8)
and
vrestore
(8)
for more information.
In this section only the
vdump
and
vrestore
commands are discussed, but the
rvdump
and
rvrestore
commands can be substituted for remote operation.
Note
You do not have to be root user to use the
vdump
andvrestore
commands. However, you must have write permission for the directory to which you want to restore files. Only the root user can save and restore the AdvFS quota files and the fileset quotas.
Caution
The
vrestore
command for operating system versions earlier than Version 4.0 does not properly restore information saved by thevdump
command for Version 4.0 or later. Thevdump
andvrestore
dump file formats are compatible in Version 4 and Version 5 operating systems.
The
A saveset can span multiple tapes or a tape can contain multiple savesets.
Savesets on tapes are delimited by file marks that are written when the
The
For example, to dump the filesets mounted at
The
Save mounted filesets.
Choose a subdirectory that you want to back up.
You do not
need to dump an entire fileset.
Compress files to minimize the saveset size.
Specify the number of in-memory buffers.
You can maximize
throughput by choosing a number compatible with your storage device.
Display the current
Display help information during the dump process.
Limit your display to error messages.
You do not need to display
warning messages.
Display the names of files as they are backed up.
Configure output with an error-protection system that allows
you to recover data even if there is a read error when you restore.
Handle AdvFS and UFS sparse files without zero fills.
You can specify the level of incremental backup in the
Quota files and fileset quotas are saved only when you are root user
and you specify level 0 backup.
You can only back up quotas for locally-mounted
systems.
The
You can place more than one saveset on a single tape by using the
To restore data from a tape containing more than one saveset, see
Section 3.5.4.
If your saveset requires more than one tape to complete, the
When the backup saveset device is the dash ( The
You can selectively back up individual subdirectories of a fileset by
specifying the subdirectory by using the
You can store your saveset as a file on disk.
This feature is useful
if you want to do full weekly backups to tape for archiving and incremental
backups to disk for quick access.
Saving to disk increases the speed of saving
and recovery because disks are faster than tape devices.
For example, Monday evening you can save an incremental backup to a
file containing Monday's activity.
In this example,
To restore the copy of a file,
You can also store your saveset on an empty partition.
The saveset will
not be available under file system control and could be lost if the partition
is reassigned.
For example, to dump the fileset mounted at
Do not back up to the
If you want to use the
This is also true for the
See
If you want to copy a complete disk, see
System Administration.
You can compress savesets as they are backed up.
This reduces the amount
of storage required for the backup and allows the dump to run faster on slow
devices because less data is written.
Use the
If you are using a tape drive that automatically does hardware compression,
using the
You can use the
Dumping with error protection requires saving one extra block for every
n
blocks.
It can correct only one block in each series of
n
blocks when the blocks are restored.
This means there is a trade-off:
If you believe tapes are error prone or if you require extremely
accurate backups and you have many tapes available for backup, set the value
of the
If you believe that tapes are generally reliable but you want
to be able to correct a rare bad block, set the value of the
You can check your saveset and make sure you have backed up the files
you intended.
After your backup is complete, run the
The
The
To restore the fileset from the remote tape drive, enter:
An AdvFS fileset clone is a read-only snapshot of the data in an existing
fileset.
If you have the optional AdvFS Utilities, you can create a clone.
You must be the root user to clone the root fileset.
A clone does not contain all the data at the time it is created.
Rather,
it is an outline of the data structure.
Data in the original fileset that
remains unchanged over the life of the clone is never saved in the fileset
clone.
When you modify the data in your original files, AdvFS saves the data
that existed in the original, page by page, into the clone.
You can create a fileset clone for any AdvFS fileset with the command-line
interface (see
Section 1.7.11) or with the AdvFS GUI (see
Section D.4.3).
You cannot clone UFS file systems.
Only one clone can
exist per fileset.
A clone is useful if the files in your system are changing during the
time you want to do your backup.
It reflects the state of your system at the
moment it was created and backing it up does not interfere with current processing.
After you finish your backup, delete the clone.
Clones of active filesets
continue to grow as the files are changed.
The following example backs up the
To remove the
If your database has an online backup utility, use it to back up the
database.
If it does not, you can back up databases with database down time
limited to the short time it takes to create the fileset clone.
Backing up
a database with an AdvFS fileset clone is the same as backing up any other
fileset.
You get the same benefits (see
Section 3.3).
To back up a database with a clone:
Shut down the database so that all database buffers are flushed
and the fileset has a complete, consistent copy of the database files.
Clone the fileset and mount the clone.
Reactivate the database.
When you want to back up the fileset clone, run a backup procedure.
Unmount and delete the clone.
Use only the database's own utilities to back up an active database.
You can use the
If your database files are spread over multiple AdvFS filesets, you
should create a clone on each fileset at the same time.
This ensures a consistent
back up of all the database information.
The
You do not have to be root user to run the
The
Display the current
Display the source directory path.
List the saveset structure.
Display error messages only.
Information messages are not
be shown.
Specify how the
The
Use the same version of the
Before you run the
You can also display the files and directories saved by running the
Restoring data from an AdvFS fileset clone is the same as restoring
data from any other fileset.
Start with the full backup if you are restoring an entire fileset.
Then
restore later incremental backups on top of this to retrieve files that have
changed since the full backup was created.
Files that were deleted after the
full backup was performed are restored.
It is necessary to delete these files
manually.
You can restore AdvFS user and group quota files either to an AdvFS
fileset or to a UFS file system.
If you are restoring AdvFS quota files to
a UFS file system, quotas must be activated on the UFS file system.
AdvFS
fileset quotas cannot be restored to a UFS file system because there is no
UFS analog to AdvFS fileset quotas.
You must be root user to restore quotas.
To restore to the current working directory from a tape containing multiple
savesets, use the
The following example selects and restores the fourth saveset on a tape:
If you do not know the location of the saveset directory you want to
restore, run the
You can use the
The following example restores the file named
If your restore operation requires more than one tape, the
NetWorker for Tru64 UNIX provides scheduled, online, automated
backup.
Use NetWorker with AdvFS as a comprehensive backup solution.
NetWorker
can automatically back up multiple servers in a heterogeneous environment.
It has a graphical interface and several scheduling options.
If users will access filesets during the backup process, use the AdvFS
vdump
command creates a list of fixed-size blocks,
called a
vdump
command closes the saveset.
vdump
command has the following form:
vdump
options mount_point
/psm
to tape:
# vdump -0 -f /dev/tape/tape0_d1 /psm
3.2.1 Unique Features of the vdump Command
vdump
command has a number of functions that
the UFS
dump
command does not have.
You can:
vdump
version number.
vdump
command.
A value of 0 specifies complete fileset backup.
A higher
number specifies a less complete backup.
The
vdump
(8)
reference page
describes a plan that cycles dump levels so that complete backups are saved
on two tapes at a time.
vdump
command operates by checking the file
modification date.
This might cause problems on a subsequent incremental backup
because the file modification date does not change if you rename or move a
file and do not modify the data.
Thus, if you back up your files then move
or rename them, change the modification date using the
touch
command:
touch
file_name
3.2.3 Dumping to Tape
vdump
command.
Set the
-N
option to specify no
rewind or specify a no-rewind device such as
/dev/ntape/tape0
.
This ensures that the tape does not rewind when the
vdump
command finishes.
Issuing another
vdump
command causes
the next saveset to be stored starting at the current tape position.
vdump
command prompts you to mount another.
3.2.4 Dumping to Standard Output
-
) character
, the
vdump
command writes to standard output.
Thus, you
can use the
vdump
and
vrestore
commands
in a pipeline expression to copy one fileset to another.
The following are
typical commands; they are equivalent:
#
vdump -0f - /usr | vrestore
-xf - -D /mnt
#
vdump -0 -f - /usr | (cd
/mnt; vrestore -x -f -)
rvdump
and
rvrestore
commands
are unable to use the dash (-
) character.
The output device
must be specified.
3.2.5 Dumping Subdirectories
vdump -D
command.
Without the
-D
option, if you specify a subdirectory instead
of a fileset on the command line, the
vdump
command backs
up the entire fileset that contains the named subdirectory.
If you specify
the
-D
option, backup is always run at level 0.
3.2.6 Dumping to a File or Disk Partition
projects.Monday
is the saved file in the fileset
backups
that
contains the saveset for the fileset mounted on
/projects
.
# vdump -9f /backups/projects.Monday /projects
revenue
, saved to
disk in the backup on Monday:
# vrestore -xf /backups/projects.Monday -D /projects revenue
/projects
to the partition
/dev/disk/dsk2g
:
# vdump -f /dev/disk/dsk2g -D /projects
a
or
c
partition
because these partitions include block 0, which contains the disk label.
The
device driver does not overwrite the disk label.
If you use the
a
or
c
partition, an error message is displayed
only if you are using a character or raw device; block special devices does
not return an error.
It is better to back up to another disk partition that
does not contain block 0 if you have the space.
a
or
c
partition and the rest of the disk is empty, you must first clear the disk
label using the
disklabel -z
command.
All prior information
that existed on the disk is lost.
If you do not clear the disk label, the
vdump
command might appear to save valid savesets, but when the
vrestore
command attempts to interpret the disk label as part of
the saveset, it returns the following message:
vrestore: unable to use save-set; invalid or corrupt format
rvdump
and
rvrestore
commands.
disklabel
(8),
vdump
(8),
vrestore
(8), and
System Administration
for more information.
3.2.7 Compressing Savesets
vdump -C
command to request compression.
You cannot specify the compression ratio;
it is determined by the contents of the dump.
Note
vdump
command with compression might result in
a larger saveset than expected.
Sometimes, due to compression algorithms,
already compressed data gets expanded when an attempt is made to do more compression.
3.2.8 Dumping with Error Protection
vdump -x
command to place
vrestore
command can recover damaged blocks.
The
vdump
command creates these blocks every
n
number
of blocks you specify.
The valid range of
n
is 2 to 32;
the default is 8.
If the
vrestore
command detects a read
error in a block, it uses the other blocks and the checksum block to recreate
the bad block.
-x
option to 2.
This permits error correction of
one bad block for every two blocks saved.
It requires 50% more tape because
after every two dump blocks, a checksum block is written.
-x
option to 32.
This requires 3% more tape because an extra block is added for
every 32 blocks written.
You can then recover information from any one bad
block in the group of 32 dump blocks.
vrestore -t
command to display the files you have saved.
This does not initiate
the restore procedure.
3.2.10 Dumping and Restoring Files Remotely
rvdump
command backs up files from a single mounted
fileset or an AdvFS fileset clone to a remote storage device.
You must be
able to execute the
rsh
command on the remote node to which
you are dumping.
See
rsh
(8)
for server and client access rules.
rvdump
command has the same options as the
vdump
command, but you must specify the node name for the device
that you are backing your files to.
The following example dumps a fileset
sar
to a tape on node
rachem
:
# rvdump -0f rachem:/dev/tape/tape0 /sar
# rvrestore -xf rachem:/dev/tape/tape0 -D /sar
Note
pssm
fileset on
line by creating the
pssm_clone
fileset and backing it
up to the default device.
The domain in this example is
domain1
.
# clonefset domain1 pssm pssm_clone
# mkdir /pssm_clone
# mount -t advfs domain1#pssm_clone /pssm_clone
# vdump -0 -u -C /pssm_clone
pssm_clone
fileset, enter:
# umount /pssm_clone
# rmfset domain1#pssm_clone
3.4 Cloning to Back Up Databases
Caution
vdump
and
vrestore
commands
on a fileset clone that contains the database.
3.5 Restoring Data
vrestore
command restores files by processing
the blocks from a saveset created by using the
vdump
command.
The
vrestore
command does not work on a saveset created
by the UFS
dump
command.
vrestore
command, but you must have write privilege for the directory you restore to.
Only the root user can restore quota files and fileset quotas.
See
vrestore
(8)
for details.
3.5.1 Unique Features of the vrestore Command
vrestore
command performs a number of activities
that the UFS
restore
command does not.
You can:
vrestore
version number.
vrestore
command should
proceed if it encounters a file that already exists.
You can choose whether
the command always overwrites an existing file, never overwrites an existing
file, or queries you for each event.
vrestore
command allows you to select specific
files and directories to be restored.
It can restore data from a file, a pipe,
magnetic tapes, or disks.
vdump
and
vrestore
utilities.
If your version of the
vrestore
utility
is unable to read the format of your saveset, you get an error message.
vrestore
command, you can list
the names and sizes of all files in the saveset by running the command using
the
-t
option.
The restore operation is not performed.
vrestore -i
command.
You can select individual files or directories
to restore.
3.5.3 Restoring Quotas
3.5.4 Restoring from a Tape with Many Savesets
mt fsf n
command (forward space
n
savesets or files) option to locate the saveset you want to restore.
Then use the
vrestore
command.
# mt fsf 3
# vrestore -xf /dev/ntape/tape0
vrestore -i
command.
When you have reached
the saveset you want, use the interactive shell to specify the files you want
to retrieve.
vrestore -x
command followed by
the file names to selectively restore files from your saveset.
You can specify
a destination path other than the current directory for the restored files.
data_file
from the
/mnt/fdump
saveset.
It is restored to the
/mnt
directory.
# vrestore -f /mnt/fdump -D /mnt -x data_file
vrestore: Date of the vdump save-set: Sat Jun 20 15:27:36 2001
vrestore
utility notifies you to mount another.
3.6 AdvFS and NetWorker
clonefset
utility to clone all filesets for backup and mount the
fileset clones.
(You can create a script to accomplish this task.) Then, set
up NetWorker to automatically back up the fileset clones on a convenient schedule.