The Backup client file indexes contain entries that enable users to browse and recover any files backed up by Backup that have not exceeded their assigned browse policy. The Backup media database managed by the server contains information about where the backed-up data resides. You can query the Backup client file indexes as well as the server's media database to obtain information.
The mminfo program reports information about Backup media and save sets. The default mminfo report displays information about the save sets that completed properly during the last twenty four hours. This report includes; the volume name, client name, creation date, amount of data saved to the volume, level of backup performed and the name of the save set.
See "Examples of mminfo Report Commands" for a list of examples of how to use the mminfo command.
The following example describes the format and options available for the mminfo command:
mminfo [-avV] [-o order] [-s server] [report] [query] [volname...] <report>: [-m | -B | -S | -X | -r reportspecification] <query>: [-c client] [-N name] [-t time] [-q query specification] |
Use the -a option to apply the query to all complete, browsable save sets, not just those in the last 24 hours. This option is implied by the -c, -N, -q, -m, and -o options. When combined with a media-only report (-m or a custom report showing only media information), the -a option applies to all volumes, not just those with complete and browsable save sets.
Use the -B option to produce a list of the bootstraps generated in the previous five weeks. The bootstrap report format is used, with one line of output printed for each matched save set. Each line shows the save date and time, save level, ssid, starting file number, starting record number, and volume.
Use the -c client option to restrict the report information to the media and save sets that pertain to the specified client.
Use the -m option to display a media-only report. This report displays information about each volume contained within the specified Backup server's media database.
Use the -v option concurrently with the -m option to display; the internal volume identifier (volid), the number of the next file to be written and the media type.
Use the -V option concurrently with the -m option to display volume characteristics where:
The d flag, indicates that the volume is currently being written to.
The r flag, indicates that the volume is marked as read-only.
Use the -N saveset-name option to restrict the reported information to the media and save sets pertaining to the specified save set name.
Use the -o order option to sort the output in a specified order. order may be any combination of the letters celmontR, where:
c, client
e, expiration date of the volume
l, length or percentage of space used on the volume
m, media
n, saveset name
o, filename and record number
R, reverse
t, the last time the media was accessed
The default sorting order for a saveset report is mocntl.
Use the -q queryspecification option to add the given query constraint to the list of constraints on the current query. Multiple -q options may be specified, and combined with the shorthand query constraints -c, -N and -t. The syntax of the queryspecification is:
[!] name [comp value] [ , ... ] |
name, is the name of a database attribute, such as "name="hot"name="hot"" Save Set" comp, is a valid comparator for the attribute, from the set ">", ">=","=" value, is the value being compared.
The comparator and value must be specified for all attributes, except flags. If a string contains commas, quote the value using single or double quotes. The following is a valid string comparison:
name="Daily, ""hot"" Save Set" |
Except for multiple character string values, all of the specified constraints must match a given save set and/or media volume. Numeric constraints can be specified by a, and all character string constraints can be specified by multiple possible values. For example:
%used>20,%used<80 client=mars,client=saturn |
Refer to the CUSTOM QUERIES AND REPORTS section in the mminfo(1m) man page for further information on the syntax to use for the query specification.
Use the -r reportspecification option to specify how a report is displayed. Specify the media and save set attributes to be displayed, order of the columns, column widths, and line breaks. The syntax of a reportspecification is:
name [(width)] [, name [(width)]...]
name, is the name of a database attribute
width, specifies how wide the column should be
Use the -s server option to display volume and save set information from the specified Backup server. The default value for server is the current system.
Use the -t time option to restrict the reported information to the media and/or save sets pertaining to the save sets created on or after time. Refer to the nsr_getdate(3) man page for a description of the recognized time formats. The default value for time is "yesterday."
Use the -v option to enable verbose display reports that include:
aborted completed purged and incomplete save sets
creation time
internal save set identifier (ssid),
An indicator of which portion of a save set resides on a volume.
c, the entire saveset is contained on this volume.
h, the head of the saveset is contained on this volume.
m, a middle section of the saveset is contained on this volume.
t, a tail section of a spanning save set is contained on this volume.
status of a save set, as indicated by:
b, the save set is browsable with the recover command.
r, the save set is recoverable with the scanner command.
E, the save set has been marked eligible for recycling and may be over-written at any time.
S, the save set was scanned, or rolled in. Rolled in save sets are not subject to the standard index management procedures and will remain in the file index until the user manually purges the save set.
a, the save was aborted before completion. Aborted save sets are removed from the on-line file index by nsrck.
i, the save is still in progress.
Use the -S option to display a long, multi-line save set report for debugging. Each attribute of a save set is displayed in one of the following formats:
name=value client:name |
The first line of each multi-line group starts on the left margin and includes the save set identifier (ssid), save time, client and save set names. Subsequent lines for this save set are indented. The next line displays the level, the save set flags, the save set size, the number of files within the save set, and the save set expiration date. Extended attributes, clones and instances of the save set are displayed on the lines that follow.
Use the -V option to display a more verbose report than that obtained through the use of the -v option.
The first line includes:
the size of each portion of a save set contained on this volume.
the creation date and time
The second line contains the following information:
the save time in seconds since 00:00:00 GMT, Jan 1, 1970
the internal save set identifier (ssid)
the offset of the first and last bytes of the save set contained within section
the media file number
the first record within the media file containing data for this save set
the internal volume identifier (volid)
the total size of the save set
the flag, indicating which part of the save set is contained in this media file (c, h, m, or t)
save set's status (b, r, a, or i).
Use the -X option to prepare a save set summary report. This summary report breaks the save sets down into several overlapping categories:
the number of each level backup by type, performed on a save set.
the number of archived, migrated, empty and purged save sets.
the number of index save sets.
the number of incomplete save sets.
For recent usage, weekly and monthly summaries displayed, including the following information:
the number of files saved in the time interval specified
the number of save sets
the total size, and average size per save set
the average size per file
the percentage of the amount saved for incrementals v.s. fulls
The following examples provide a guideline for you to follow when you create your own customized queries. Shortened syntax, wherever acceptable, is shown.
To display all the information about all the volumes managed by the server:
mminfo -m |
To display media information from volumes that are labeled mars.001 and mars.002:
mminfo -m mars.001 mars.002 |
To display all save sets found in the file indexes named /usr:
mminfo -N /usr |
To display save sets named /usr, generated by a client named venus, backed up in the past week:
mminfo -N /usr -c venus |
To display save sets named /usr, generated by a client named venus, on a volume that is labeled mars.001:
mminfo -N /usr -c venus mars.001 |
To display a media report of all volumes written on in the past week:
mminfo -m -t `last week' |
To display a media report of all non-full volumes, showing the percent used, pool name, and location of each volume:
mminfo -a -r `volume,%used,pool,location' -q `!full' |
To display a media report similar to the -m report that shows the barcode instead of the volume label:
mminfo -a -r \ `state,barcode,written,%used,read,space,volexp' \ -r`mounts(5),space(2),capacity' |
To display a verbose list of the instances of all save sets with more than one copy, sorted by save time and client name:
mminfo -otc -v -q `copies>1' |
To display all archive save sets with an annotation of "my project" for the past four months:
mminfo -q'annotation=my project' \ -r"volume,client,savetime,sumsize,ssid,name,annotation" \ -t'four months ago' |
The mmlocate program accesses and manages the volume location information contained in the media database. Any user can use this command with the -l (default) or -L options. The -c, -d and -u options are limited to Backup administrators. Running mmlocate without any arguments lists all volumes and their locations for the specified server. (If you do not specify a server, the current host is used.)
If you use the nsrjb command to move a volume inside a jukebox, the location of a volume is set to the name of the jukebox.
The following example describes the format and options available for the mmlocate program:
mmlocate [-s server] [-l] [-n volume-name | -i volumeID | location] mmlocate [-s server] -L mmlocate [-s server] -d location mmlocate [-s server] -c {-n volume-name | -i volumeID} mmlocate [-s server] -u {-n volume-name | -i volumeID} location |
Use the -a option to apply the query to all complete, browsable save sets, not just those in the last 24 hours. This option is implied by the -c, -N, -q, -m, and -o options. When combined with a media-only report (-m or a custom report showing only media information), the -a option applies to all volumes, not just those with complete and browsable save sets.
Use the -c option to clear the location field for the specified volume.
Use the -d location option to delete all volumes that show the given location. You receive a confirmation prompt prior to the deletion of each volume.
Use the -i volid option to restrict the mmlocate operation to the specified volume ID.
Use the -l query option to perform a database query using the supplied volume name, volume ID, or location. If you list the -l option without specific query requests, volumes without a set location are displayed.
Use the -L option to list all locations found in the database.
Use the -n volname option to restrict the operation to the volume name listed.
Use the -s server option to access the server's media database.
Use the -u option to update the location for a volume. Locations are limited to a maximum length of 64 characters. You must also specify the -n volname or -i volid options and specify a location.
The mmpool program accesses pool information stored in the Backup server's media database. You can also use the command to delete all the volumes in a particular pool. If you specify one or more volume names with the mmpool program, the report shows the pool to which each named volume belongs. By default, all volumes and their pools are displayed.
You cannot change the pool to which a volume belongs without relabeling the volume, which destroys all data stored on the volume. Pools are configured through a Backup administration tool, such as nwadmin or nsradmin. Use the administration tool to create and modify unique pools (see "NSR pool ").
The following examples describe the format and options available for the mmpool program:
mmpool [-s server] [volume...] mmpool [-s server] -d pool-name mmpool [-s server] -l [pool-name] mmpool [-s server] -L |
Use the -d pool-name option to delete all volumes for the given pool. You are prompted for deletion of each volume.
Use the -l pool-name option to list all volumes and the pools to which they belong. If you specify a pool, mmpool only lists the volumes in that pool.
Use the -L option to list the names of all of the pool resources configured on the server.
Use the -s server option to specify the Backup server to act on. Refer to the nsr(1m) man page for a description of server selection.
The mmrecov program recovers a Backup server's online file index and media database from backup volumes when either of the files is lost or damaged. Note that this command overwrites the server's existing online file index and media database. The mmrecov program is not used to recover Backup clients' client file indexes; you can use normal recover procedures for this purpose.
You must fully install and correctly configure the Backup server software and run a backup that includes the server's file index and media database before using the mmrecov program for the first time. If any of the Backup software is lost, reinstall the software from the distribution files before you run mmrecov. Use the same release of Backup, and install it in the same location as it was before the software was lost.
After you start the mmrecov program, the program prompts for the device from which the bootstrap save set will be extracted. Then, it asks for the bootstrap ssid. This number is found in the fourth column (labeled ssid) of the last line of the bootstrap report printed each time you run the savegrp program. Refer to the mmrecov(1m) man page for an example of the bootstrap report.
The mmrecov program works in two phases. First, it extracts the contents of the bootstrap save set, which contains the media database and online file index. The online file index contains only one entry: for itself. In the second phase, the mmrecov program runs the recover program to completely recover the server's online file index. The final phase is performed in the background, so that you can respond to subsequent media mount requests.
The following example describes the format and options available for the mmrecov program:
mmrecov [-q | -v] |
Use the -q option to run mmrecov in quiet mode, which only displays error messages encountered.
Use the -v option to run mmrecov in verbose mode, which displays more detail about the program's status as it is executed.
The nsrck program checks the consistency of the Backup online index of clients' save sets.
Use the nsrck to check the consistency of the Backup client file indexes. Typically, the nsrck program is automatically started by the nsrindexdstartup. The .nsrck file is locked upon program execution; therefore, only one instance of nsrck can run on the server.
You can restart the nsrck program at any time during its execution. Therefore, it can survive system crashes or exhaustion of resources without losing data.
Index consistency checking is done in up to four phases:
Phase zero determines whether a client's index requires further investigation. This phase checks the internal state of the index and, if that state is consistent, avoids further passes. Phase zero also reports index names that appear to be suspicious (for example, indexes whose names do not map to valid network addresses).
Phase one fixes any errors found in the database record file, db, and rebuilds the b-tree indexes for the database, if necessary.
If you specify the -X option, nsrck invokes phase two, which cross-checks the client file index with the media database. Records that do not have existing, browsable save set entries are deleted.
If the database requires compression, either due to space freed by the previous phases or due to a state flagged by a previous run, the index is compressed during phase three.
Index compression is a two- or three-step process. First, the records of the database are copied to a temporary database, db.CMP. When that operation is completed, a flag file, db.SVC, is created; the old, uncompressed database is removed; and the compressed database is renamed to db. Finally, the db.SVC file is removed. If there is not enough room on the filesystem containing the db file to include the temporary database also, nsrck creates a temporary file on another writable filesystem. It stores a pointer to this file in a file named db.PTR. In this case, an extra copy of the data is required, because the uncompressed database must first be removed before the data can be copied back to the correct place. After all these steps are completed, the db.PTR file is removed.
The following example describes the format and options available for the nsrck program:
nsrck [-qM] | [-T tempdir] [-X [-x percent] | -C | -F | -m] [clientname...] |
Use the -C option to force index compression on the named clients, or all clients if none are specified. Other phases of checking are only performed if an error in a database is detected.
Use the -F option to force a check on the listed client names. If no names are given, forced checks are performed for all client indexes. This option forces all phases of index checking. For backward compatibility, the -F option implies index compression, and may be used to force the index to be compressed. This option is typically only necessary when the browse policy is reduced (for example, if the browse policy is changed from 1 year to 6 months). See "NSR policy " for information on the policy resource.
Use the -M option to use the nsrck program in master mode (not advised for manual operation). This option advises nsrck that nsrd or another Backup daemon invoked nsrck and logs messages with timestamps, as well as performs any other behavior expected by nsrd.
Use the -m option to force nsrck to check and rebuild the media database b-tree indexes, instead of checking a client's online file index.
Use the -q option to use nsrck in quiet mode. Quiet mode suppresses all advisory messages.
Use the -T option to specify the directory for nsrck to use to hold the temporary database during compression, if there is not enough room in the filesystem containing the db file. If you use this option and there is insufficient space in the specified temporary directory, the nsrck program fails. This argument is ignored if there is sufficient space in the filesystem containing the db file.
Use the -X option to tell nsrck to cross-check the ssids in the index records with save sets found in the media database instead of checking the index databases (unless an error in phase zero occurs). Records that do not correspond to media save sets are discarded. If specific clients are listed, the cross-check is limited to those client indexes.
Use the -x option to compress a database after it has been cross-checked, if the database uses less than the specified percent of the UNIXfile. The unused pages are returned back to the filesystem. The default percentage for the -x option is 30.
The nsrim program manages the Backup server's client file indexes and media database. Typically, the nsrim program is run automatically by the nsrmmdbd daemon when a scheduled backup starts, by the savegrp program upon completion of the backup, and by nsrd as a result of selecting the option to remove the oldest index cycle. Ordinarily, you should not run the nsrim program manually.
The nsrim program accesses the defined policies to determine how to manage each client's file index. Entries that have existed in the index longer than the period specified by the client's defined browse policy are removed from the client's file index. Save sets that have existed in the media database longer than the period specified by the client's defined retention policy are marked as recyclable in the media database. When all of the save sets contained on a single volume are marked recyclable, the volume itself is considered recyclable. Recyclable volumes may be selected and, in the case of volumes managed by an autochanger, automatically relabeled for use by Backup when a writable volume is requested for another backup. After you relabel the recycled volume, the data once contained on it is destroyed. Until you relabel the volume, you can still use the scanner program to recover the save sets. See "scanner " for information on how to use the scanner program.
The following example describes the format and options available for the nsrim program:
nsrim [-b browse] [-c client] [-N saveset] [- r retention] [-x percent] [-lnqvMX] |
Use the -b browse option to use the policy specified by browse instead of the browse policy defined in the client's resource. This option is useful when combined with the -n option to determine the potential effect of a modified policy on the client file indexes.
Use the -c client option to process only the client file index for the client specified. If you do not specify this option, all the client file indexes managed by the Backup server are processed. You can repeat multiple -c client options on the same command-line.
Use the -l option to remove the oldest level full save and all save sets that depend on it from the client file index. This option is only acted on if there is more than one cycle of the save set in the client file index. This option ignores the browse and retention policies assigned to the client's resource. The save set's header information prints out the number of browsable full cycles that are currently maintained in the client file index. This option ignores any archive or migration save sets contained in the index. Manual save set entries are treated as if they were run as an incremental level save set. The -l option sets the utilization threshold to 30 percent.
Use the -M option to use the nsrim program in master mode (which is not advised for manual operation). This option advises nsrim that nsrd or another Backup daemon invoked nsrim, and logs messages with timestamps, as well as performs any other behavior expected by nsrd.
Use the -N saveset option to process only the named saveset; all other save sets encountered are skipped. This option may be repeated multiple times on the same command line.
Use the -q option to run nsrim in quiet mode. This option omits the generation of header, trailer, or save set messages.
Use the -r retention option to instruct nsrim to use the policy specified for retention rather than the retention policy defined by the client's resource. This option is useful when combined with the -n option to determine the potential effect of a modified policy on the client file indexes.
Use the -x percent option to set the utilization threshold. If, after removing entries, a client file index's utilization is less than the specified amount, the value of percent is passed to nsrindexd when a cross-check is requested. The default value of percent is 50. If you specify either the -X or -l options, the utilization threshold changes to 30 percent.
Use the -v option to run nsrim in verbose mode. This option may produce an especially large amount of output. If you specify both the -q and -v option together, the options cancel out each other's effect.
Use the -X option to check the consistency of the save set data structures with the volume data structures. The only time you would need this option is if a Backup were to crash occur. This option sets the utilization threshold to 30 percent.
Refer to the nsrim(1m) man page for further details and a list of the most common error messages encountered.
The nsrinfo program generates reports about the contents of a client's file index. The Backup client name is required; if you provide no further options, the nsrinfo program produces a report of all the names of the files and objects, one per line, found in the backup namespace for the specified client. The nsrinfo program can also generate reports for a specific client file index namespace, either for all the namespaces at once, or for a particular XBSA (X-Open Backup Services) application. The report can be restricted to a single time period, called the savetime, which is the time the entry was entered into the client file index.
If you do not specify the -L option, you must be listed on the Backup server's Administrators list to use the nsrinfo program. If you do specify the -L option, you must be the system administrator (for example, root on a UNIX system).
The following example describes the format and options available for the nsrinfo program:
nsrinfo [-vV] [-s server | -L] [-n namespace] [- N filename] [-t time] [-X application] client |
The required client specification determines the client that the nsrinfo program is reporting on.
Use the -L option to open the client file index directly without using the Backup server. This option is useful for debugging or to query the client file index when Backup is not running.
Use the -n namespace option to specify a client file index namespace to query. By default, the backup namespace is queried. The other values recognized by the nsrinfo program are migrated, archive (reserved for future use), nsr, informix, and all.
Use the -N filename option to specify an exact filename to search for in the client file index. Only index entries that are an exact match to the specified filename are printed. For some client systems (for example, NetWare), the filename stored in the client file index is often not made up of printable ASCII characters, which limits the use of this option.
Use the -t time option to restrict the nsrinfo query to a single, exact save time. The value of time may be expressed in any of the Backup Backup formats. Every save set created by Backup is assigned a unique save time. You can determine the save time by using the mminfo program (see "mminfo " for information).
Use the -v option to instruct nsrinfo to run in verbose mode. In addition to the filename, this option displays the type of the file, any internal file index identifier designated, its size (UNIX files only), and its save time. You can combine this option with the -V option.
Use the -V option to instruct nsrinfo to run in alternate verbose mode. In addition to the file name, this option displays the offset within the save set that contains the file, its size within the save set, the application namespace, and its save time. You can combine this option with the -v option.
Use the -s server option to define the name of the Backup server that nsrinfo should query. By default, the server on the local system is queried.
Use the -X application-type option to restrict the query to a list of information for a specific X/Open Backup Services (XBSA) application. Valid application types are All, Informix, and None. The expected value for application-type is not case-sensitive.
Refer to the nsrinfo(1m) man page for a full description of the valid values for namespace, the file types encountered in the client file indexes, an example of how nsrinfo is used, and a listing of common error messages encountered.
The nsrls program, when invoked without any options, prints the number of files in client file index, the number of kilobytes that the client file index currently requires, and the utilization of the client file index with respect to the number of kilobytes allocated to its UNIXfile.
The following example describes the format and options available for the nsrls program:
nsrls [client-name...] nsrls -f file-name... |
Use the client-name option to specify a particular Backup client file index to examine. By default, the current system is considered to be the client you want to examine indexes for.
Use the -f file-name option to instruct nsrls to take a list of file names rather than a list of Backup client names. For each legitimate index file named, the nsrls program prints an internal volume ID number and the filename, then a statistics banner, followed by the statistics associated with each internal file in the index. Each internal file has the following statistics associated with it: an internal file ID (Fid), the number of kilobytes that the file consumes (Kbytes), the number of logical records in the file (Count), and a descriptive name for the internal file (Name). Refer to the nsrls(1m) man page for a full description of the internal files.