OverviewThe Fedora 4 Backup capability allows a user, such as the repository manager, make a REST call to have the repository binaries and metadata exported to the local file system. Inversely, the Restore capability allows a user to make a REST call to have the repository restored from the contents of a previous Backup operation. In addition, with the default configuration, files are stored on disk named according to their SHA1 digest, so a filesystem backup approach can also be used.
If a POST body specifying a writeable directory (local to Fedora 4 server) is not included in the request, the backup will be written to the system temp directory.
Perform a backup of a running Fedora 4 repository
- HTTP/1.1 200 OK
- Path where the backup was written
- Absolute path of local backup directory
Note: Restoring a backup replaces the repository content with the contents of the backup, so any data in the repository will be lost.
Perform a restore of a running Fedora 4 repository
A POST body containing the full path to a previous backup.
- HTTP/1.1 204 No Content
Regardless of the repository configuration, the output of the backup process creates resources of the same format. Further details on backup contents and the underlying implementation can be found in ModeShape's documentation.
The backup directory will contain
- 'binaries' directory that contains the repository "content" binaries stored in a pair-tree like structure. The filename of the binary is the SHA-1 of the content with the extension '.bin'. The directory structure in which each binary is found is three levels deep based on the SHA-1.
For example, binary content in the repository with a SHA-1 of "5613537644c4d081c1dc3530fdb1a2fe843e570170d3d054", would look like
- One or more "documents_00000n.bin.gz" files which contains a concatenated listing of the metadata for each of the repository objects in JSON format
By default, files larger than 4KB are stored on disk named after their SHA1 digest, in the directory
fcrepo.binary.directory. (4KB is the default, but can be changed by updating the
minimumBinarySizeInBytes property in repository.json). That is, a file with the SHA1 "a1b2c369563c0465ab82cdb2789d45ce1c3585b1" would be stored on disk in
/path/to/fcrepo4-data/fcrepo.binary.directory/a1/b2/c3/a1b2c369563c0465ab82cdb2789d45ce1c3585b1. So files in the repository can be backed up backing up the directory