Backup & Restore APIs in Ambience 4.x

This is an example of how to call Ambience 4.x to Backup & Restore APIs.
This example is tested on Ambience 4.6.2

Prerequisites:
//Have Administrator User Rights
//Repository created prior to Restoring

# 1. Backup Filesystem API
Backups a filesystem in Ambience4.x using an API

Backup API Structure:
[protocol]:[host]:[port]/elx/do/[domain]/dc/content/[File System]?action=full-backup

CURL command to call API using POST with Basic Authentication:
#Credentials - admin:sa, Base64 encoded value - YWRtaW46c2E=

curl --verbose -X POST --basic -u admin:sa \
  -H "Authorization: Basic YWRtaW46c2E=" \
  "http://localhost:8080/elx/do/eno/dc/content/ElixirSamples?action=full-backup"

Once the API is called, a zip file will be created in Ambience backup folder.


Output File Format: [yyyy]/[mm]/[dd]/[date time stamp]-[filesystem]-full.zip

# 2. Restore Filesystem API
Restores a filesystem archive file using an API

Filesystem in backup folder needs to be in the following format:
backup/[YYYY]/[MM]/[DD]/[Filesystem zip archive]

Restore API Structure:
[protocol]:[host]:[port]/elx/do/[domain]/dc/content/[FileSystem]?action=full-restore
&zip=[YYYY-MM-DD]-[FileSystem]-full.zip

CURL command to call API using POST with Basic Authentication:
#Credentials - admin:sa, Base64 encoded value - YWRtaW46c2E=

curl --verbose -X POST --basic -u admin:sa \
  -H "Authorization: Basic YWRtaW46c2E=" \
  "http://localhost:8080/elx/do/eno/dc/content/ElixirSamples?action=full-restore&zip=2021-07-15_121036-ElixirSamples-full.zip"

Copy of Documentation can be found here:
Backup Restore API for Ambence 4.pdf (145.1 KB)