Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

 

Request URI: /

Methods: GET, POST

Status
colourBlue
titlePOST
 fcr:backup 
Initiate a (consistent) backup of the repository

Info

The You may included a backup directory in the body of the POST request. If you do not specify a directory, the backup will be stored in a temporary directory on the server (which will be returned in the response body). As yet, there is not a REST API method for retrieving the content of the backup.

 

Example:

Code Block
curl -X POST "http://localhost:8080/rest/fcr:backup"

 

Response:

Code Block
Status: 200 OK

Body:
/tmp/fcrepo4-data/path/to/backup/directory


Example 2: Including a destination directory

Code Block
curl -X POST -d /path/to/backup/destination "http://localhost:8080/rest/fcr:backup"

 

Response:

Code Block
Status: 200 OK

 

 

Status:

Status
subtletrue
colourGreen
title200
 OK

 


Status
colourBlue
titlePOST
 fcr:restore 
Replace repository content with data from a backup directory

 

Example:  

Code Block
curl -X POST --data-binary "/tmp/fcrepo4-data/path/to/backup/directory" "http://localhost:8080/rest/fcr:restore"

 

Response:

Code Block
Status: 204 No Content

 

Status:

Status
subtletrue
colourGreen
title204
Backup restored

Status
subtletrue
colourRed
title500
Error restoring backup

...