Skip Headers
StorageTek Storage Archive Manager and StorageTek QFS Software Maintenance and Administration Guide
Release 5.4
E42064-02
  Go To Documentation Library
Library
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

6 Backing Up the Configuration and File Systems

During SAM-QFS installation and configuration, you created secure locations for storing recovery point files and copies of the archiver log. You also configured automated processes for creating recovery points, backing up the logs, and protecting the system configuration. These steps provide the core protection for your file systems. But you may also need to take unscheduled protective measures from time to time as well:

This chapter outlines the procedures for collecting, creating, and storing configuration and file-system recovery files on an as-needed basis. It contains three major sections:

Note that this chapter uses the command line interface for all tasks. If you wish to use the SAM-QFS Manager graphical user interface, refer to the online help for detailed procedures.

Backing Up File Systems

This section starts with a brief review of SAM-QFS file system protection, "Understanding Recovery Points and Archive Logs". Then it provides procedures for carrying out the following tasks:

Understanding Recovery Points and Archive Logs

To protect a file system, you need to do two things:

  • You must protect the files that hold your data.

  • You must protect the file system itself, so that you can use, organize, locate, access, and manage your data.

Copying the files from a SAM-QFS file system to backup media protects the data. But if a disk device or RAID group subsequently fails and cannot be recovered, you are left with no easy way to use the backed up data. You have to create a substitute file system, identify each file, determine its proper location within the new file system, ingest it, and recreate lost relationships between the file and the users, applications, and files that depend on it. This kind of recovery is, at best, a daunting and long drawn-out process.

So, for fast, efficient recovery, you have to actively protect both the file-system data and the metadata that make files and archive copies usable. You must make copies of files and you must back up directory paths, inodes, access controls, symbolic links, and pointers to any copies archived on removable media. You protect SAM-QFS file-system metadata by creating recovery points. A recovery point is a compressed file that stores point-in-time copies of the metadata for a specified file system. You protect file-system data in either of two ways. Archiving file systems protect data automatically. They copy files to archival media—tape and/or archival disk volumes—as files are created or modified. To fully protect data, you configure the archiver to make at least two backup file copies, with at least one on removable media. You protect stand-alone (non-archiving) file systems by including the data files in each recovery point file.

In the event of a data loss—anything from accidental deletion of a user file to catastrophic loss of a whole file system—you locate the last recovery point at which the file or file system remained intact and restore the file or file system. To restore an archiving file system, do not need to restore the files to their original locations on disk. You only need to recover the file-system metadata from the recovery point. Once the metadata is in place, the SAM-QFS software will then stage archival copies of the data to disk automatically, as users access the files. To restore a standalone file system, you recover both the metadata and the data files from the recovery point. Recovery points that contain file data can be extremely large and you must restore both the data and the metadata to disk. So recovery can take considerable time.

While a recent recovery point greatly simplifies recovery, it is a point-in-time backup copy. So a recovery point is seldom a complete record of the state of the file system at the time when a failure occurs. Inevitably, at least a few files are created and changed after one recovery point is completed and before the next one is created. You can—and should—minimize this problem by scheduling creation of recovery points frequently and at times when the file system is not in use. But, in practice, scheduling has to be a compromise, because the file system exists to be used.

For this reason, you must also save point-in-time copies of the archiver log file. As each data file is archived, the log file records the volume serial number of the archival media, the archive file, and the path and file name. With this information, you can recover any files that are missing from the recovery point using Solaris or SAM-QFS tar utilities. However, this information is volatile. Like most system logs, the archiver log grows rapidly and must thus be overwritten frequently. If you do not make regular copies to compliment your recovery points, you will not have log information when you need it.

The remainder of this section provides instructions for creating and managing recovery points. It contains the following subsections:

Create a Recovery Point on Demand

Sometimes you may need to capture the metadata from an archiving file system at a point in time outside the normal schedule. Whenever you anticipate potentially disruptive system or facilities maintenance, for example, you can create before and after recovery points to make sure that file systems are protected.

To initiate creation of an unscheduled, on-demand recovery point on demand, proceed as follows:

  1. Log in to the SAM-QFS server host as root.

    root@solaris:~# 
    
  2. Select an independent location where the recovery point will be stored.

    In the example, we create a subdirectory, unscheduled/, under the directory that we created for recovery points when we configured file systems (see the StorageTek Storage Archive Manager and StorageTek QFS Software Installation and Configuration Guide). The /zfs1 file system is remotely located and has no components in common with the SAM-QFS file system:

    root@solaris:~# mkdir /zfs1/samqfs_recovery/unscheduled
    root@solaris:~# 
    
  3. Change to the file system's root directory.

    In the example, we change to the mount-point directory /samqfs:

    root@solaris:~# cd /samqfs
    root@solaris:~# 
    
  4. If you are backing up an archiving file system where the data is copied to removable media, back up the metadata only. Use the command samfsdump -f recovery-point, where recovery-point is the path and file name of the finished recovery point file.

    See the samfsdump man page for additional details. In the example, we create an unscheduled recovery point for the samqfs file system prior to a scheduled, maintenance-related power outage. We create the recovery-point file 20140215pre-outage in the remote directory /zfs1/samqfs_recovery/unscheduled/:

    root@solaris:~# cd /samqfs
    root@solaris:~# samfsdump -f \
    /zfs1/samqfs_recovery/unscheduled/20140215pre-outage
    root@solaris:~# 
    
  5. If you are backing up a standalone file system where data is not copied to removable media, back up both the metadata and the data. Use the command samfsdump -U -f recovery-point, where recovery-point is the path and file name of the finished recovery point file.

    Note that recovery-point files that include data as well as metadata can be extremely large. See the samfsdump man page for additional details. In the example, we create an unscheduled recovery point for the samqfs file system. We create the recovery-point file 20140215pre-outage in the remote directory /zfs1/samqfs_recovery/unscheduled/:

    root@solaris:~# cd /samqfs
    root@solaris:~# samfsdump -f -U \
    /zfs1/samqfs_recovery/unscheduled/20140215pre-outage
    root@solaris:~# 
    
  6. If you are backing up an archiving file system, Back Up the Archiver Log.

  7. Otherwise, depending on the situation, you may also want to Run samexplorer (see Gathering Configuration and Diagnostic Information with samexplorer) and Manually Backup the SAM-QFS Configuration.

Back Up the Archiver Log

While recovery point files contain almost all of the information needed when restoring a file system, they do not hold the metadata for files created or modified after the recovery point was created. Because archiver logs list all of the files that have been archived and their locations on cartridges, archiver logs can be used to recover any files that were archived after the creation of the recovery point. So, if possible, create an unscheduled copy of the archiver log file whenever you create an unscheduled recovery point. Proceed as follows.

  1. Log in to the SAM-QFS server host as root.

    root@solaris:~# 
    
  2. Select an independent location where the backed up archiver log will be stored.

    In the example, we decide to store the log in the same directory as the corresponding unscheduled recovery point that we created above. The /zfs1 file system is remotely located and has no components in common with the SAM-QFS file system:

    root@solaris:~# ls /zfs1/samqfs_recovery/unscheduled
    20140215pre-outage
    root@solaris:~# 
    
  3. Copy the current archiver log to the chosen location and give it a unique name. Use the command cp /var/adm/samqfs.archive.log path/"date +%y%m%d";, where path is the path to the chosen location.

    root@solaris:~# cp /var/adm/samqfs.archive.log \
    /zfs1/samqfs_recovery/unscheduled/20140215pre-outage/"date +%y%m%d".archive.log
    root@solaris:~# 
    
  4. Depending on the situation, you may also want to Run samexplorer (see Gathering Configuration and Diagnostic Information with samexplorer) and Manually Backup the SAM-QFS Configuration.

Backing Up the SAM-QFS Configuration

Whenever you change the SAM-QFS configuration, protect your investment by backing up all modified configuration files and related information. Carry out the following tasks:

Manually Backup the SAM-QFS Configuration

For full redundancy, create a local copy of the configuration files whenever you make significant changes to software, operating systems, or hosts. Proceed as follows:

  1. Log in to the file-system host as root.

    root@solaris:~# 
    
  2. In the subdirectory that holds your backup configuration information, create a subdirectory for manual backup copies of your SAM-QFS configuration. Use the command mkdir mount-point/path, where mount-point is the mount point directory for the selected independent file system and path is the path and name of the chosen directory.

    In the example, we are configuring recovery points for the archiving file system /samqfs. So we have created the directory /zfs1/sam_config/samconfig:

    root@solaris:~# mkdir /zfs1/sam_config/samconfig
    
  3. In the subdirectory that holds manual backup copies of your SAM-QFS configuration, create a subdirectory for the current SAM-QFS configuration. Use the command mkdir mount-point/path/subdirectory, where mount-point is the mount point for the selected independent file system and path/subdirectory is the path and name of the chosen subdirectory.

    In the example, we create a subdirectory in the directory that we created for this purpose during initial configuration, /zfs1/sam_config/samconfig. We use the date to name the subdirectory:

    root@solaris:~# mkdir /zfs1/sam_config/samconfig/20140127
    
  4. Copy the configuration files to another file system.

    /etc/opt/SUNWsamfs/
         mcf
         archiver.cmd
         defaults.conf 
         diskvols.conf 
         hosts.family-set-name
         hosts.family-set-name.local
         preview.cmd
         recycler.cmd
         releaser.cmd
         rft.cmd
         samfs.cmd
         stager.cmd
         inquiry.conf
         samremote                  # SAM-Remote server configuration file
         family-set-name            # SAM-Remote client configuration file
         network-attached-library   # Parameters file
         scripts/*                  # Back up all locally modified files
    /var/opt/SUNWsamfs/
    
  5. Back up all library catalog data, including that maintained by the historian. For each catalog, use the command /opt/SUNWsamfs/sbin/dump_cat -V catalog-file, where catalog-file is the path and name of the catalog file. Redirect the output to dump-file, in a new location.

    In the example, we dump the catalog data for library1 to the file library1cat.dump in a directory on the independent NFS-mounted file system zfs1:

    root@solaris:~# dump_cat -V /var/opt/SUNWsamfs/catalog/library1cat > \ /zfs1/sam_config/20140513/catalogs/library1cat.dump
    
  6. Copy system configuration files that were modified during SAM-QFS installation and configuration. These may include:

    /etc/
         syslog.conf
         system
         vfstab
    /kernel/drv/
         sgen.conf
         samst.conf
         samrd.conf
         sd.conf
         ssd.conf
         st.conf
    /usr/kernel/drv/dst.conf
    
  7. Copy any custom shell scripts and crontab entries that you created as part of the SAM-QFS configuration to the selected subdirectory.

    For example, if you created a crontab entry to manage creation of recovery points, you would save a copy now.

  8. Copy any custom shell scripts and crontab entries that you created as part of the SAM-QFS configuration to the selected subdirectory.

    For example, if you created a crontab entry to manage creation of recovery points, you would save a copy now.

  9. Record the revision level of the currently installed software, including SAM-QFS SAM-QFS, Solaris, and Solaris Cluster (if applicable), and save a copy of the information in a readme file in the chosen subdirectory.

  10. In the chosen subdirectory, save copies of downloaded SAM-QFS SAM-QFS, Solaris, and Solaris Cluster packages so that you can restore the software quickly, should it become necessary.

  11. Next, Run samexplorer.

Gathering Configuration and Diagnostic Information with samexplorer

The samexplorer is a diagnostic tool that captures and reports comprehensive configuration and status information for the SAM-QFS software and file systems. Whenever you make changes to your SAM-QFS configuration, you should run samexplorer and store the resulting report with your backup copies of the configuration files. You should also run samexplorer when you are troubleshooting a problem and whenever you are requested to do so by SAM-QFS support services personnel. Proceed as follows:

Run samexplorer

  1. Log in to the file-system host as root.

  2. In the directory that holds your backup configuration information, create a subdirectory for samexplorer reports. Use the command mkdir mount-point/path, where mount-point is the mount point directory for the selected independent file system and path is the path and name of the chosen directory.

    In the example, we create the new subdirectory in the directory that we created for this purpose during initial configuration, /zfs1/sam_config/. We name the new subdirectory explorer/:

    root@solaris:~# mkdir /zfs1/sam_config/explorer
    
  3. Create the samexplorer report in the selected directory. Use the command samexplorer path/hostname.YYYYMMDD.hhmmz.tar.gz, where path is the path to the chosen directory, hostname is the name of the SAM-QFS file system host, and YYYYMMDD.hhmmz is a date and time stamp.

    The default file name is /tmp/SAMreport.hostname.YYYYMMDD.hhmmz.tar.gz. In the example, we create a report for the host samhost1 dated January 30, 2014, at 4:59 PM Mountain time:

    root@solaris:~# samexplorer \
    /zfs1/sam_config/explorer/samhost1.20140130.1659MST.tar.gz
     
         Report name:     /zfs1/sam_config/explorer/samhost1.20140130.1659MST.tar.gz
         Lines per file:  1000
         Output format:   tar.gz (default) Use -u for unarchived/uncompressed.
     
         Please wait.............................................
         Please wait.............................................
         Please wait......................................
     
         The following files should now be ftp'ed to your support provider
         as ftp type binary.
     
         /zfs1/sam_config/explorer/samhost1.20140130.1659MST.tar.gz
    
  4. Repeat this procedure whenever you significantly reconfigure your file systems.

  5. Stop here. The SAM-QFS configuration is backed up.