]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: add monitor RocksDB backup and restore 69586/head
authorMatthew N. Heler <matthew.heler@hotmail.com>
Mon, 18 May 2026 01:57:01 +0000 (20:57 -0500)
committerMatthew N. Heler <matthew.heler@hotmail.com>
Thu, 18 Jun 2026 16:38:54 +0000 (11:38 -0500)
commit47a8d7497db46d194462af4e886dab9e37085dff
treee77452b08bd6486585cbcf3f668f663c51bdd5bf
parentf72d676118b34e0efa4fa3db7562a9a41e23b66a
mon: add monitor RocksDB backup and restore

Implements an opt-in backup mechanism for the monitor using
rocksdb::BackupEngine. Backups run on a schedule when
mon_backup_interval is set, or are triggered manually via
`ceph tell mon.* backup`. Cleanup keeps the last N, hourly,
and daily snapshots, with a free-space guard. Off by default.

Restore is offline: stop the mon and run
  ceph-mon --restore-backup <dir> --yes-i-really-mean-it
optionally with --backup-version (BackupEngine logical version,
as shown by --list-backups). The mon keyring is stashed alongside
the RocksDB backup so a wiped mon_data is recovered end-to-end,
and kv_backend is stamped back when missing.

Co-authored-by: Daniel Poelzleithner <poelzleithner@b1-systems.de>
Signed-off-by: Matthew N. Heler <matthew.heler@hotmail.com>
(cherry picked from commit 3a9ae41e2a8fd614d67e3dac39d28ddf5dd6ca4a)
15 files changed:
doc/rados/configuration/mon-config-ref.rst
doc/rados/troubleshooting/troubleshooting-mon.rst
src/ceph_mon.cc
src/common/options/mon.yaml.in
src/kv/KeyValueDB.cc
src/kv/KeyValueDB.h
src/kv/RocksDBStore.cc
src/kv/RocksDBStore.h
src/mon/CMakeLists.txt
src/mon/Monitor.cc
src/mon/Monitor.h
src/mon/MonitorBackup.cc [new file with mode: 0644]
src/mon/MonitorBackup.h [new file with mode: 0644]
src/mon/MonitorDBStore.h
src/vstart.sh