Creating regular backups of your AppGate controller is crucial for data security and system recovery. Follow these steps to set up automated backups using AppGate SDPCTL tools and Windows Task Scheduler:
Create a Batch File
Begin by creating a batch file with the following information
SET SDPCTL_USERNAME=user_name
SET SDPCTL_PASSWORD=your_password
SET SDPCTL_PROVIDER=your_IDP
SET SDPCTL_URL=https://yourcontroller_admin_UI:8443
sdpctl appliance backup --include=function=controller --quiet --destination=C:\appgate-controller-backup-sdpctlSET SDPCTL_USERNAME: - AppGate admin role for backup operations. Create a role with limited privileges, focusing solely on backups. Refer to this link for more details.link.
SDPCTL_PASSWORD, SDPCTL_PROVIDER, SDPCTL_URL: AppGate login credentials and controller details.
You must change the port 8443 if you are using different port for admin URL.
Also in case you are using self signed certificate you need to add SDPCTL_INSECURE=true, as another variable in your batch file
An example of such role can be like this

The sdpctl appliance backup command performs a quiet backup on Appgate appliances acting as controllers.
Enable Backup API
Under global settings, enable the backup API, choose a secure passphrase, and store it safely. Without this passphrase, backups are unusable for restoration.

Create Admin Policy
Establish an admin policy granting necessary permissions to access the admin UI and perform backups.

4. Configure Windows Task Scheduler:
Navigate to windows task Schedular and create a task similar to this



Validate Configuration
Manually run the Task Scheduler to confirm the configuration. If correct, a backup file similar to the specified destination should be created.

If your configuration was correct, you should have a backup file similar to below

Important Notes:
Ensure the admin role is restricted to backup operations only.
Encrypt your backups with a strong password.
If needed, use tools like "Advanced BAT to EXE Converter" to convert the batch file to binary for added security, ensuring your password remains hidden.
By following these steps and maintaining strict security protocols, you'll establish a reliable and secure backup system for your Appgate controller.