BACKUP LOCATION Command

Restriction: This topic applies to Windows environments only.

The BACKUP LOCATION command creates copies of all files that reside in the paths defined for the specified location. If stogroups are used in the location, appropriate files are also copied from all the drives and paths that are defined by the stogroups. If you have special paths defined by environment variables (such as XDB_index-name_location-name or XDBIDX_location-name) in the [Server] topic of your server machine's xdb.ini file, files in most of these paths are also backed up.

You can use the BACKUP LOCATION command only if the location being backed up is not currently in use by you or another user. The BACKUP LOCATION command copies the files to the target device and path you specify. The target directory must not already exist. See the BACKUP LOCATION command in the SQL Reference for more information. This can be a file server or a different hard disk drive. Tape drives and diskettes are not recommended.

The syntax of the BACKUP LOCATION command is:

BACKUP LOCATION location-name TO path-name [ AND INDEX | NOT INDEX ]

The AND INDEX | NOT INDEX parameter is optional. If not specified, AND INDEX is assumed and the system copies all appropriate index files along with the other files. If NOT INDEX is specified, the *.idx and *.ptr files are not copied. If you need to restore a location from a backup that did not include the index files, you will need to rebuild the indexes using the COMPACT LOCATION AND INDEX command.

Note:
  • To avoid confusion, always use a different path for each backup of each location. This will provide an xdbrest.cmd or xdbrest.bat file for each backup of each location.
  • BACKUP LOCATION does not copy files onto multiple diskettes.
Note:
  • If the contents of a location are too large to fit on one diskette, and you do not have an alternate high capacity device, use your operating system's backup command or an equivalent utility instead.
  • Be sure to back up all files in all relevant subdirectories.
  • Reset your log files after backing up a location. See the section Resetting Location Logging for more information.