Backing up and restoring your cPFence settings is now easier than ever with the newly added backup and restore functionality. This ensures a seamless migration across servers or recovery in case of unexpected changes. Follow the steps below to use this feature effectively.
Backing Up cPFence Settings
To create a backup of your cPFence settings, run the following command:
cpfence --backup-cpf-settings
This command will generate a backup file in the /tmp
directory with the following naming format:
cpfence_backup_YYYYMMDDHHMMSS.tar.gz
The file contains all necessary settings to restore your configuration later.
Restoring cPFence Settings
To restore your settings from a backup, ensure the backup file is located in the /tmp
directory. Then, run the following command:
cpfence --restore-cpf-settings
The system will automatically detect the most recent backup file and prompt you to confirm restoration. If multiple backup files are available, you can choose the newest or cancel the operation.
Important Notes
-
The restore process will extract all settings to their original locations and ensure your cPFence configuration is restored correctly.
-
After restoring, verify your license key in the config file.
If the license key does not match the new server, you will need to replace it and install the correct license using the following command:
/opt/cpfence/app/install cPFence-XXXXXXXXXXXXXXXX
-
Don’t forget to restart cPFence after restoring the settings to apply the changes:
cpfence --restart
Need Assistance?
If you encounter any issues or need further guidance, please reach out to our support team via your client portal.