Question about backups: how far back in versions can restores function?

Hello all,

We’re working to improve our backup/restore capability and I was curious how far back in DB version history can we restore? And if the backup snapshot interval has a role to play in the maximum age of the DB we could restore?

Specifically the argument for --snapshot_interval for fdbbackup and -v/--timestamp for fdbrestore. Can we only use -v back to the version of the consistent snapshot? Or if we can go back further – how much DB history is kept by FoundationDB?

I feel like I’ve read about this aspect of the storage engine before but can’t turn up any sources.

In a cluster with a continuous ongoing backup, restore can restore a cluster to any committed version at or after the end version of the earliest completed snapshot that is still in the backup. You can use

fdbbackup describe -d <url> [-C <cluster_file> --version_timestamps]

to see a listing of snapshots and log version ranges in a backup and what the resulting restorability period is. The second two arguments are optional, without them the results will be in versions and approximate days, with them you will get resolved timestamps using the cluster’s time to version conversion metadata.

Note that when you use fdbbackup expire to remove old data from a backup, any snapshots that intersect with the deleted range will no longer be complete and thus no longer usable for a restore.

1 Like