skip to main content

Backup options : Online Backup

Online Backup
The Dynamic Dump feature of c-treeRTG provides a safe method of backing up data while the server is operational. An administrator can schedule a dump of specific files, which may be all files necessary for recovery or a subset of them. The dump runs while the server is carrying on normal activity and processing transactions and is transparent to users.
The c-tree server dynamic dump feature relies on a simple plain text file script.This script directs the time, location, and frequency that the backup should occur. Set it once, and the server can continue to make unattended data backups as long as it remains operational.
Here is a simple sample script:
This script schedules a daily dump, starting at 11:00 PM. This backs up all data and index files along with two critical files in the server working directory. The system will wait until 11:01 PM (that is, 60 seconds delay, after the starting time of 11:00 PM) for all active transactions to complete. Then it will abort any transactions still active and begin the actual backup. Remember, the server continues normal operation once the backup process begins.
The dump data will be saved in the file named CTREE.BAK under /mnt/backup. The dynamic dump backup feature defaults to breaking-up the backup file (stream file) into multiple physical files (segments) of 1GB size.
The keyword !PROTECT, without an argument, when added to a dynamic dump script file causes the non-transaction files to be dumped cleanly by suspending any updates while each file is dumped. At this point, the associated index files for a data file are not guaranteed to be consistent with the data file because the files are not dumped at the same time. Updates are only suspended while the data file is being backed up and normal operation is automatically resumed once the file has been backed up. The keyword !FREQ specifies the interval (in hours) between one backup and another; in the above example we want the backup to be peformed once a day.
For more information about dump script file entries, see http://www.faircom.com/doc/ctserver/#8380.htm.
There are two ways to schedule dynamic dumps:
DUMP /home/user1/myscripts/dump.txt
or
Through the dynamic dump utility: ctdump, is a separate utility for the administrator to use at any time while the server is active.
To schedule an ad hoc dynamic dump with ctdump, while the c-tree server is running, run the ctdump utility passing admin credentials, script file name and (optionally) the c-tree server name as command line parameters; e.g.
If the command is successful, the following message is shown:
Once a dynamic dump has completed, files may be used for Dump Recovery and/or Rollback.
Restoring From a Dynamic Dump
In the event of a catastrophic system failure (for example, a hard drive failure) that renders the transaction logs or the actual data files unreadable, it will be necessary to use a dynamic dump file to restore data to a consistent, well defined state. This is known as a dynamic dump recovery. Should you need to restore files from a c-tree server backup, you use the dynamic dump recovery utility, ctrdmp.
The ctrdmp utility provides dynamic dump recovery. This utility is itself a c-tree server so there are important points to observe when running it:
After taking these preliminary steps, do the following to recover a dynamic dump:
1.
Note - The same script file used to perform the dump should be used to restore the dump.
The dump recovery begins automatically and produces a series of messages reporting the progress of the recovery:
If everything is successful, you should see a similar output:
Note - form non-transaction files the following warning is traced "non-transaction file not updated during Dynamic Dump".
For more information about dynamic dump, please refer to the c-tree Administration Guide.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left