Saves the contents of the database. It provides a consistent application snapshot across all database regions involved in the backup operation.
The format of the MUPIP BACKUP command is:B[ACKUP][ -BK[UPDBJNL]=DISABLE | OFF -B[YTESTREAM] -C[OMPREHENSIVE] -DA[TABASE] -DBG -I[NCREMENTAL] -NET[TIMEOUT] -[NO]NEWJNLFILES[=[NO]PREVLINK], [NO]S[YNC_IO] -O[NLINE] -REC[ORD] -REPL[ACE] -REPLINSTANCE=target_location -S[INCE]=since-options-list -T[RANSACTION]=hexadecimal_transaction_number ] region-list[,...] destination-list
MUPIP BACKUP supports two methods of database backup--BYTESTREAM and DATABASE. MUPIP BACKUP -BYTESTREAM directs the output to a broad range of devices, including disks, magnetic tapes, TCP sockets and pipes. MUPIP BACKUP -DATABASE directs the output to random access devices (that is, disks).
[NO]ONLINE qualifier determines whether MUPIP BACKUP should suspend updates to regions. For example, MUPIP BACKUP -NOONLINE suspends updates to all regions from the time it starts the first region until it finishes the last region. However, it does not suspend processes that only read from the database.
By default, MUPIP BACKUP is -DATABASE -ONLINE.
If any region name does not map to an existing accessible file, or if any element of the destination list is invalid, BACKUP rejects the command with an error.
region-list may specify more than one region of the current global directory in a list. Regions are separated by a comma, and wildcards can be used to specify them. Any region-name may include the wildcard characters * and % (remember to escape them to protect them from inappropriate expansion by the shell). Any region name expansion occurs in M (ASCII) collation order.
Depending on the type of backup, destination-list may be a single directory, or a comma separated list of destinations including files, piped commands, or TCP sockets.
Region-list and destination-list items are matched in order - the first region is mapped to the first destination, the second to the second destination, and so on. If GT.M encounters a region mapped to a directory, GT.M treats that directory as the destination for all subsequent regions in the region-list.
GT.M implicitly timestamps a BYTESTREAM and DATABASE backup. You can also explicitly specific a RECORD timestamp for custom-control (SANS or mirrored disk) backup protocol. You might want to use these timestamps as reference points for subsequent backups.
$gtm_baktmpdir specifies the directory where mupip backup creates temporary files. If $gtm_baktmpdir is not defined, GT.M uses the $GTM_BAKTMPDIR environment variable if defined, and otherwise uses the current working directory.
When you restrict access to a database file, GT.M propagates those restrictions to shared resources associated with the database file, such as semaphores, shared memory, journals and temporary files used in the course of MUPIP BACKUP.
If you follow separate procedures for backup and archive, you can save time by starting archive as soon as MUPIP BACKUP completes the process of creating a backup database file for a region. You do not need to wait for MUPIP BACKUP to complete processing for all regions before starting archive. For example, a message like:
DB file /home/jdoe/.fis-gtm/V5.5-000_x86/g/gtm.dat backed up in file /backup/gtm.dat Transactions up to 0x0000000000E92E04 are backed up.
confirms that gtm.dat is backed up correctly and is ready for archive.
![]() | |
MUPIP BACKUP protects against overwriting of existing destination files. However, it cannot protect other destinations, for example, if the destination is a pipe into a shell command that overwrites a file. |
$ mupip backup "*" /gtm/bkup
This example creates ready-to-run database backup of all regions.