fsave(ADM)


fsave -- interactive, error-checking filesystem backup

Syntax

fsave filesystem [ backupinfo ] [ mediainfo ] [ sitename ]

Description

fsave is used by fsphoto(ADM) to provide a semi-automated interface to xbackup(ADM) and cpio(C) for backing up filesystems. Operator intervention is required to mount and dismount tapes or floppies at the appropriate times, but is kept to a minimum to reduce the potential for error.

The operator is prompted each time some action is required, such as mounting or unmounting a tape or floppy. These prompts, and their possible selections, are described below.

For all prompts, an answer of h, H, or ? will display a short summary of the possible answers.

Filesystem dump (backup)

The following prompt displays the defaults (gleaned from the schedule database file) and presents options to alter them:
Level dumplevel dump of filesystem filesystem , date
   media size: size feet [or Kb]
   media drive: drive
This media will be saved for howlong, and is howvital.

M)ounted volume, P)ostpone, C)heck or F)ormat volumes, R)etension or H)elp:

The values displayed dictate the following instructions: filesystem is to be backed up using size-foot long magtapes (or size-kilobyte big floppies) mounted on drive drive. The media will be saved for howlong (1 year, 2 months, etc.), and being a level dumplevel dump, is howvital (critical, precautionary, etc.).

The menu options are:


m
A volume of the asked for size has been mounted (write-enabled), so begin the dump.

mnewsize
Insufficient volumes of the originally asked for size are available, so a newsize big volume has been mounted instead. If the dump extends across more than one volume, each volume must be of the same size.

p
Postpone this backup until later (fsphoto will automatically retry this filesystem next time it is run).

c
Recheck the volumes used to back up filesystem for errors. This answer is useful when a dump mysteriously fails and fsave is starting over from the beginning, but the operator doesn't believe there really is a problem (for example, the tape drive was accidentally left offline or the floppy door was left open), and wants to check the volumes again.

f
Format the currently mounted volume (useful mainly for floppies).

r
Retension cartridge tape using tape(C).
If multiple volumes are required, backup will pause for the next volume to be mounted. Be certain to keep track of the volume order.

Format check

The format of ``critical'' volumes is checked using xdumpdir(ADM):
   Check vital volumes for format errors
   M)ounted first volume, S)kip format check, or H)elp:
The menu options are:

m
The first volume has been (or still is) mounted, and dumpdir can now check the volume format.

s
Skip checking the volume format, and continue on to the read error check (below).
The format is not always checked, but when it is, the first volume written must be mounted.

Read error check

All volumes created using xbackup are read using xrestore(ADM), which checks for errors during reading. If an error occurs, the dump is declared unsuccessful and is retried from the beginning.
Check vital volumes for read errors
M)ounted which volume, E)rror on previous volume, D)one, S)kip checks, or H)elp:
The menu options are:

m
The which (``first'' or ``next'') volume has been mounted on the drive and is ready to be checked for read errors.

e
An error occurred on the last volume checked, and the dump should be retried.

d
All volumes have been checked and no errors occurred, so the filesystem has been successfully backed up.

s
Don't bother (skip) checking the rest of the volumes for read errors.
Every volume should be checked for read errors; xrestore requires the volumes to be checked in first-to-last order. Volumes that produce read errors should be marked ``suspect'', discarded, and the dump run once again.

After the backup has been successfully performed, instructions are given on how to label the volumes.

Arguments

fsave is normally run by fsphoto, which passes all the proper arguments based on the schedule(F) database.

filesystem
The filesystem to be backed up.

dumpinfo
A set of blank-separated strings that give some optional information about this backup:

dumplevel size savetime importance marker

Each of these component strings may be quoted and can thus contain spaces.


dumplevel
The level of the dump to be performed. This is a single digit from 0 to 9 (passed to xbackup), or the letter x (which means no backup is to be done). The default is to perform a level 0 backup.

size
The size of the media volumes that should be used. This should be in feet for tapes and kilobytes for floppies. A size of - means to use the first size listed in mediainfo. This is the default.

savetime
How long this backup is to be saved (for example, ``3 months''). Default is ``1 year''.

importance
How important is this backup? (For example, ``critical'' or ``precautionary.'') Those which are ``critical'' have their format checked by xdumpdir. Default is ``important''.

marker
Either ``none'' (the default) or an additional label to place on each volume (for example, ``a pink sticker'').

A typical dumpinfo might look like:

9 1200 "2 weeks" useful "a blue X"
which specifies that a level 9 dump is to be performed on a 1200 foot tape (or 1200KB floppy) which will be saved for 2 weeks and is to be marked with a blue cross (in addition to a more descriptive label). This backup is merely considered ``useful'' and thus will not be checked by xdumpdir.

mediainfo
A set of blank-separated strings that give some optional information about this the media to be used:

drive d density sizes ... [format]
drive k sizes ... [format]


drive
The name of backup device to use. The default is /dev/rmt0.

k sizes ...
If k is specified, drive is assumed to be a floppy, and the list of sizes which follow define the allowable capacities of the floppies that can be used (in kilobytes).

d density sizes ...
Otherwise, d must be specified. In this case, drive is assumed to be a magtape at density BPI, in one of the possible sizes (in feet).

format
The command used to format the tape or floppy so described.

A mediainfo describing 9-track magtape would be:

media /dev/rmt0 d 1600 2400 1200 600
media /dev/rmt2 d 800  1400 1200 600
which specifies that /dev/rmt0 is a 1600 BPI magtape capable of handling 2400, 1200, and 600 foot reels, and that /dev/rmt2 is the 800 BPI device.

A floppy might be described with:

media /dev/fd0 k 1024 format /dev/fd0
which describes device /dev/fd0 as a megabyte (1024KB) floppy formatted by the command:

format /dev/fd0


sitename
Where this backup was made (for example, the name of the company or which building). Note that the uucp(C) nodename from /etc/systemid is automatically placed on the volume labels.

Exit values

A successful backup exits successfully (0), but errors generate a complaint and an exit status of 1. fsave complains about illegal or incorrect arguments, and exits with a status of 2.

If the backup of filesystem is postponed, fsave exits with a status of 3.

Limitations

Only the super user can execute the fsave command.

Files


/etc/systemid
name of this machine

/etc/ddate
xbackup-maintained record of last time each filesystem was backed-up

/dev/tty
always-existent character-special device

See also

basename(C), cpio(C), xdumpdir(ADM), fsphoto(ADM), schedule(F), xbackup(ADM), xrestore(ADM)

Standards conformance

fsave is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005