Disaster recovery planning is essential to ensure minimal downtime and data loss during unforeseen events. If you're using CompleteFTP, you can set up a disaster recovery (DR) server by maintaining a secondary server with a copy of the configuration from your primary server. However, simply copying the configuration file (config.db) between servers is not enough, especially because each server must use its own unique activation key. This article explains how to automate this process using CompleteFTP's built-in license tool, allowing your disaster recovery setup to switch over seamlessly.
Install CompleteFTP on the secondary server, ensuring it's compatible with your primary setup. Ensure that both servers have the same version of CompleteFTP to avoid any compatibility issues when transferring configurations.
To ensure the secondary server mirrors the primary, you need to regularly copy the config.db file from the primary server to the DR server. The config.db file stores all CompleteFTP configurations, including users, settings, and permissions.
You can find the config.db file at the following location on the primary server:
C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\config.db
Regularly copying this file ensures that the secondary server is ready to take over with the most recent configurations in the event of failure.
You may also need to regularly copy the user home directories, to ensure that users have the latest data available. They can be found here:
C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Users\
If you have customized other files in CompleteFTP, you will also need to copy these to the secondary server.
The config.db file contains the activation key for the server it is located on, as it is programmatically tied to its Windows installation. Therefore when the config.db is copied from the primary server to the DR server, it will contain the wrong activation key, and the DR server will be unlicensed and will not function correctly (it will not permit external connections to it).
To resolve this, the DR server needs to have its own activation key restored, which means a backup copy of it must be stored prior to overwriting its config.db file. This assumes you have previously activated the DR server. To do this, you must export its activation key to a file. After copying over the primary server configuration file, you then need to import the DR license back into its (new) config.db file. The export and import are done using the license tool. This utility is located in the CompleteFTP installation folder, typically at:
C:\Program Files\Complete FTP\Server
To export the activation key from the DR server, use this command:
license -c "C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\config.db" -e "C:\path\to\output\license.txt"
After the primary server's configuration file has been copied over the configuration file of the DR server, the activation key that has been exported from the DR server needs to be imported back into its configuration file. To do so, stop the DR CompleteFTP service and then use this command:
license -c "C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\config.db" -i "C:\path\to\license.txt"
After importing the activation key, restart the CompleteFTP service on the DR server. It should be a replica of the primary server with its own activation key.
Clustered Servers: The license utility cannot be used with CompleteFTP clustered servers. Clusters handle configuration replication automatically, and you need Enterprise MFT for full cluster support.
Regular Backups: Ensure that you schedule regular backups of the config.db file to the DR server, together with any user home directories and other files that are required to keep the DR server in sync with the primary server. You can automate the process, including use of the license tool to update the DR activation. Then the DR server will be ready for quick deployment.