=head1 NAME

vos backupsys - Creates a backup volume for several read/write volumes

=head1 SYNOPSIS

B<vos backupsys> [B<-prefix> <I<common prefix on volume(s)>>+]
    [B<-server> <I<machine name>>] [B<-partition> <I<partition name>>]
    [B<-exclude>] [B<-xprefix> <I<negative prefix on volume(s)>>+]
    [B<-dryrun>] [B<-cell> <I<cell name>>] [B<-noauth>] [B<-localauth>]
    [B<-verbose>] [B<-help>]

B<vos backups> [B<-pr> <I<common prefix on volume(s)>>+]
    [B<-s> <I<machine name>>] [B<-pa> <I<partition name>>] [B<-e>]
    [B<-x> <I<negative prefix on volume(s)>>+] [B<-d>]
    [B<-c> <I<cell name>>] [B<-n>] [B<-l>] [B<-v>] [B<-h>]

=head1 DESCRIPTION

The B<vos backupsys> command clones each indicated read/write volume to
create a backup version, placing each clone at the same site as its
read/write source version. It assigns each clone the same name as the
read/write source, adding a C<.backup> extension. It assigns the volume ID
number already allocated for the backup version in the Volume Location
Database (VLDB). If a backup version already exists for a given volume,
the new clone replaces it.

To clone every read/write volume listed in the VLDB, omit all of the
command's options. Otherwise, combine the command's options to clone
various groups of volumes. The options use one of two basic criteria to
select volumes: location (the B<-server> and B<-partition> arguments) or
presence in the volume name of one of a set of specified character strings
(the B<-prefix>, B<-exclude>, and B<-xprefix> options).

To clone only volumes that reside on one file server machine, include the
B<-server> argument. To clone only volumes that reside on one partition,
combine the B<-server> and B<-partition> arguments. The B<-partition>
argument can also be used alone to clone volumes that reside on the
indicated partition on every file server machine. These arguments can be
combined with those that select volumes based on their names.

Combine the B<-prefix>, -exclude, and B<-xprefix> options (with or without
the B<-server> and B<-partition> arguments) in the indicated ways to
select volumes based on character strings contained in their names:

=over 4

=item *

To clone every read/write volume at the specified location whose name
includes one of a set of specified character strings (for example, begins
with C<user.> or includes the string C<afs>), use the B<-prefix> argument
or combine the B<-xprefix> and B<-exclude> options.

=item *

To clone every read/write volume at the specified location except those
whose name includes one of a set of specified character strings, use the
B<-xprefix> argument or combine the B<-prefix> and B<-exclude> options.

=item *

To clone every read/write volume at the specified location whose name
includes one of one of a set of specified character strings, except those
whose names include one of a different set of specified character strings,
combine the B<-prefix> and B<-xprefix> arguments. The command creates a
list of all volumes that match the B<-prefix> argument and then removes
from the list the volumes that match the B<-xprefix> argument. For
effective results, the strings specified by the B<-xprefix> argument must
designate a subset of the volumes specified by the B<-prefix> argument.

If the B<-exclude> flag is combined with the B<-prefix> and B<-xprefix>
arguments, the command creates a list of all volumes that do not match the
B<-prefix> argument and then adds to the list any volumes that match the
B<-xprefix> argument. As when the B<-exclude> flag is not used, the result
is effective only if the strings specified by the B<-xprefix> argument
designate a subset of the volumes specified by the B<-prefix> argument.

=back

The B<-prefix> and B<-xprefix> arguments both accept multiple values,
which can be used to define disjoint groups of volumes. Each value can be
one of two types:

=item *

A simple character string, which matches volumes whose name begin with the
string. All characters are interpreted literally (that is, characters that
potentially have special meaning to the command shell, such as the period,
have only their literal meaning).

=item *

A regular expression, which matches volumes whose names contain the
expressions. Place a caret (C<^>) at the beginning of the expression, and
enclose the entire string in single quotes (C<''>). Explaining regular
expressions is outside the scope of this reference page; see the UNIX
manual page for regexp(5) or (for a brief introduction)
L<backup_addvolentry(8)>. As an example, the following expression matches
volumes that have the string C<aix> anywhere in their names:

   -prefix  '^.*aix'

To display a list of the volumes to be cloned, without actually cloning
them, include the B<-dryrun> flag. To display a statement that summarizes
the criteria being used to select volume, include the B<-verbose> flag.

This command can be used to clone a single read/write volume; specify its
complete name as the B<-prefix> argument. However, it is more efficient to
use the B<vos backup> command, which employs a more streamlined technique
for finding a single volume.

=head1 OPTIONS

=over 4

=item B<-prefix> <I<common prefix>>

Specifies one or more simple character strings or regular expressions of
any length; a volume whose name includes the string is placed on the set
of volumes to be cloned. Include field separators (such as periods) if
appropriate. This argument can be combined with any combination of the
B<-server>, B<-partition>, B<-exclude>, and B<-xprefix> options.

=item B<-server> <I<machine name>>

Identifies the file server machine where each read/write source volume
resides. Provide the machine's IP address or its host name (either fully
qualified or using an unambiguous abbreviation). For details, see
L<vos(1)>.

This argument can be combined with any combination of the B<-prefix>,
B<-partition>, B<-exclude>, and B<-xprefix> options.

=item B<-partition> <I<partition name>>

Identifies the partition where each read/write source volume
resides. Provide the partition's complete name with preceding slash (for
example, C</vicepa>) or use one of the three acceptable abbreviated
forms. For details, see L<vos(1)>.

This argument can be combined with any combination of the B<-prefix>,
B<-server>, B<-exclude>, and B<-xprefix> options.

=item B<-exclude>

Reverses the meaning of the B<-prefix> or B<-xprefix> argument. This flag
can be combined with any combination of the B<-prefix>, B<-server>,
B<-partition>, and B<-xprefix> options.

=item B<-xprefix> <I<negative prefix>>

Specifies a simple character string or regular expression of any length; a
volume whose name includes the string is removed from the set of volumes
to be cloned. Include field separators (such as periods) if
appropriate. This argument can be combined with any combination of the
B<-prefix>, B<-server>, B<-partition>, and B<-exclude> options.

=item B<-dryrun>

Displays on the standard output stream a list of the volumes to be cloned,
without actually cloning them.

=item B<-cell> <I<cell name>>

Names the cell in which to run the command. Do not combine this argument
with the B<-localauth> flag. For more details, see L<vos(1)>.

=item B<-noauth>

Assigns the unprivileged identity C<anonymous> to the issuer. Do not
combine this flag with the B<-localauth> flag. For more details, see
L<vos(1)>.

=item B<-localauth>

Constructs a server ticket using a key from the local
F</usr/afs/etc/KeyFile> file. The B<vos> command interpreter presents it
to the Volume Server and Volume Location Server during mutual
authentication. Do not combine this flag with the B<-cell> argument or
B<-noauth> flag. For more details, see L<vos(1)>.

=item B<-verbose>

Produces on the standard output stream a detailed trace of the command's
execution. If this argument is omitted, only warnings and error messages
appear.

=item B<-help>

Prints the online help for this command. All other valid options are
ignored.

=back

=head1 OUTPUT

The command generates the following messages on the standard output stream
to confirm that the operation was successful:

   done
   Total volumes backed up: <number_cloned>; failed to backup: <failures>

If the B<-dryrun> flag is included, a list of the volumes to be backed up
precedes the standard confirmation messages.

If the B<-verbose> flag is included but not the B<-dryrun> flag, the
following messages appear for each volume. The output concludes with the
standard confirmation messages.

   Creating backup volume for <volume_name> on <date/time>
   {Recloning backup volume | Creating a new backup clone} <backup_volumeID> . . .done

If both the B<-dryrun> and B<-verbose> flags are included, the output
begins with a statement summarizing the criteria being used to select the
volumes, followed by a list of the volumes and the standard confirmation
messages. The format of the criteria summary statement depends on which
other options are provided:

=over 4

=item *

If only the B<-prefix> argument is provided, or the B<-xprefix> and
B<-exclude> options are combined:

   Would have backed up volumes which are prefixed with <string> [or <string>] . .

=item *

If only the B<-xprefix> argument is provided, or the B<-prefix> and
B<-exclude> options are combined:

   Would have backed up volumes which are not prefixed with <string> [nor <string>] . .

=item *

If the B<-prefix> and B<-xprefix> arguments are combined:

   Would have backed up volumes which are prefixed with <string> [or <string>] \
      removing those which are prefixed with <x_string> [or <x_string>] . .

=item *

If the B<-prefix>, B<-xprefix>, and B<-exclude> options are provided:

   Would have backed up volumes which are not prefixed with <string> [nor <string>] \
      adding those which are prefixed with <x_string> [or <x_string>] . .

=back

=head1 EXAMPLES

The following example creates a backup version of every read/write volume
listed in the cell's VLDB whose name begins with the string B<user>.

   % vos backupsys -prefix user

The following example, appropriate in the ABC Corporation cell, creates a
backup version of every read/write volume on the file server machine
C<fs3.abc.com>.

   % vos backupsys -server fs3.abc.com

The following example, appropriate in the State University cell, creates a
backup version of every read/write volume on the file server machine
C<db1.stateu.edu> except those whose name includes the string C<temp>.

   % vos backupsys  -server db1.stateu.edu -prefix '^.*temp'

The following example creates a backup version of every volume listed in
the cell's VLDB, excluding those whose names contain the string C<source>,
but including those whose names contain the string C<source.current>.

   % vos backupsys  -prefix '^.*source' -exclude -xprefix '^.*source\.current'

=head1 PRIVILEGE REQUIRED

The issuer must be listed in the F</usr/afs/etc/UserList> file on the
machine specified with the B<-server> argument and on each database server
machine. If the B<-localauth> flag is included, the issuer must instead be
logged on to a server machine as the local superuser C<root>.

=head1 SEE ALSO

L<backup_addvolentry(8)>,
L<vos(1)>,
L<vos_backup(1)>

UNIX manual page for regexp(5)

=head1 COPYRIGHT

IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

This documentation is covered by the IBM Public License Version 1.0.  It was
converted from HTML to POD by software written by Chas Williams and Russ
Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
