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. Currently tar, WDT and xbstream are supported. Default is tar ⭐
  • --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_datadir and --rocksdb_waldir must 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 βœ¨πŸŽ€πŸ¦‹