Note: For a complete discussion of dynamic dumps, see Backups and Data Integrity in the FairCom Server Administrator's Guide.
ctdump schedules a dynamic dump on the fly. The backup definition script may be located either on the server, or passed in from the client.
ctdump [-s svn] [-u uid] [-p upw] [-t script] [-b bufsiz] [-n] [-c] [-o backup_filename] [-x]
For options available when scripting a dynamic dump, see Dynamic Dump Options.
The following demonstrates example usage of this utility:
ctdump ADMIN ADMIN thescript FAIRCOMS
Secure Authentication File
This utility supports the use of an encrypted password file. Encrypted password files keep user IDs and passwords from plain view when the utility is used within a script file. They are created with the ctcmdset utility. The plain text form of the file should be:
; User Id
; User Password
Use the -1 option to specify the name of the encrypted file.
Dump and Restore Version Compatibility
The ctrdmp utility is used to restore a Dynamic Dump and the ctfdmp utility can be used to roll forward. Occasionally an update to the FairCom Database Engine may cause an incompatibility between versions. For this reason you must use the ctrdmp from the same release from which the dump was created. It is important to save a copy of the ctrdmp utility that is compatible with each dump file. ctfdmp, ctldmp, and ctrdmp utilities display the FairCom DB version used to compile them when they are run.
Compression and Encryption
The ctdump.exe utility can accept compression and encryption utility inputs.
Windows backup compressed with 7z compression utility:
ctdump -s FAIRCOMS -u admin -p ADMIN -t dump.txt -c -x | 7z a -si backup.7z
Unix backup compressed and AES encrypted with standard utilities:
./ctdump -s FAIRCOMS -u admin -p ADMIN -t dump.txt -c -x | gzip|openssl enc -aes-256-cbc -salt >backup.gz.aes
Tip! Unix/Linux Alternative
This method also works with server-side dynamic dump backups prior to this new support and can be implemented on Unix systems using named pipes (mkfifo), and sending the dump to the named pipe.
cat testpipe | gzip > backup.gz &
ctdump -s FAIRCOMQ -u admin -p ADMIN -t dump.txt -c -o testpipe
c-tree(tm) Version 188.8.131.52131(Build-180802) Dynamic Backup Utility
Copyright (C) 1992 - 2018 FairCom Corporation
ALL RIGHTS RESERVED.
Reading dump stream from server with buffer size of 100000
Dynamic Dump has been successfully written to the file testpipe.
The same approach can be used to compress and encrypt (and potentially other operations provided by system utilities):
cat testpipe|gzip|openssl enc -aes-256-cbc -salt >backup.gz.aes
To extract the dump:
cat backup.gz.aes | openssl enc -aes-256-cbc -d |gzip -d >backup.ctree
Use ctrdmp to extract the files from backup.ctree.
The following error codes are related to dynamic dump operations:
Cannot determine file type. Possibly a c-tree V4.3 file?
Failed to read file, either a corrupted or non-tree file.
Transaction log collision. Two sets of transaction logs in the same directory?
Immediate dump restore file copy failed.
Immediate dump restore failed.