diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-15 13:16:41 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-15 13:51:31 +0100 |
commit | 8cf3d24875d41d79ab08d637cd38d2a5b9e527dd (patch) | |
tree | c92172dee172941c3daf32a08927f8ebab0ded9e /doc/book/operations/durability-repairs.md | |
parent | a68c37555d15bb19a10f74c7ee85485a5228ab66 (diff) | |
download | garage-8cf3d24875d41d79ab08d637cd38d2a5b9e527dd.tar.gz garage-8cf3d24875d41d79ab08d637cd38d2a5b9e527dd.zip |
[db-snapshot] documentation for metadata db snapshotsdb-snapshot
Diffstat (limited to 'doc/book/operations/durability-repairs.md')
-rw-r--r-- | doc/book/operations/durability-repairs.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/book/operations/durability-repairs.md b/doc/book/operations/durability-repairs.md index f4450dae..c76dc39e 100644 --- a/doc/book/operations/durability-repairs.md +++ b/doc/book/operations/durability-repairs.md @@ -104,6 +104,24 @@ operation will also move out all data from locations marked as read-only. # Metadata operations +## Metadata snapshotting + +It is good practice to setup automatic snapshotting of your metadata database +file, to recover from situations where it becomes corrupted on disk. This can +be done at the filesystem level if you are using ZFS or BTRFS. + +Since Garage v0.9.4, Garage is able to take snapshots of the metadata database +itself. This basically amounts to copying the database file, except that it can +be run live while Garage is running without the risk of corruption or +inconsistencies. This can be setup to run automatically on a schedule using +[`metadata_auto_snapshot_interval`](@/documentation/reference-manual/configuration.md#metadata_auto_snapshot_interval). +A snapshot can also be triggered manually using the `garage meta snapshot` +command. Note that taking a snapshot using this method is very intensive as it +requires making a full copy of the database file, so you might prefer using +filesystem-level snapshots if possible. To recover a corrupted node from such a +snapshot, read the instructions +[here](@/documentation/operations/recovering.md#corrupted_meta). + ## Metadata table resync Garage automatically resyncs all entries stored in the metadata tables every hour, |