Database Backup

DYNAMIC_DUMP_DEFER

DYNAMIC_DUMP_DEFER <milliseconds>

When a dynamic dump runs, the disk read and write operations of the backup process can slow the performance of other database operations. This option allows an administrator to reduce the performance impact of the dynamic dump.

milliseconds is the time that the dynamic dump thread will sleep after each write of a 64KB block of data to the dump backup file.

An application developer can also use the c-tree ctSETCFG() API function to set the DYNAMIC_DUMP_DEFER value. For example, the following call specifies a 10-millisecond DYNAMIC_DUMP_DEFER time:

  • ctSETCFG( setcfgDYNAMIC_DUMP_DEFER, "10" );

The DYNAMIC_DUMP_DEFER value set by a call to ctSETCFG() takes effect immediately, so this API call can be used by administrators to adjust the speed of a running dynamic dump depending on the amount of other database activity.

Note: The maximum allowed DYNAMIC_DUMP_DEFER time is 5000 milliseconds, set at compile-time. If a value is specified that exceeds this limit, the DYNAMIC_DUMP_DEFER time is set to DYNAMIC_DUMP_DEFER_MAX.

The FairCom DB Administrator utility, ctadmn, was also updated to support the dump sleep time option to change this value at run time. The "Change Server Settings" menu is available from the main menu of the ctadmn utility.

See Also

 

DYNAMIC_DUMP_DEFER_INTERVAL

DYNAMIC_DUMP_DEFER_INTERVAL <blocks>

<blocks> specifies the number of 64 KB blocks that are written before the DYNAMIC_DUMP_DEFER sleep is performed.

The DYNAMIC_DUMP_DEFER option causes the dynamic dump to pause for the specified number of milliseconds each time it writes 64 KB of data to the dynamic dump stream file. For large backups, even the smallest DYNAMIC_DUMP_DEFER value of 1 millisecond adds significant time to the dynamic dump. For example, 100 GB = 1600000 * 1 ms. = 1600 seconds of additional time.

Note: If a value greater than 5000 is specified for DYNAMIC_DUMP_DEFER_INTERVAL, the value is set to 5000. If a value less than 1 is specified, the value is set to 1.

This option can be set by the ctSETCFG() API function. A new menu option to set this value has been added to option 10 of the FairCom DB Server Administration (ctadmn) menu.

Example

DYNAMIC_DUMP_DEFER_INTERVAL 16 

Causes the DYNAMIC_DUMP_DEFER sleep to occur after every 64 KB * 16 = 1 MB of data written to the dump stream file.

 

DYNAMIC_DUMP_SYNC_INTERVAL

To reduce the amount of cache the file system devotes to the dynamic dump file, a server configuration keyword allows specifying a periodic file sync operation on the backup generated by dynamic dump approximately every <size> bytes written.

DYNAMIC_DUMP_SYNC_INTERVAL <size> [<scale>] 

  • <size> must be less than 4GB. Default size is 0, which results in no explicit sync calls on the backup file. The minimum <size> is 1 MB. Non-zero values less than 1MB are increased to 1MB.

This value can be changed at runtime using menu option 10 in the ctadmn command-line utility.

 

PERMIT_NONTRAN_DUMP

PERMIT_NONTRAN_DUMP < YES | NO >

Improves backup performance by skipping non-transaction files and pre-image files during a dynamic dump.

Default: YES

When set to NO, non-transaction files and pre-image files are skipped during a dynamic dump even if they are included in the !FILES section of the dynamic dump configuration script. The exception is if PREIMAGE_DUMP is set to YES, then pre-image files continue to be included in the dump.

 

PREIMAGE_DUMP

PREIMAGE_DUMP <YES | NO>

When enabled, all PREIMG files, even those not in a dynamic dump, are temporarily changed to TRNLOG files to be compatible with the upgraded transactions, and all transactions are automatically changed from PREIMG mode to TRNLOG mode during the dump. PREIMG files opened or created in the middle of the dump are also temporarily promoted from PREIMG files to TRNLOG files. All promoted files are restored to their PREIMG status at the conclusion of the dynamic dump.

The dynamic dump script file accepts a !DELAY parameter whose argument is the number of seconds to wait for a transaction to complete before aborting it in order to permit the start of a dynamic dump. When the PREIMAGE_DUMP facility is used, the !DELAY parameter is effectively ignored if a long PREIMG transaction begins prior to the dynamic dump. This means the dump will not begin until all current transactions complete. See Dynamic Dump and Advanced - Faster Auto-Recovery for additional information.

Default: NO

See Also

AUTO_PREIMG

AUTO_TRNLOG

AUTO_TRNLOG_LIGHT

DIAGNOSTICS AUTO_TRNLOG_CHECKLOCK

DIAGNOSTICS AUTO_PREIMG_CHECKLOCK

DIAGNOSTICS AUTO_TRNLOG_CHECKREAD

DIAGNOSTICS AUTO_PREIMG_CHECKREAD

 

VSS_WRITER

VSS_WRITER YES

With this option enabled, FairCom DB loads the Volume Shadow Copy Service (VSS) writer DLL (c-treeACEVSSWriter.dll) and initializes the VSS writer when the server starts. A FULL CONSISTENCY VSS backup of FairCom database files will be created, which is comparable to cleanly shutting down the FairCom server and then backing up all files.

For application files that are under full transaction control, a FULL CONSISTENCY VSS backup is more time-consuming and invasive than strictly required. Application files with the ctTRNLOG property are under full transaction control. If full transaction controlled files and the database transaction logs (L*.FCS and S0*.FCS) are included in backups, a normal database automatic recovery takes place at startup and will properly restore CRASH CONSISTENT backed up data. Do NOT enable VSS_WRITER YES in ctsrvr.cfg, on application files that are under full transaction control.

Note: VSS backups require the Volume Shadow Copy service to be running. If this Windows service is set to start manually or is off by default, it needs to be started before VSS backup will work.

The following message is logged in CTSTATUS.FCS indicating the VSS writer has been started:

Mon Sep 13 14:11:27 2010

 - User# 00001 VSS Init: Successfully started the VSS writer.

If you run the command “vssadmin list writers” on a machine with FairCom DB Server running and a properly configured VSS, the list should include c‑treeACEVSSWriter.

Compatibility Notes

  • The FairCom VSS writer is compatible with the backup utilities provided in the server versions of Windows.
  • The Windows backup software provided in desktop versions of Windows (the Enterprise edition of Windows 7 and Windows 8) is not a VSS-compatible backup provider and therefore will not work with the FairCom VSS writer.
  • Windows Server backup (2008 & 2012) is a VSS provider and works with the FairCom VSS writer.
  • Acronis Backup has been tested on Windows 7 (both 32-bit and 64-bit) and works correctly with the FairCom VSS writer when configured with ctsrvr.dds.
  • The Novastor backup utility has been tested on non-server versions of Windows and works correctly with the FairCom VSS writer when configured with ctsrvr.dds.
  • Other third-party backup utilities may work with the FairCom VSS writer if they are VSS-compatible backup providers. Please check with the manufacturer of your backup utility for information about VSS compatibility.

User Permissions

FairCom VSS Writer is intended to be run by users with Administrator permissions. To avoid permission issues when running the VSS Writer with a user that is not an Administrator, you must perform the following operations on the Windows registry:

  1. Run the Windows regedit command.
  2. Browse to find the Key: HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services>VSS>VssAccessControl
  3. Insert a new REG_DWORD value with the following syntax DOMAINNAME\USERNAME. For example, if your domain is MYDomain and your user name is User, enter: MYDomain\User
  4. Set the newly created key to the hexadecimal value of 1.
  5. Restart the computer to apply the changes.

Files to Be Backed Up

The VSS writer needs a list of files that are considered as under the server's control. This information must be located in the file ctsrvr.dds residing in the server's working directory (where the faircom.exe is located). For the VSS backup, only entries between !FILES and !END are relevant. There is no directory recursion, so wildcards will not be matched in subdirectories.


!FILES

C:\FairCom\ctreeSDK\ctreeAPI\bin.sql\ctreeSQL.dbs\test1.dat

C:\FairCom\ctreeSDK\ctreeAPI\bin.sql\ctreeSQL.dbs\test1.idx

ctreeSQL.dbs\*.dat

ctreeSQL.dbs\*.idx

ctreeSQL.dbs\SQL_SYS\*

!END
 

This information tells the backup utility which files are under FairCom DB control. If the set of files being backed up does not intersect with the set of files listed in ctsrvr.dds, the VSS service does not interact with FairCom DB VSS writer, resulting in an invalid backup of any files open by the server.

While testing, it is recommended to run the FairCom DB SQL Server with DIAGNOSTICS VSS_WRITER in ctsrvr.cfg. When the VSS writer is correctly configured, you should see entries logged to CTSTATUS.FCS like those listed in VSS Diagnostic Logging.

See Also

DIAGNOSTICS VSS_WRITER

 

VSS_WRITER_QUIESCE_TIMEOUT

VSS_WRITER_QUIESCE_TIMEOUT <seconds>

Default: 5 seconds

VSS writer now supports setting the quiesce timeout value. The value can be set in ctsrvr.cfg by specifying the configuration option VSS_WRITER_QUIESCE_TIMEOUT <seconds>, where <seconds> is the time in seconds. If the value is negative, the default value is used.

This setting can also be changed dynamically at runtime using ctadmn (option 10, then option 10) to set the VSS_WRITER_QUIESCE_TIMEOUT option value or by calling ctSETCFG(setcfgCONFIG_OPTION, "VSS_WRITER_QUIESCE_TIMEOUT <seconds>").

Note: To use the updated VSS Writer, you must install the updated server. It is not sufficient to drop in the VSS DLL under the older server.

 

DIAGNOSTICS DYNDUMP_LOG

DIAGNOSTICS DYNDUMP_LOG

The DIAGNOSTICS DYNDUMP_LOG keyword generates dynamic dump status info, sending progress entries during each dynamic dump to CTSTATUS.FCS, including an entry for each file it attempts to dump.

Default: OFF

 

DIAGNOSTICS VSS_WRITER

DIAGNOSTICS VSS_WRITER

The following FairCom DB configuration option enables VSS writer diagnostic logging (this can be enabled dynamically on the fly with server administrator utilities):

DIAGNOSTICS VSS_WRITER

When enabled, the VSS writer logs diagnostic messages to CTSTATUS.FCS. These messages indicate the sequence of operations to which the VSS writer is responding. Some examples are shown below:


Tue Sep 14 15:44:05 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnIdentify called

Tue Sep 14 15:44:07 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnPrepareBackup called

Tue Sep 14 15:44:07 2010

 - User# 00016 VSS Diag: [0x1098] (+) Component: CtreeACE

Tue Sep 14 15:44:07 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnPrepareSnapshot called

Tue Sep 14 15:44:07 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnFreeze called

Tue Sep 14 15:44:07 2010

 - User# 00016 VSS Diag: [0x1098] QuietCtree(ctQTblockALL | ctQTflushAllFiles)...

Tue Sep 14 15:44:08 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnThaw called

Tue Sep 14 15:44:08 2010

 - User# 00016 VSS Diag: [0x1098] QuietCtree(ctQTunblockALL)...

Tue Sep 14 15:44:08 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnPostSnapshot called

Tue Sep 14 15:44:10 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnIdentify called

Tue Sep 14 15:44:25 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnIdentify called

Tue Sep 14 15:44:26 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnBackupComplete called

Tue Sep 14 15:44:26 2010

 - User# 00016 VSS Diag: [0x1098]     c-treeACEVSSWriter::OnBackupShutdown called
 

Note: The VSS writer always logs error messages to the Windows event log, even if the DIAGNOSTICS VSS_WRITER option is not specified in the configuration file.

See Also

VSS_WRITER