Question: How do the Foxhound backup shortcuts work?
Answer:
The All Programs - Foxhound1 - Tools - Backup Foxhound Database shortcut runs the following command file:
C:\ProgramData\RisingRoad\Foxhound1\$backup_foxhound1.bat
The $backup_foxhound1.bat command file creates a full online backup of both the Foxhound database file foxhound1.db and the transaction log foxhound1.log.
This process can be run even while Foxhound is busy monitoring databases, and the backup files it creates can be used
to restore the Foxhound database after a problem occurs.
Here's how it works:
-
The subfolder C:\ProgramData\RisingRoad\Foxhound1\backup is created if it doesn't exist already.
The subfolder C:\ProgramData\RisingRoad\Foxhound1\backup\generation_temp is removed if it is exists;
if it does exist, it means a previous backup failed, and the contents of this subfolder cannot be trusted.
The subfolder C:\ProgramData\RisingRoad\Foxhound1\backup\generation_temp is created.
This is where the full backup copies of foxhound1.db and foxhound1.log will be written.
This subfolder will be renamed if the backup process is successful.
The Foxhound database is started via dbsrv12.exe if it isn't running already.
All full backups are created as online backups which require the SQL Anywhere engine to be running.
The dbbackup.exe utility is run to create full backup copies of foxhound1.db and foxhound1.log.
The dbbackup -x option is used to delete and restart the online transaction log to control its growth.
If the dbbackup.exe utility worked, the backup subfolders are manipulated as follows:
-
The subfolder C:\ProgramData\RisingRoad\Foxhound1\backup\generation1 is removed if it exists.
generation2 is renamed to generation1 if it exists.
generation3 is renamed to generation2 if it exists.
generation_temp is renamed to generation3.
The All Programs - Foxhound1 - Tools - Backup Foxhound Transaction Log shortcut runs the following command file:
C:\ProgramData\RisingRoad\Foxhound1\$backup_foxhound1_log.bat
The $backup_foxhound1_log.bat command file creates an online incremental backup of the transaction log foxhound1.log and
stores it together with the most recent full backup that was created by the $backup_foxhound1.bat command file.
This process can be run even while Foxhound is busy monitoring databases, and the backup files it creates can be used
to restore the Foxhound database after a problem occurs.
The $backup_foxhound1_log.bat command file may be run multiple times after each run of $backup_foxhound1.bat.
Here's how it works:
-
The subfolder C:\ProgramData\RisingRoad\Foxhound1\backup\generation3 is checked to make sure it exists
and that it contains the foxhound1.db and foxhound1.log file.
If not, the command file displays an error message and stops; there is no point in creating an incremental
backup copy of the transaction log if there is no previous full backup to apply it to.
The subfolder C:\ProgramData\RisingRoad\Foxhound1\backup\generation3\logs is created.
This is where the incremental backup copies of foxhound1.log will be written.
The dbbackup.exe utility is run to create the incremental backup copy of foxhound1.log.
The dbbackup -x option is used to delete and restart the online transaction log to control its growth.
See also...
How do I backup my Foxhound database on a regular basis?
How do I restore the Foxhound database from a backup?
|