Backup FaunaDB Hybrid
Backups in FaunaDB Hybrid consist of immutable snapshots of the current state of a node’s data. These snapshots are created individually on each node.
Each snapshot consists of hard links to data files. In this way, the storage overhead for an individual snapshot is low, as it does not require a separate copy of live data to be stored.
This page will cover all the basic backup operations:
To create a snapshot:
faunadb-admin create-snapshot »SNAPSHOT-NAME« Snapshot SNAPSHOT-NAME created.
SNAPSHOT-NAME is some logical name for the snapshot, such as a
A FaunaDB node only creates snapshots of the data on its local disk. Creating a snapshot of all nodes in a single replica should be sufficient, as all replicas contain an entire copy of the dataset.
By default, the
faunadb-admin tool communicates with the local FaunaDB
instance running on the same node. In order to create a snapshot of all
the data in a cluster, the
faunadb-admin create-snapshot command must
be run on each node in the cluster.
When taking a backup of an entire cluster’s data, it is helpful to create snapshots of different nodes at as close to the same time as possible. This will help maintain data consistency between the snapshots, and significantly reduce the time it takes to restore by limiting the transactions that are required to be resolved between the snapshots.
Snapshots are stored in the directory specified by the configuration key
storage_snapshot_path. Each snapshot is in an individual subdirectory
underneath this path, named with the snapshot name provided when it was
For example, if two snapshots were created with the names
20151202-1001, and the
/var/lib/faunadb/, those snapshots would be located in
To list all snapshots that currently exist in a node’s snapshot path:
faunadb-admin show-snapshots 20151201-1001 20151202-1001
To restore a snapshot:
faunadb-admin load-snapshot »absolute PATH«
Make sure to provide the absolute path to a snapshot as the
Restoring a snapshot will stream the appropriate data to all of the nodes in a cluster. An individual snapshot only needs to be restored on a single node.
To fully restore a backup from a multi-node cluster, a snapshot from all nodes of a single replica must be restored. Once a single replica is restored it can replicate the data to other replicas in the cluster.
The status of snapshot restoration can be viewed in the FaunaDB log file
of the node that
faunadb-admin is communicating with.
Log lines such as:
2018-03-19 14:26:49,513 Restore of HistoricalIndex from [Host ID] complete.
indicate the start of a snapshot restoration.
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve! email@example.com
Thank you for your feedback!