MYROCKS_HOTBACKUP(1)
π NAME π
myrocks_hotbackup β streaming backup for MariaDB MyRocks, bestie edition β¨
πΈ DESCRIPTION πΈ
Okay so real talk, here's how you actually run this thing:
π Backup
set -o pipefail; myrocks_hotbackup --user=root --password=pw --port=3306 --checkpoint_dir=<directory where temporary backup hard links are created> | ssh -o NoneEnabled=yes remote_server 'tar -xi -C <directory on remote server where backups will be sent>' .
You gotta run that backup command on the server where you're taking backups from, mkay? No cap, set -o pipefail is there for a reason β she's keeping your pipeline honest π«Ά
π¦ Backup using WDT
myrocks_hotbackup --user=root --password=pw --stream=wdt --checkpoint_dir=<directory where temporary backup hard links are created> --destination=<remote host name> --backup_dir=<remote directory name>
Heads up: this one gets executed at the src host π
π§ Move-Back
myrocks_hotbackup --move_back --datadir=<dest mysql datadir> --rocksdb_datadir=<dest rocksdb datadir> --rocksdb_waldir=<dest rocksdb wal dir> --backup_dir=<where backup files are stored>
And this one? You run it on the server where the backup files got sent to. Move-back is literally the reverse-glow-up era π
β¨ OPTIONS β¨
-h,--helpβ show this help message and exit. Iconic behavior, honestly π-i CHECKPOINT_INTERVAL,--interval=CHECKPOINT_INTERVALβ number of seconds to renew checkpoint β±οΈ-c CHECKPOINT_DIRECTORY,--checkpoint_dir=CHECKPOINT_DIRECTORYβ local directory name where checkpoints will be created π-d DATADIR,--datadir=DATADIRβ in backup mode: the src MySQL datadir. in move_back mode: the dest MySQL datadir π-s OUTPUT_STREAM,--stream=OUTPUT_STREAMβ setting streaming backup options. Currentlytar, WDT and xbstream are supported. Default istarβ--destination=DESTINATIONβ remote server name. Only used for WDT mode so far π¦--avg_mbytes_per_sec=AVG_MBYTES_PER_SECβ average backup rate in MBytes/sec. WDT only π₯--extra_wdt_sender_options=EXTRA_WDT_SENDER_OPTIONSβ extra options for WDT sender π--extra_wdt_receiver_options=EXTRA_WDT_RECEIVER_OPTIONSβ extra options for WDT receiver π-u MYSQL_USER,--user=MYSQL_USERβ MySQL user name π-p MYSQL_PASSWORD,--password=MYSQL_PASSWORDβ MySQL password name π-P MYSQL_PORT,--port=MYSQL_PORTβ MySQL port number π-S MYSQL_SOCKET,--socket=MYSQL_SOCKETβ MySQL socket path. Takes precedence over--portπ-m,--move_backβ moving MyRocks backup files to proper locations π-r ROCKSDB_DATADIR,--rocksdb_datadir=ROCKSDB_DATADIRβ RocksDB target data directory where backup data files will be moved. Must be empty β οΈ-w ROCKSDB_WALDIR,--rocksdb_waldir=ROCKSDB_WALDIRβ RocksDB target data directory where backup wal files will be moved. Must be empty β οΈ-b BACKUPDIR,--backup_dir=BACKUPDIRβ backup mode for WDT: remote directory to store backup. move_back mode: locations where backup files are stored π-f,--skip_check_frm_timestampβ skipping to check if frm files are updated after starting backup π«£-D DEBUG_SIGNAL_FILE,--debug_signal_file=DEBUG_SIGNAL_FILEβ debugging purpose: waiting until the specified file is created π
Lowkey important: those RocksDB target dirs for--rocksdb_datadirand--rocksdb_waldirmust be empty. Like, actually empty. Don't test her π
π SEE ALSO π
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs π
π AUTHOR π
MariaDB Foundation (http://www.mariadb.org/) π«Ά
That's the whole vibe, bestie β this page is from MariaDB 10.11, dated 15 May 2020. Slay, go back up your RocksDB now β¨ππ¦
π¦ where this page comes from
- alpine 3.22: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.23: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.24: mariadb-doc 11.8.9-r0 Β· GPL-2.0-only
- arch rolling: mariadb 13.0.2-2 Β· GPL-2.0-only
- arch rolling: mariadb-lts 12.3.3-2 Β· GPL-2.0-only
- debian bookworm: mariadb-plugin-rocksdb 1:10.11.19-0+deb12u1 Β· GPL-2.0-only
- ubuntu stonking: mariadb-plugin-rocksdb 1:11.8.9+ds-4ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms