Reset Search



KB44172 - Backup/restore binary configuration using REST API

« Go Back


Last Modified Date6/3/2019 4:04 PM
Backup/restore binary configuration is added feature starting from PCS OS 9.1R1 

Following KB article will explain how to use Curl to export/import the binary configuration on VPN appliance.
Problem or Goal
  1. Curl 
  2. VPN with minimum PCS OS 9.1R1 or higher.
  3. Postman Client (any REST API client)
The postman client has some limitation with large responses to GET calls. You can try using some other method for the GET call (for backup configuration). I have used Curl for Windows to process GET calls.
Instructions to Export the Configuration

Step 1:
Enable REST API access on the admin user.
Under Admin GUI > Auth Servers > Administrators > Users > Update Administrator admin > Enable 'Allow access to REST APIs'

Step 2: Setup CURL to use for desired OS machine. (I haved used Windows in this case)

Step 3: Generate Auth Key
c:\curl\bin>curl -k -u admin:dana!23 -G https://<IP-Address>/api/v1/auth

Step 4: Export the configuration

Syntax Format:
c:\curl\bin>curl --insecure --user <AUTH KEY CODE> -o <Location to store the backup file> https://<IP-Address>/api/v1/system/binary-configuration

c:\curl\bin>curl --insecure --user S/gvPgeT48dpF5q+w5ooJFmWsndP4P4RH8LGaKghbKw=: -o /Users/admin/Documents/backup

Curl Output
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 48.5M  100 48.5M    0     0  3242k      0  0:00:15  0:00:15 --:--:-- 11.9M
Admin Access Logs
Severity	ID		Message
Info		ADM20447	2019-05-27 13:02:25 - ive - [] System()[] - Exported user configuration by administrator
Info		ADM20447	2019-05-27 13:02:17 - ive - [] System()[] - Exported system configuration by administrator

Instructions to Import the Configuration

You can use postman to import the configuration to same or other appliance with same or higher OS version.

Syntax Format:
PUT https://<ip-address>/api/v1/system/binary-configuration?import=full

Postman Output
    "result": {
        "info": [
                "message": "Operation successfully completed."
Admin Access Logs
Info	ADM20456	2019-05-27 13:07:37 - ive - [] System()[] - Imported user configuration.
Info	DAS31035	2019-05-27 13:07:36 - ive - [] System()[] - Dashboard / Reporting enabled.
Info	ADM24397	2019-05-27 13:07:29 - ive - [] System()[] - ESAP package (version '3.3.5') activated.
Info	ADM20456	2019-05-27 13:07:21 - ive - [] System()[] - Imported system configuration.
Info	DAS31035	2019-05-27 13:07:19 - ive - [] System()[] - Dashboard / Reporting enabled.
Related Links
Attachment 1 
Created ByGourinath Diojode



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255