backup(1M) backup(1M)
NAME
backup - initiate or control a system backup session
SYNOPSIS
backup [-t table] [-o oname[:odevice]] [-m user]
[-en] [-c week:day | demand]
backup [-i] [-t table] [-o oname[:odevice]] [-m user]
[-en] [-s | -v] [-c week:day | demand]
backup -S | -R | -C [-u user | -A | -j jobid]
backup [-p | -w | -f files | -u "user1[user2]"] -d device
backup -h
DESCRIPTION
Two backup facilities are delivered: the basic version and the
extended version. A basic backup command (providing six
options) is delivered in the Personal Edition. It provides a
facility that is adequate for most small machines and machines
with a minimal amount of software installed. If you install
the Extended Backup and Restore package, however, you'll have
access to the extended backup command. This section describes
the options available with both facilities.
Although many options cannot be run unless a user has
privileges to do so, some options to the basic backup command
can be executed by any user without special privileges.
Do not confuse the backup and restore facilities with the
emergency recovery facilities. Typically, after installing
the system and all add-on software (for example, the Online
Data Manager), emergency recovery diskettes and emergency
recovery tape(s) are created using the emergency_disk(1M) and
emergency_rec(1M) commands. This media is then stored in a
safe location in case your system is corrupted and a full
recovery of the hard disk is needed. Assuming your system is
not damaged, the backup and restore facilities are used on a
regular basis to perform all archiving and restoring of user
data files.
The Extended Backup Facility
Without options, the backup command performs all backup
operations specified for the current day and week of the
backup rotation in the backup register. This set of backup
operations is considered a single job and is assigned a backup
job ID which can be used to control the progress of the
session. As backup operations are processed, the status of
each is tracked. [See bkstatus(1M).] As backup operations
Copyright 1994 Novell, Inc. Page 1
backup(1M) backup(1M)
are completed, they are recorded in the backup history log.
A backup job can be controlled in three ways: it can be
canceled, suspended or resumed (after being suspended).
The extended backup command may be executed only by a
privileged user.
Modes of Operator Intervention in Extended Backup/Restore
Backup operations may require operator intervention to perform
such tasks as inserting volumes into devices or confirming
proper volume labels. backup provides two modes of operator
interaction.
backup with no options assumes that an operator is present,
but not at the terminal where the backup command was issued.
This mode sends a mail message to the operator. The mail
identifies the device requiring service and the volume
required. The operator reads the mail message, invokes the
bkoper command, responds to the prompts, and the backup
operation continues.
backup -i establishes interactive mode, which assumes that an
operator is present at the terminal where the backup command
was issued. In this mode, bkoper is automatically invoked at
the terminal where the backup command was entered. The
operator responds to the prompts as they arrive.
Register Validations for Extended Backups
A number of backup service databases must be consistent before
the backups listed in a backup register can be performed [see
bkreg(1M)]. These consistencies can only be validated at the
time backup is initiated. If any of them fail, backup will
terminate. Invoking backup -ne performs the validation checks
in addition to displaying the set of backup operations to be
performed. The validations are:
The backup method must be a default method or be an
executable file in /bkup/method.
The dependencies for an entry are all defined in the
register. Circular dependencies (such as entry abc
depends on entry def; entry def depends on entry abc)
are allowed.
Copyright 1994 Novell, Inc. Page 2
backup(1M) backup(1M)
The device group for a destination must be defined in
the device group table, /etc/dgroup.tab.
Options Available with the Personal Edition
-d device Used to specify the device to be used. If you don't
use this option, backup checks to see how many
floppy diskette drives you have. If you have only
one, it's used. If you have more than one, backup
prompts you to specify which you want used.
-f files Back up files specified by the files argument.
Filenames may contain special characters (such as *
and .), which will be expanded later by the shell.
The argument (files) must be in quotes.
-h Produces a history of backups. Tells the user when
the last complete and incremental/partial backups
were done.
-p Performs a partial (also know as incremental)
backup. All files modified since the most recent
complete or partial backup are backed up. At least
one complete backup must be done before a partial
backup can be done.
-u Back up a user's home directory. All files in the
user's home directory will be backed up. At least
one user must be specified but it can be more. The
argument must be in quotes if more than one user is
specified. If the user name is all, then all users'
home directories will be backed up.
-w A complete backup. All files changed since the
system was installed are backed up.
Options Available with Extended Backup/Restore
-c week:day | demand
Selects from the backup register only those backup
operations for the specified week and day of the
backup rotation, instead of the current day and week
of the rotation. If demand is specified, selects
only those backup operations scheduled to be
performed on demand.
Copyright 1994 Novell, Inc. Page 3
backup(1M) backup(1M)
-e Displays an estimate of the number of volumes
required to perform each backup operation.
-i Selects interactive operation.
-j jobid Controls only the backup job identified by jobid.
jobid is a backup job ID.
-m user Sends mail to the named user when all backup
operations for the backup job are complete.
-n Displays the set of backup operations that would be
performed but does not actually perform the backup
operations. The display is ordered according to the
dependencies and priorities specified in the backup
register.
-o oname Initiates backup operations only on the named
originating object. oname is an item in the
following form [see bkreg(1M)]:
oname:odevice[:omname]
-p Performs a partial (also know as incremental)
backup. All files modified since the most recent
complete or partial backup are backed up. At least
one complete backup must be done before a partial
backup can be done.
-s Displays a "." for each 100 (512-byte) blocks
transferred to the destination device. The dots are
displayed while each backup operation is
progressing.
-t table Initiates backup operations described in the
specified backup register instead of the default
register (/etc/bkup/bkreg.tab). table is a backup
register.
-u user Controls backup jobs started by the named user
instead of those started by the user invoking the
command. user is a valid login ID.
-v While each backup operation is progressing, display
the name of each file or directory as soon as it has
been transferred to the destination device.
Copyright 1994 Novell, Inc. Page 4
backup(1M) backup(1M)
-A Controls backup jobs for all users instead of those
started by the user invoking the command.
-C Cancels backup jobs.
-R Resumes suspended backup jobs.
-S Suspends backup jobs.
DIAGNOSTICS
The exit codes for the extended backup command are as follows:
0 The task completed successfully.
1 One or more parameters to backup are invalid.
2 An error has occurred which caused backup to fail to
complete all portions of its task.
NOTICES
If a backup or restore is aborted or fails to complete, then
in some cases the devices which were being used may be left
reserved to the original backup or restore process. This may
prevent subsequent backup or restore operations from working.
You can check whether devices are reserved by entering:
devreserv
which reports any reserved devices, with the process id of the
process to which each is attached. To free a reserved device
for reuse, enter:
devfree pid
where pid is the process id reported by devreserv.
If you are doing a restore operation on the UnixWare Desktop,
and are restoring from a Release 1.1 backup onto a Release 2.0
system, you will encounter strange system behavior. Refer to
the Troubleshooting section in the "Installation Handbook" for
complete information.
EXAMPLES
The following examples show several uses of the extended
backup command.
Copyright 1994 Novell, Inc. Page 5
backup(1M) backup(1M)
Example 1:
backup -i -v -c 2:1 -m admin3
Initiates those backups scheduled for Monday of the second
week in the rotation period instead of backups for the current
day and week. Performs the backup in interactive mode and
displays on standard output the name of each file, directory,
file system partition, or data partition as soon as it is
transferred to the destination device. When all backups are
completed, sends mail notification to the user with login ID
admin3.
Example 2:
backup -o /home
Initiates backups from only the usr file system that is
mounted on the home directory and is labeled usr.
Another way to do this is by specifying the originating
device on which the usr file system is mounted (and labeled
usr):
backup -o /dev/rdsk/device_name
where device_name is machine dependent (see intro(7) for
details on device names).
Example 3:
backup -S
Suspends the backup jobs requested by the invoking user.
Example 4:
backup -R -j back-359
Resumes the backup operations included in backup job ID back-
359.
FILES
The following files are used by the basic backup command.
/etc/Backup
/etc/Ignore
The following files are used by the extended backup command.
/etc/bkup/method/*
/etc/bkup/bkreg.tab
/etc/device.tab
/etc/dgroup.tab
Copyright 1994 Novell, Inc. Page 6
backup(1M) backup(1M)
REFERENCES
bkhistory(1M), bkoper(1M), bkreg(1M), bkstatus(1M),
emergency_disk(1M), emergency_rec(1M)
Copyright 1994 Novell, Inc. Page 7