Backup and Restore
The manner in which FoundationDB deals with backup and restore is a little unusual. First, a FoundationDB database can be backed up to local disks, which is the usual case with most database servers, a blob store or to another FoundationDB database. The latter type of backup is called Database Recovery (DR) in FoundationDB terminology. The backup_agent server process, which is responsible for the backup process, starts automatically on each FoundationDB instance.
We’re going to back up a local FoundationDB instance. The general format of the Backup URL is file://</absolute/path/to/base_dir>. Because these paths are absolute, you’ll end up having a Backup URL with three slash characters, such as file:///home/tsoukalos. $ sudo fdbbackup start -d file:///usr/local/foundationdb/data The backup on tag `default’ was successfully submitted.
You can define your own tags using the -t command line option. Using the previous backup for restoring your data is as easy as executing the following command: $ sudo fdbrestore start -r file:///usr/local/foundationdb/data/ backup-2018-09-01-11-32-38.089944 You should execute sudo fdbbackup list to obtain the full path of the directory where the backup data was placed. The restore command will fail if the destination database isn’t empty. You should make sure that nobody is accessing the FoundationDB database while the restore process is in progress. For more on backing up see https://apple.github.io/foundationdb/backups.html.