mmbackup command

Performs a backup of a GPFS™ file system or independent fileset to a Tivoli® Storage Manager (TSM) server.

Synopsis

mmbackup {Device | Directory} [-t {full | incremental}]
         [-N {Node[,Node...] | NodeFile | NodeClass}]
         [-g GlobalWorkDirectory] [-s LocalWorkDirectory]
         [-S SnapshotName] [-f] [-q] [-v] [-d]
         [-a IscanThreads] [-n DirThreadLevel]
         [-m ExecThreads | [[--expire-threads ExpireThreads] [--backup-threads BackupThreads]]]
         [-B MaxFiles | [[--max-backup-count MaxBackupCount] [--max-expire-count MaxExpireCount]]]
         [--max-backup-size MaxBackupSize] [--qos QosClass] [--quote | --noquote]
         [--rebuild] [--scope {filesystem | inodespace}]
         [--tsm-servers TSMServer[,TSMServer...]]
         [--tsm-errorlog TSMErrorLogFile] [-L n] [-P PolicyFile]

Availability

Available with IBM Spectrum Scale™ Standard Edition or higher. Available on AIX® and Linux.

Description

Use the mmbackup command to back up the user data from a GPFS file system or independent fileset to a TSM server or servers. The mmbackup command can only be used to back up file systems owned by the local cluster.

Attention: In GPFS V4.1 and later, a full backup (-t full) with mmbackup is required if a full backup has never been performed with GPFS 3.3 or later. For more information, see the topic File systems backed up using GPFS 3.2 or earlier versions of mmbackup in the IBM Spectrum Scale: Advanced Administration Guide.

The TSM Backup-Archive client must be installed and at the same version on all the nodes that will be executing the mmbackup command or named in a node specification with -N. For more information about TSM requirements for the mmbackup command, see the topic GPFS port usage in the IBM Spectrum Scale: Advanced Administration Guide.

You can run multiple instances of mmbackup, as long as they are on different file systems.

If you are planning to use Tivoli Storage Manager to back up IBM Spectrum Scale file systems, see the topic Backup considerations for using Tivoli Storage Manager in the IBM Spectrum Scale: Concepts, Planning, and Installation Guide and the topic Configuration reference for using Tivoli Storage Manager with IBM Spectrum Scale in the IBM Spectrum Scale: Administration and Programming Reference.

Parameters

Device
The device name for the file system to be backed up. File system names need not be fully-qualified. fs0 is as acceptable as /dev/fs0.
Directory
Specifies either the mount point of a GPFS file system or the path to an independent fileset root to back up. /gpfs/fs0 can be used to specify the GPFS file system called fs0.
Note: A snapshot directory path is not permitted. To back up a snapshot, use -S SnapshotName instead. Do not use a subdirectory path as this will lead to inconsistent backups.
-t {full | incremental}
Specifies whether to perform a full backup of all of the files in the file system, or an incremental backup of only those files that have changed since the last backup was performed. The default is an incremental backup.

A full backup will expire all GPFS 3.2 format TSM inventory if all previous backups have been incremental and the GPFS 3.2 backup format had been in use previously. If mmbackup on GPFS 3.2 was first used, and then only incremental backups were done on GPFS 3.4 or 3.5, then TSM will still contain 3.2 format backup inventory. This inventory will automatically be marked for expiration by mmbackup after a successful full or incremental backup.

Note: Do not use -t full with an unlinked fileset. Use an EXCLUDE statement to exclude directories or files from the backup operation.
-N {Node[,Node...] | NodeFile | NodeClass}
Specifies the list of nodes that will run parallel instances of the backup process. The TSM Backup-Archive client must be installed on all nodes specified with this parameter. This command supports all defined node classes. The default is to run only on the node where the mmbackup command is running or the current value of the defaultHelperNodes parameter of the mmchconfig command.

For general information on how to specify node names, see Specifying nodes as input to GPFS commands in the IBM Spectrum Scale: Administration and Programming Reference.

-g GlobalWorkDirectory
Specifies the directory to be used for temporary files that need to be shared between the mmbackup worker nodes. Defaults to the value specified with the -s option or /tmp.
-s LocalWorkDirectory
Specifies the local directory to be used for temporary storage during mmbackup command processing. The default directory is /tmp. A LocalWorkDirectory must exist on each node used to run the mmbackup command or specified in a node specification with –N.
-S SnapshotName
Specifies the name of a global snapshot for any backup operations or a fileset-level snapshot if --scope inodespace is also specified for a fileset backup. The snapshot must be created before the mmbackup command is used. Snapshot names can be found with the mmlssnapshot command. If a fileset is not present in the named snapshot and fileset-level backup is invoked with --scope inodespace, an error is returned. If a fileset-level snapshot name is used with a file system backup, an error is returned.

The use of -S SnapshotName is recommended because it provides mmbackup and TSM a consistent view of GPFS from which to perform backup. Deletion of the snapshot used for backup can be performed using the mmdelsnapshot command after mmbackup completes.

-f
Specifies that processing should continue when unlinked filesets are detected. All files that belong to unlinked filesets will be ignored.
Note: Because -f has a large impact on performance, avoid using it unless performing a backup operation with unlinked filesets is absolutely necessary.
-q
Performs a query operation prior to beginning mmbackup. The TSM server may have data stored already that is not recognized as having been backed up by mmbackup and its own shadow database. To properly compute the set of files that currently need to be backed up, mmbackup can perform a TSM query and process the results to update its shadow database. Use the -q switch to perform this query and then immediately commence the requested backup operation.
Note: Do not use -q with the --rebuild parameter.
-v
Specifies verbose message output. Use this flag to cause mmbackup to issue more verbose messages about its processing. See also Environment.
-d
Gathers debugging information that is useful to the IBM® Support Center when diagnosing problems.
-a IscanThreads
Specifies the number of threads and sort pipelines each node will run during parallel inode scan and policy evaluation. The default value is 2.
-n DirThreadLevel
Specifies the number of threads that will be created and dispatched within each mmapplypolicy process during the directory scan phase. The default value is 24.
-m ExecThreads
Specifies the number of threads created and dispatched within each mmapplypolicy process during the policy execution phase. The default value for mmapplypolicy is 24; however, the default value for mmbackup is 1. This option cannot be used in conjunction with the --expire-threads and --backup-threads options.
--expire-threads ExpireThreads
Specifies the number of worker threads permitted on each node to perform dsmc expire tasks in parallel. This option cannot be used in conjunction with the -m option. Valid values are 1 - 32. The default value is 4.
--backup-threads BackupThreads
Specifies the number of worker threads permitted on each node to perform dsmc selective or dsmc incremental tasks in parallel. This option cannot be used in conjunction with the -m option. Valid values are 1 - 32. The default value is 1.
-B MaxFiles
Specifies the maximum number of objects in a bunch for each invocation of the mmapplypolicy EXEC script. If this option is not specified, the ideal bunch count will be automatically computed. Valid values are 100 - 8192.
--max-backup-count MaxBackupCount
Specifies the maximum number of objects in a bunch for each dsmc selective or dsmc incremental command. This option cannot be used in conjunction with the -B option. Valid values are 100 - 8192.
--max-expire-count MaxExpireCount
Specifies the maximum number of objects in a bunch for each dsmc expire command. This option cannot be used in conjunction with the -B option. Valid values are 100 - 8192.
--max-backup-size MaxBackupSize
Specifies a policy limit on the content size in kilobytes for each dsmc selective or dsmc incremental command.
--qos QOSClass
Specifies the Quality of Service for I/O operations (QoS) class to which the instance of the command is assigned. If you do not specify this parameter, the instance of the command is assigned by default to the maintenance QoS class. This parameter has no effect unless the QoS service is enabled. For more information, see the topic mmchqos command in the IBM Spectrum Scale: Administration and Programming Reference. Specify one of the following QoS classes:
maintenance
This QoS class is typically configured to have a smaller share of file system IOPS. Use this class for I/O-intensive, potentially long-running GPFS commands, so that they contribute less to reducing overall file system performance.
other
This QoS class is typically configured to have a larger share of file system IOPS. Use this class for administration commands that are not I/O-intensive.
For more information, see the topic Setting the Quality of Service for I/O operations (QoS) in the IBM Spectrum Scale: Advanced Administration Guide.
--quote | --noquote
Specifies whether to decorate (or not to decorate) file-list entries with quotation marks. The mmbackup command uses file lists to convey the lists of files to the TSM Backup-Archive client program. The file lists may or may not require each file name to be surrounded by quotation marks depending on TSM client configuration options. If certain TSM client configuration options are in use, the quotation marks should not be added to file-list entries. Use the --noquote option in these instances.
--rebuild
Specifies whether to rebuild the mmbackup shadow database from the inventory of the TSM server. This option is similar to the -q option; however, no backup operation proceeds after the shadow database is rebuilt. This option should be used if the shadow database of mmbackup is known to be out of date, but the rebuilding operation must be done at a time when the TSM server is less loaded than during the normal time mmbackup is run.

If there are backup files with the old snapshot name /Device/.snapshots/.mmbuSnapshot in the inventory of the TSM server, those files will be expired from the TSM server after the shadow database is rebuilt and any successful incremental or full backup completes.

Note: Do not use --rebuild with the -q parameter.
--scope {filesystem | inodespace}
Specifies that one of the following traversal scopes be applied to the policy scan and backup candidate selection:
filesystem
Scans all the objects in the file system specified by Device or mounted at the Directory specified. This is the default behavior.
inodespace
Specifies that the scan will be limited in scope to objects in the same single inode space from which the Directory is allocated. The scan might span more than one fileset if those filesets share the same inode space; for example, dependent filesets.
--tsm-servers TSMServer[,TSMServer...]
Specifies the name of the TSM server or servers to be used for this backup. The TSM servers specified will each be used for the backup task specified.

If this option is not specified, the mmbackup command will backup to the servers that are specified in the dsm.sys file.

--tsm-errorlog TSMErrorLogFile
Specifies the pathname of the log file to pass to TSM Backup-Archive client commands
-L n
Controls the level of information displayed by the mmbackup command. Larger values indicate the display of more detailed information. n should be one of the following values:
0
Displays only serious errors. This is the default.
1
Displays some information as the command runs, but not for each file.
2
Displays each chosen file and the scheduled migration or deletion action.
3
Displays the same information as 2, plus each candidate file and the applicable rule.
4
Displays the same information as 3, plus each explicitly EXCLUDEed or LISTed file, and the applicable rule.
5
Displays the same information as 4, plus the attributes of candidate and EXCLUDEed or LISTed files.
6
Displays the same information as 5, plus non-candidate files and their attributes.
-P PolicyFile
Specifies a customized policy rules file for the backup.

Environment

The behavior of mmbackup can be influenced by several environment variables when set.

Variables that apply to TSM Backup-Archive client program dsmc
MMBACKUP_DSMC_MISC
The value of this variable is passed as arguments to dsmc restore and dsmc query {backup,inclexcl,session} commands.
MMBACKUP_DSMC_BACKUP
The value of this variable is passed as arguments to dsmc, dsmc selective, and dsmc incremental commands.
MMBACKUP_DSMC_EXPIRE
The value of this variable is passed as arguments to dsmc expire commands.
Variables that change mmbackup output progress reporting
MMBACKUP_PROGRESS_CONTENT
Controls what progress information is displayed to the user as mmbackup runs. It is a bit field with the following bit meanings:
0x01
Specifies that basic text progress for each server is to be displayed.
0x02
Specifies that additional text progress for phases within each server is to be displayed.
0x04
Specifies that numerical information about files being considered is to be displayed.
MMBACKUP_PROGRESS_INTERVAL
Controls how frequently status callouts are made. The value is the minimum number of seconds between calls to the MMBACKUP_PROGRESS_CALLOUT script or program. It does not affect how frequently messages are displayed, except for the messages of MMBACKUP_PROGRESS_CONTENT category 0x04.
MMBACKUP_PROGRESS_CALLOUT
Specifies the path to a program or script to be called with a formatted argument, as described in the topic MMBACKUP_PROGRESS_CALLOUT environment variable in the IBM Spectrum Scale: Advanced Administration Guide.
Variables that change mmbackup debugging facilities
In case of a failure, certain debugging and data collection can be enabled by setting the specified environment variable value.
DEBUGmmbackup
This variable controls what debugging features are enabled. It is interpreted as a bitmask with the following bit meanings:
0x001
Specifies that basic debug messages are printed to STDOUT. There are multiple components that comprise mmbackup, so the debug message prefixes can vary. Some examples include:
mmbackup:mbackup.sh
DEBUGtsbackup33:
0x002
Specifies that temporary files are to be preserved for later analysis.
0x004
Specifies that all dsmc command output is to be mirrored to STDOUT.
DEBUGmmcmi
This variable controls debugging facilities in the mmbackup helper program mmcmi, which is used when the cluster minReleaseLevel is less than 3.5.0.11.
DEBUGtsbuhelper
This variable controls debugging facilities in the mmbackup helper program tsbuhelper, which is used when the cluster minReleaseLevel is greater than or equal to 3.5.0.11.
Variables that change mmbackup record locations
MMBACKUP_RECORD_ROOT
Specifies an alternate directory name for storing all temporary and permanent records for the backup. The directory name specified must be an existing directory and it cannot contain special characters (for example, a colon, semicolon, blank, tab, or comma).

The directory specified for MMBACKUP_RECORD_ROOT must be accessible from each node specified with the -N option.

Exit status

0
Successful completion. All of the eligible files were backed up.
1
Partially successful completion. Some files, but not all eligible files, were backed up. The shadow database or databases reflect the correct inventory of the TSM server. Invoke mmbackup again to complete the backup of eligible files.
2
A failure occurred that prevented backing up some or all files or recording any progress in the shadow database or databases. Correct any known problems and invoke mmbackup again to complete the backup of eligible files. If some files were backed up, using the -q or --rebuild option can help avoid backing up some files additional times.

Security

You must have root authority to run the mmbackup command.

The node on which the command is issued, as well as all other TSM Backup-Archive client nodes, must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a file system in IBM Spectrum Scale: Administration and Programming Reference.

Examples

  1. To perform an incremental backup of the file system gpfs0, issue this command:
    mmbackup gpfs0
    The system displays information similar to:
    --------------------------------------------------------
    mmbackup: Backup of /gpfs/gpfs0 begins at Mon Apr 7 15:37:50 EDT 2014.
    --------------------------------------------------------
    Mon Apr  7 15:38:04 2014 mmbackup:Scanning file system gpfs0
    Mon Apr  7 15:38:14 2014 mmbackup:Determining file system changes for gpfs0 [balok1].
    Mon Apr  7 15:38:14 2014 mmbackup:changed=364, expired=0, unsupported=0 for server [balok1]
    Mon Apr  7 15:38:14 2014 mmbackup:Sending files to the TSM server [364 changed, 0 expired].
    mmbackup: TSM Summary Information:
            Total number of objects inspected:      364
            Total number of objects backed up:      364
            Total number of objects updated:        0
            Total number of objects rebound:        0
            Total number of objects deleted:        0
            Total number of objects expired:        0
            Total number of objects failed:         0
            Total number of bytes transferred:      2179695902
    ----------------------------------------------------------
    mmbackup: Backup of /gpfs/gpfs0 completed successfully at Mon Apr 7 15:41:09 EDT 2014.
    ----------------------------------------------------------
  2. To recreate a shadow database for gpfs0, issue this command:
    mmbackup gpfs0 --rebuild
    The system displays information similar to:
    --------------------------------------------------------
    mmbackup: Shadow database rebuild of /gpfs/gpfs0 begins at Tue Apr 8 09:44:59 EDT 2014.
    --------------------------------------------------------
    Tue Apr  8 09:45:11 2014 mmbackup:Querying files currently backed up in TSM server:balok1.
    Tue Apr  8 09:45:14 2014 mmbackup:Built query data file from TSM server: balok1 rc = 0
    Tue Apr  8 09:45:17 2014 mmbackup:Scanning file system gpfs0
    Tue Apr  8 09:45:26 2014 mmbackup:Reconstructing previous shadow file /gpfs/gpfs0/.mmbackupShadow.1.balok1 from
     query data for balok1
    Tue Apr  8 09:45:26 2014 mmbackup:Done with shadow file database rebuilds
    ----------------------------------------------------------
    mmbackup: Shadow database rebuild of /gpfs/gpfs0 completed successfully at Tue Apr 8 09:45:26 EDT 2014.
    ----------------------------------------------------------
  3. To perform an incremental backup of the file system gpfs0 with more progress information displayed, first issue this command:
    export MMBACKUP_PROGRESS_CONTENT=3
    Next, issue the mmbackup command:
    mmbackup gpfs0
    The system displays information similar to:
    --------------------------------------------------------
    mmbackup: Backup of /gpfs/gpfs0 begins at Mon Apr 7 16:02:28 EDT 2014.
    --------------------------------------------------------
    Mon Apr  7 16:02:33 2014 mmbackup:Begin checking server and shadow file for balok1
    Mon Apr  7 16:02:37 2014 mmbackup:Querying TSM server balok1 for options
    Mon Apr  7 16:02:40 2014 mmbackup:Found old shadow DB for balok1 present in /gpfs/gpfs0/.mmbackupShadow.1.balok1
    Mon Apr  7 16:02:40 2014 mmbackup:Checking format version of old shadow DB
    Mon Apr  7 16:02:40 2014 mmbackup:Found old shadow DB version: 1400
    Mon Apr  7 16:02:40 2014 mmbackup:Previous shadow /gpfs/gpfs0/.mmbackupShadow.1.balok1 state: present
    Mon Apr  7 16:02:40 2014 mmbackup:Generating policy rules file:/var/mmfs/mmbackup/.mmbackupRules.gpfs0 to
     use /gpfs/gpfs0/.mmbackupCfg/BAexecScript.gpfs0
    Mon Apr  7 16:02:42 2014 mmbackup:Completed policy rule generation.  2 Exclude Dir directives, 1 Exclude File
     directives, 1 Include directives, 0 Warnings.
    Mon Apr  7 16:02:42 2014 mmbackup:Scanning file system gpfs0
    Mon Apr  7 16:02:51 2014 mmbackup:File system scan of gpfs0 is complete.
    Mon Apr  7 16:02:51 2014 mmbackup:Calculating backup and expire lists for server balok1
    Mon Apr  7 16:02:51 2014 mmbackup:Determining file system changes for gpfs0 [balok1].
    Mon Apr  7 16:02:51 2014 mmbackup:changed=364, expired=0, unsupported=0 for server [balok1]
    Mon Apr  7 16:02:51 2014 mmbackup:Finished calculating lists [364 changed, 0 expired] for server balok1.
    Mon Apr  7 16:02:51 2014 mmbackup:Sending files to the TSM server [364 changed, 0 expired].
    Mon Apr  7 16:02:51 2014 mmbackup:Performing backup operations
    Mon Apr  7 16:05:40 2014 mmbackup:Completed policy backup run with 0 policy errors, 0 files failed, 0 severe
     errors, returning rc=0.
    Mon Apr  7 16:05:40 2014 mmbackup:Policy for backup returned 0 Highest TSM error 0
    mmbackup: TSM Summary Information:
            Total number of objects inspected:      364
            Total number of objects backed up:      364
            Total number of objects updated:        0
            Total number of objects rebound:        0
            Total number of objects deleted:        0
            Total number of objects expired:        0
            Total number of objects failed:         0
            Total number of bytes transferred:      2179695902
    Mon Apr  7 16:05:40 2014 mmbackup:analyzing: results from balok1.
    Mon Apr  7 16:05:40 2014 mmbackup:Copying updated shadow file to the TSM server
    Mon Apr  7 16:05:44 2014 mmbackup:Done working with files for TSM Server: balok1.
    Mon Apr  7 16:05:44 2014 mmbackup:Completed backup and expire jobs.
    Mon Apr  7 16:05:44 2014 mmbackup:TSM server balok1
            had 0 failures or excluded paths and returned 0.
            Its shadow database has been updated. Shadow DB state:updated
    Mon Apr  7 16:05:44 2014 mmbackup:Completed successfully.  exit 0
    
    ----------------------------------------------------------
    mmbackup: Backup of /gpfs/gpfs0 completed successfully at Mon Apr 7 16:05:44 EDT 2014.
    ----------------------------------------------------------
  4. To perform an incremental backup of the objects in the inode space of the gpfs/testfs/infs2 directory to the balok1 server, issue this command:
    mmbackup /gpfs/testfs/infs2  -t incremental --scope inodespace  --tsm-servers balok1
    The system displays information similar to:
    --------------------------------------------------------
    mmbackup: Backup of /gpfs/testfs/infs2 begins at Wed May 27 12:58:39 EDT 2015.
    --------------------------------------------------------
    Wed May 27 12:58:48 2015 mmbackup:Scanning fileset testfs.indfs2
    Wed May 27 12:58:53 2015 mmbackup:Determining fileset changes for testfs.indfs2 [balok1].
    Wed May 27 12:58:53 2015 mmbackup:changed=2, expired=2, unsupported=0 for server [balok1]
    Wed May 27 12:58:53 2015 mmbackup:Sending files to the TSM server [2 changed, 2 expired].
    mmbackup: TSM Summary Information:
            Total number of objects inspected:      4
            Total number of objects backed up:      2
            Total number of objects updated:        0
            Total number of objects rebound:        0
            Total number of objects deleted:        0
            Total number of objects expired:        2
            Total number of objects failed:         0
            Total number of objects encrypted:      0
            Total number of bytes inspected:        53934
            Total number of bytes transferred:      53995
    ----------------------------------------------------------
    mmbackup: Backup of /gpfs/testfs/infs2 completed successfully at Wed May 27 12:59:31 EDT 2015.
    ----------------------------------------------------------
  5. To perform an incremental backup of a global snapshot called backupsnap6 to the balok1 server, issue this command:
    mmbackup testfs -t incremental -S backupsnap6 --scope filesystem  --tsm-servers balok1
    The system displays information similar to:
    --------------------------------------------------------
    mmbackup: Backup of /gpfs/testfs begins at Wed May 27 13:08:45 EDT 2015.
    --------------------------------------------------------
    Wed May 27 13:08:50 2015 mmbackup:Scanning file system testfs
    Wed May 27 13:08:53 2015 mmbackup:Determining file system changes for testfs [balok1].
    Wed May 27 13:08:53 2015 mmbackup:changed=130, expired=100, unsupported=0 for server [balok1]
    Wed May 27 13:08:53 2015 mmbackup:Sending files to the TSM server [130 changed, 100 expired].
    
    Wed May 27 13:08:59 2015 mmbackup:Policy for expiry returned 9 Highest TSM error 0
    mmbackup: TSM Summary Information:
            Total number of objects inspected:      230
            Total number of objects backed up:      130
            Total number of objects updated:        0
            Total number of objects rebound:        0
            Total number of objects deleted:        0
            Total number of objects expired:        100
            Total number of objects failed:         0
            Total number of objects encrypted:      0
            Total number of bytes inspected:        151552
            Total number of bytes transferred:      135290
    ----------------------------------------------------------
    mmbackup: Backup of /gpfs/testfs completed successfully at Wed May 27 13:09:05 EDT 2015.
    ----------------------------------------------------------

Location

/usr/lpp/mmfs/bin