Creating a Repository Backup Snapshot
A backup copy of the Repository Services is created by starting a daemon process that will stream all of the repository to a file, and then upload the file to its S3 bucket. This daemon can be
launched and monitored from a set of HTTP Rest calls. Note: All Backup/Restore services will require an administrator's session token.
- First, log-in as an administrator to get an administrator's session token:
curl -i -k -H sessionToken:YourSessionToken -H Accept:application/json -H Content-Type:application/json -d '{ "email": "<admin username>", "password": "<admin password>" }' https://staging-auth.elasticbeanstalk.com/auth/v1/session
- Once you have the admin token the backup daemon can be started with the following command:
RequestResponsecurl -i -k -H sessionToken:<your admin token> -H Accept:application/json -H Content-Type:application/json -d '{ }' https://staging-reposervice.elasticbeanstalk.com/repo/v1/startBackupDaemon
HTTP/1.1 201 Created Content-Type: application/json Date: Thu, 18 Aug 2011 22:38:56 GMT Server: Apache-Coyote/1.1 Content-Length: 256 Connection: keep-alive { "id":"6695", "type":"BACKUP", "status":"STARTED", "errorMessage":null, "progresssMessage":"Starting...", "progresssCurrent":0, "progresssTotal":0, "errorDetails":null, "backupUrl":null, "totalTimeMS":0, "startedBy":"platform@sagebase.org", "startedOn":1313707136615 }
- Once the daemon is started, its progress can be monitored using its 'id' returned from the '/startBackupDaemon' call: