]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: add monitor RocksDB backup and restore 68978/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 00:24:52 +0000 (19:24 -0500)
commit3a9ae41e2a8fd614d67e3dac39d28ddf5dd6ca4a
tree55c39657600f8753ad1096449a62e337e3a3e721
parente4cf2f0c8485d04183d8f1c5cf31dee60042e078
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>
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