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.