BACKUP LOCATION can be executed interactively, embedded in a host language, or dynamically prepared.
location-name | Identifies the location to be backed up. |
path-name | Specifies the parent target directory where backups are stored. Inside this directory, a subdirectory will be created that contains this backup’s contents. This subdirectory’s name is of the form xdbYYYYMMDDHHMMSSnnnnnn, where YYYYMMDDHHMMSS is the time of the backup, and nnnnnn is a relative sequence number. |
INCREMENTAL | Indicates that you want to backup only your log files. Omitting this option results in your log files and your location’s database files being backed up. |
Description
The BACKUP LOCATION command is used for backing up locations (including all associated databases, tables, catalog tables, and log files) to a secure device, such as a file server, or a different disk drive.
This is useful for avoiding losses due to media or machine failure. For instance, if the drive where your XDB location was located becomes inoperable, provided that you have issued a BACKUP LOCATION command that saved the entire contents of that location to another disk you can ROLLFORWARD that backup to recreate the corrupted location.
While the standard BACKUP LOCATION command copies both database and log files, in addition to creating a recovery script (xdbdata.bat), a BACKUP LOCATION INCREMENTAL backs up only the log files for your location.
After performing a standard backup (which is mandatory for all recovery scenarios), which type of backup you perform is up to you. Always performing standard backups takes longer than performing incremental backups but the recovery process from them is much easier and quicker. Performing incremental backups is quicker than performing standard backups but more ROLLFORWARD steps might be necessary to recreate your location.