Manual pages › System administration commands (1M)
restore(1M)
initiate restores of filesystems, data partitions, or disks
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
Also by this name: restore(1), General commands
NAME
restore - initiate restores of filesystems, data partitions, or disks
SYNOPSIS
restore [-o target] [-d date] [-mn] [-s|v] -P partdev restore [-o target] [-d date] [-mn] [-s|v] -S odevice restore [-o target] [-d date] [-mn] [-s|v] -A partdev
DESCRIPTION
restore posts requests for the restore of a data partition, a filesystem partition, or a disk from system-maintained archives. If the appropriate archive containing the required partition is online, the partition is restored immediately. If not, a request to restore the specified archive of the partition is posted to a restore status table. The restore status table is /etc/bkup/rsstatus.tab. The restore request is assigned a restore jobid that can be used to monitor the progress of the restore or to cancel it. A restore request that has been posted must later be resolved by an operator (see rsoper(1M)). restore may be executed only by a user with superuser privilege. If restore -A partdev is issued, the fdisk(1M) (full disk recovery) method is used to repartition and repopulate disk partdev. partdev is the name of the device that refers to the entire disk. For the AT&T 3B2, it is /dev/rdsk/c1d?s6.
Options
-d date Restores the partition as of date. This may or may not be the latest archive. See getdate(1M) for valid date formats.
-m If the restore cannot be carried out immediately, this option notifies the invoking user (via mail(1M)) when the request has been completed.
-n Displays a list of all archived versions of the object contained in the backup history log, but does not attempt to restore the object.
-o target Instead of restoring directly to the specified
object (partdev or fsdev), this option restores
the archive to target. target is of the form:
[oname][:odev]
where oname is the name of the filesystem to be
restored to (for -S archives) and odev is the name
of the partition to be restored to (for -P and -A
archives).
-s While a restore operation is occurring, displays a ``.'' for each 100 (512-byte) blocks transferred from the destination device.
-v Displays the name of each object as it is restored. Only those archiving methods that restore named directories and files (incfile, ffile) support this option.
-A partdev
Initiates restore of the entire disk partdev.
-P partdev
Initiates restore of the data partition partdev.
-S odevice
Initiates restore of the filesystem partition odevice.
DIAGNOSTICS
The exit codes for restore are the following:
0 = the task completed successfully
1 = one or more parameters to restore are invalid
2 = an error has occurred, causing restore to fail to
complete all portions of its task
EXAMPLES
Example 1:
restore -m -S /usr
posts a request to restore the most current archived version of
/usr. If the restore cannot be carried out immediately, notify
the invoking user when the request has been completed. Example
2:
restore -o /dev/rdsk/c1d0s8 -P /dev/rdsk/c1d1s2
posts a request that the archived data partition /dev/rdsk/c1d1s2
be restored to the target device partition /dev/rdsk/c1d0s8.
Example 3:
restore -d "december 1, 1987" -A /dev/rdsk/c1d0s6
posts a request for the restore of the entire disk
/dev/rdsk/c1d0s6. The restore should be made as of December 1,
1987. Example 4:
restore -n -P /dev/rdsk/c1d0s1
requests the system to display the backup date and an ls -l list-
ing from the backup history log of all archived versions of the
data partition /dev/rdsk/c1d0s1. The data partition is not
restored.
FILES
/etc/bkup/bkhist.tab
lists the labels of all volumes that have been used for backup operations
/etc/bkup/rsstatus.tab
lists the status of all restore requests from users
/etc/bkup/rsnotify.tab
lists the email address of the operator to be notified whenever restore requests require operator intervention
SEE ALSO
fdisk(1M), mail(1M), rsnotify(1M), rsoper(1M), rsstatus(1M), urestore(1M), ursstatus(1M). getdate(3C) in the Programmer's Reference Manual.