Defining and Displaying Volume Sets and Volume Entries

The Backup System handles data at the level of volumes rather than individual files. You must define groups of volumes called volume sets before performing backup operations, by using the backup addvolset command. A volume set name can be up to 31 characters long and can include any character other than the period (.), but avoid using metacharacters that have special meanings to the shell.

After creating a volume set, use the backup addvolentry command to place one or more volume entries in it. They define the volumes that belong to it in terms of their location (file server machine and partition) and name. Use the command's required -server argument to designate the file server machine that houses the volumes of interest and its required -partition argument to designate the partition. Two types of values are acceptable:

For the volume name (the required -volume argument), specify a combination of alphanumeric characters and one or more metacharacters to specify part or all of the volume name with a wildcard. You can use any of the following metacharacters in the volume name field:

.

The period matches any single character.

*

The asterisk matches zero or more instances of the preceding character. Combine it with any other alphanumeric character or metacharacter.

[ ]

Square brackets around a list of characters match a single instance of any of the characters, but no other characters; for example, [abc] matches a single a or b or c, but not d or A. You can combine this expression with the asterisk.

^

The caret, when used as the first character in a square-bracketed set, designates a match with any single character other than the characters that follow it; for example, [^a] matches any single character except lowercase a. You can combine this expression with the asterisk.

\

A backslash preceding any of the metacharacters in this list makes it match its literal value only. For example, the expression \. (backslash and period) matches a single period, \* matches a single asterisk, and \\ matches a single backslash. You can combine such expressions with the asterisk (for example, \.* matches any number of periods).

Perhaps the most common regular expression is the period followed by an asterisk (.*). This expression matches any string of any length, because the period matches any character and the asterisk means any number of that character. As mentioned, it is the only acceptable regular expression in the file server and partition fields of a volume entry. In the volume name field, it can stand alone (in which case it matches every volume listed in the VLDB), or can combine with alphanumeric characters. For example, the string user.*\.backup matches any volume name that begins with the string user and ends with .backup.

Issuing the backup addvolentry command in interactive mode is simplest. If you issue it at the shell prompt, you must surround any string that includes a regular expression with double quotes (" ") so that the shell passes them uninterpreted to the backup command interpreter rather than resolving them.

To define various combinations of volumes, provide the following types of values for the backup addvolentry command's three arguments. The list uses the notation appropriate for interactive mode; if you issue the command at the shell prompt instead, place double quotes around any string that includes a regular expression. To create a volume entry that includes:

As you create volume sets, define groups of volumes you want to dump to the same tape at the same time (for example, weekly or daily) and in the same manner (fully or incrementally). In general, a volume set that includes volumes with similar contents (as indicated by similar names) is more useful than one that includes volumes that share a common location, especially if you often move volumes for load-balancing or space reasons. Most often, then, it is appropriate to use the regular expression .* (period followed by a backslash) for the -server and -partition arguments to the backup addvolentry command.

It is generally more efficient to include a limited number of volumes in a volume entry. Dumps of a volume set that includes a large number of volume can take a long time to complete, increasing the possibility that the operation fails due to a service interruption or outage.

To remove a volume entry from a volume set, use the backup delvolentry command. To remove a volume set and all of its component volume entries from the Backup Database, use the backup delvolset command. To display the volume entries in a volume set, use the backup listvolsets command.

By default, a Backup Database record is created for the new volume set. Sometimes it is convenient to create volume sets without recording them permanently in the Backup Database, for example when using the backup volsetrestore command to restore a group of volumes that were not necessarily backed up together (for further discussion, see Using the backup volsetrestore Command). To create a temporary volume set, include the -temporary flag to the backup addvolset command. A temporary volume set exists only during the lifetime of the current interactive session, so the flag is effective only when used during an interactive session (opened by issuing the backup (interactive) command). You can use the backup delvolset command to delete a temporary volume set before the interactive session ends, if you wish, but as noted it is automatically deleted when you end the session. One advantage of temporary volume sets is that the backup addvolset command, and any backup addvolentry commands subsequently used to add volume entries to it, complete more quickly than for regular volume sets, because you are not creating any Backup Database records.

To create a volume set

  1. Verify that you are authenticated as a user listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. (Optional) Issue the backup command to enter interactive mode. If you are going to define volume entries right away with the backup addvolentry command, this eliminates the need to surround metacharacter expressions with double quotes. You must enter interactive mode if creating a temporary volume set.

       % backup
    
  3. Issue the (backup) addvolset command to create the volume set. You must then issue the (backup) addvolentry command to define volume entries in it.

       backup>  addvolset <volume set name> [-temporary]
    

    where

    addvols

    Is the shortest acceptable abbreviation of addvolset.

    volume set name

    Names the volume set. The name can include no more than 31 characters, cannot include periods, and must be unique within the Backup Database. (A temporary volume set can have the same name as an existing permanent volume set, but this is not recommended because of the confusion it can cause.)

    -temporary

    Creates a temporary volume set, which exists only during the current interactive session.

To add a volume entry to a volume set

  1. Verify that you are authenticated as a user listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. (Optional) Issue the backup command to enter interactive mode if you have not already. This makes it simpler to use metacharacter expressions, because you do not need to surround them with double quotes. If you are adding entries to a temporary volume set, you must already have entered interactive mode before creating the volume set.

       % backup
    
  3. Issue the (backup) addvolentry command to define volume entries in an existing volume set. The Backup System assigns each volume entry an index within the volume set, starting with 1 (one).

       backup> addvolentry  -name <volume set name>  \
                            -server <machine name>  \
                            -partition <partition name>  \
                            -volumes <volume name (regular expression)>
    

    where

    addvole

    Is the shortest acceptable abbreviation of addvolentry.

    -name

    Names the volume set to which to add the volume entry. It must already exist (use the backup addvolset command to create it).

    -server

    Defines the set of one or more file server machines that house the volumes in the volume entry. Provide either one fully-qualified hostname (such as fs1.abc.com) or the metacharacter expression .* (period and asterisk), which matches all machine names in the VLDB.

    -partition

    Defines the set of one or more partitions that house the volumes in the volume entry. Provide either one complete partition name (such as /vicepa) or the metacharacter expression .* (period and asterisk), which matches all partition names.

    -volumes

    Defines the set of one or more volumes included in the volume entry, identifying them by name. This argument can include a combination of alphanumeric characters and one or more of the metacharacter expressions discussed in the introductory material in this section.

To display volume sets and volume entries

  1. Issue the backup listvolsets command to display the volume entries in a specific volume set or all of them. If you are displaying a temporary volume set, you must still be in the interactive session in which you created it.

       % backup listvolsets [<volume set name>]
    

    where

    listv

    Is the shortest acceptable abbreviation of listvolsets.

    volume set name

    Names the volume set to display. Omit this argument to display all defined volume sets.

    The output from the command uses the wildcard notation used when the volume entries were created. The string (temporary) marks a temporary volume set. The following example displays all three of the volume sets defined in a cell's Backup Database, plus a temporary volume set pat+jones created during the current interactive session:

       backup> listv
       Volume set pat+jones (temporary):
         Entry 1: server fs1.abc.com, partition /vicepe, volumes: user.pat.backup
         Entry 2: server fs5.abc.com, partition /viceph, volumes: user.jones.backup
       Volume set user:
         Entry 1: server .*, partition .*, volumes: user.*\.backup
       Volume set sun:
         Entry 1: server .*, partition .*, volumes: sun4x_55\..*
         Entry 2: server .*, partition .*, volumes: sun4x_56\..*
       Volume set rs:
         Entry 1: server .*, partition .*, volumes: rs_aix42\..*
    

To delete a volume set

  1. Verify that you are authenticated as a user listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. Issue the backup delvolset command to delete one or more volume sets and all of the component volume entries in them. If you are deleting a temporary volume set, you must still be in the interactive session in which you created it.

       % backup delvolset <volume set name>+
    

    where

    delvols

    Is the shortest acceptable abbreviation of delvolset.

    volume set name

    Names each volume set to delete.

To delete a volume entry from a volume set

  1. Verify that you are authenticated as a user listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. Issue the backup command to enter interactive mode.

       % backup
    
  3. If the volume set includes more than one volume entry, issue the (backup) listvolsets command to display the index number associated with each one (if there is only one volume entry, its index is 1). For a more detailed description of the command's output, see To display volume sets and volume entries.

       backup> listvolsets <volume set name>
    

    where

    listv

    Is the shortest acceptable abbreviation of listvolsets.

    volume set name

    Names the volume set for which to display volume entries.

  4. Issue the (backup) delvolentry command to delete the volume entry.

       backup> delvolentry <volume set name>  <volume entry index>
    

    where

    delvole

    Is the shortest acceptable abbreviation of delvolentry.

    volume set name

    Names the volume set from which to delete a volume entry.

    volume entry index

    Specifies the index number of the volume entry to delete.