Database backup and restore

To configure backups or to do restores or copies, you must be on the Startup, Pro, or Enterprise plan, and your account must have owner or administrator privilege.

Fauna natively employs data redundancy, where three or more copies of a database schema and documents exist at any given time. Redundancy is scoped to a Region Group, such that data in one Region Group isn’t replicated in another Region Group. Because redundancy can’t protect against operator errors, logic bugs, and other operational conditions that might cause unexpected behavior, Fauna provides a backup/restore/copy feature.

Be aware that backup snapshots incur creation and retention charges. See Billing for more information.

Operational characteristics

Daily, at or near 6 AM UTC, Fauna takes a snapshot of databases that have backups enabled. Snapshots have the following attributes:

  • Every snapshot has all database schema and documents, including available child databases, collections, credentials, functions, indexes, keys, tokens, and external authentication configuration, as of the time the snapshot is taken.

    You have the option of scheduling snapshot generation daily, weekly, or monthly.

  • Snapshots are stored internally, outside of the main database, and aren’t downloadable.

  • Snapshot storage exists in the same Region Group as the original database.

  • Daily snapshots don’t affect previously created snapshots.

  • By default, snapshots are retained for 30 days, although you can choose a custom retention period:

    • 5 days

    • 15 days

    • 1 month (default)

    • 3 months

    • 6 months

    • 1 year

    • indefinitely

  • Expired snapshots are removed no more than 24 hours after the retention interval expires.

  • Snapshots exist at the account level and are retained even if the original database is deleted or if backups are disabled for the database. This is convenient for recovering an accidentally deleted database.

Constraints

  • You can’t snapshot databases nested 10 or more levels below a top-level parent database. If you back up a database that includes child databases, regardless of how deeply nested, the child database is backed up with the parent database.

  • Up to five restores can be in progress simultaneously. If you try to restore more than five databases simultaneously, an error message displays.

  • Snapshots are internally consistent up to the logical time that the snapshot is created. Snapshots don’t include document changes or index builds that complete after the snapshot transaction time.

  • Index builds that started but aren’t completed before a database snapshot is taken don’t resume when the snapshot is restored. After restoration or copying, these indexes have a status of active: false. To resume building these indexes, delete the index and recreate it.

  • You should review the restored database for inactive index builds when you restore or copy from a snapshot.

View backup status and snapshots

  1. Log in to the Dashboard.

  2. Choose Backups in the left navigation panel to view your databases and the database backup properties.

  3. If not already selected by default, choose the Databases menu item to view your databases and the backup properties for each database:

    Property Description

    NAME

    Database name. Use the arrows to sort the list on database name.

    REGION GROUP

    Database region group. Use the arrows to sort the list on region group.

    BACKUPS

    Backups enabled state. A indicates backups are enabled for the database.

    LATEST SNAPSHOT (UTC)

    Time in UTC of the last backup.

    NEXT SNAPSHOT (UTC)

    Scheduled time in UTC of the next backup.

    FREQUENCY

    Database backup frequency

    RETENTION

    Retention interval for the database backup.

    ACTIONS

    Enable or disable backups for the database. Click the icon and toggle Enable backups.

  4. To view available snapshots, choose the Snapshots menu item.

Enable backups and snapshots

You can define backup properties when you create a database and for existing databases.

When you create a database

You can define the backup properties for a database when you create the database.

  1. Log in to the Dashboard, and on the Home page, click Create Database.

  2. In addition to entering the other database properties, enable backups and define backup properties in the Backups section:

    Toggle Enable backups to enable and disable backups.

    If you enable backups, choose the backup properties:

    • Backup Schedule options:

      • Daily (default)

      • Weekly

      • Monthly

    • Backup Retention options:

      • 5 days

      • 15 days

      • 1 month (default)

      • 3 months

      • 6 months

      • 1 year

      • indefinitely

  3. Click Create to create the database with the backup properties you selected.

For an existing database

You can also enable and disable backups and define backup properties for existing databases.

  1. Log in to the Dashboard.

  2. Choose Backups in the left navigation panel to view your databases and the database backup properties.

  3. In the row of the database you want to change backup properties for, click the ACTIONS icon on the far right.

  4. In the Backup settings dialog and if backups aren’t already enabled for the database, toggle Enable backups to enable backups. Otherwise, skip to the next step.

  5. If you enable backups, you’re prompted to enter backup frequency and retention properties:

    • Backup Schedule options:

      • Daily (default)

      • Weekly

      • Monthly

    • Backup Retention options:

      • 5 days

      • 15 days

      • 1 month (default)

      • 3 months

      • 6 months

      • 1 year

      • indefinitely

  6. Click Save to save your backups selections.

Disable backups and snapshots

For databases whose BACKUPS status indicates that backups are enabled, follow these steps to disable backups.

  1. Log in to the Dashboard.

  2. Choose Backups in the left navigation panel to view your databases and the database backup properties.

  3. In the row of the database you want to change backup properties for, click the ACTIONS icon on the far right.

  4. Toggle Enable backups.

  5. Click Save to save the change.

    The BACKUPS status for the selected database indicates that backups are disabled.

Restore a database from a snapshot

  1. Log in to the Dashboard.

  2. Choose Backups in the left navigation panel to view your databases and the database backup properties.

  3. In the row of the database you want to restore from a snapshot, hover over and click the Restore this database from previous snapshot icon on the far right.

Create a database from a snapshot

  1. Log in to the Dashboard.

  2. Choose Backups in the left navigation panel to view your databases and the database backup properties.

  3. In the row of the database you want to restore from a snapshot, hover over and click the Create a new database from a snapshot icon on the far right.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!