[MDEV-13122] Backup myrocks with mariabackup Created: 2017-06-19  Updated: 2023-06-06  Resolved: 2018-06-07

Status: Closed
Project: MariaDB Server
Component/s: Backup, Storage Engine - RocksDB
Fix Version/s: 10.2.16, 10.3.8

Type: Task Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
PartOf
includes MDEV-16300 remove checkpoint generated with rock... Closed
Relates
relates to MDEV-12380 MariaRocks: repo, tests, and packagin... Open
relates to MDEV-20564 Mariabackup docs for privileges incom... Closed
relates to MDEV-20577 Require lower privilege than SUPER to... Open
relates to MDEV-30967 sst mariabackup broken on rocksdb - c... Closed
Sprint: 10.4.0-1

 Comments   
Comment by Sergei Petrunia [ 2018-01-24 ]

Note from wlad: Alibaba has added TokuDB backup support into xtrabackup: https://github.com/alibaba/AliSQLBackup/commit/26573de135d115b100dbbfb9698274463ade5c8d . So we are not the first.

Comment by Vladislav Vaintroub [ 2018-05-09 ]

We'll only support full backup in the first iteration, to incrementals or partials .
what needs to be done

During mariabackup --backup

when mariabackup --backup starts
check if rocksdb plugin is installed

*in the "synch" phase, under "flush tables with readlock, lock binlog"

 if (rocksdb_present) {
   if (backup to directory) {
     execute SET GLOBAL rocksdb_create_checkpoint=<backup-dir>/#rocksdb
     // this will create rocksdb subdirectory in the backup dir, we're done
  }
  else  {// backup to  stdio with xbstream
     execute SET GLOBAL rocksdb_create_checkpoint=<temp-dir>/#rocksdb
     copy <temp-dir>/#rocksdb  recursively in xbstream format to stdout
     remove <temp-dir>/#rocksdb 
  }
}

Do we need a parameter for whether to backup rocksdb or not?
Do we need a parameter for rocksdb temp-dir, in case backup is streaming?. It is beneficial temp directory is on the same volume, checkpoint will create hardlinks rather than copy.

During mariabackup copy-back

  • copy <backup-dir>/#rocksdb to the rocksdb-data-dir (in absense of this parameter to <target-dir>/#rocksdb)

That's it.

Generated at Thu Feb 08 08:03:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.