Posted By: David Faust
So you’ve taken all the cautious steps in backing up your data. c‑treeACE dynamic dumps are a powerful tool in your data integrity arsenal. While silently protecting your data, the important and most crucial step is knowing how to restore that data in the event of catastrophe. At times, you may want that data restored to an alternative destination. c‑treeACE makes this another easy task.
By default, the dynamic dump restore returns files to their original directory. This is due to the fact that file paths are included as part of the filenames in the transaction logs. To change this default behavior, it is possible to “redirect” files to an alternative destination during a dynamic dump restore.
Consider the case where the original files were located on a Windows drive C. However, you restored on drive D. The restore will not find drive D when restoring thus will not copy the files. It appears the files were not recovered, even though the dynamic dump copied the files into the backup stream file. This is a case where the redirect option allows a full recovery.
Another case is where files are referenced by either a full path (from say an ISAM application) and a relative path via the SQL engine. Adding a !REDIRECT keyword enables restored files to be properly placed into the desired location.
The dynamic dump script used during a restore may contain one or more of the following redirection directives:
!REDIRECT <old path> <new path>
Note: To specify an empty string for one of the !REDIRECT arguments use a pair of double quotes (“”).
The !REDIRECT keyword substitutes the <new path> for <old path> when found for all files that are restored. For files referenced with relative paths, leave the <old path> blank and only supply the <new path>
To redirect files from a specific Windows drive to a generic restore location:
!REDIRECT C: ""
To redirect files from a specific original path to an alternative destination path:
!REDIRECT /home/user/bin/ace/sql/data/ /home/user/temp/
To redirect files from a relative reference to a specific location:
!REDIRECT "" /temp/
!REDIRECT ./ctreeSQL.dbs /home/user/temp/ctreeSQL.dbs
Tip: Back up your backup scripts using the dynamic dump! This will ensure you always have your scripts available in case of catastrophic loss of a drive.
FYI – Look for new variations of redirect behavior in automatic recovery and replication options in future releases of c‑treeACE.