mariabackup will use rocksdb checkpoints, usually only for a short period (for create checkpoint, copy it to stdout in xbstream format, cleanup checkpoint).
The "cleanup checkpoint" step - removing directory that was created previously by the server plugin, should also be done by the server plugin. the problem are OS permissions.
- Usually, mysqld can only read and write within datadir
- Ideally no other user should be able write within datadir.
So far , backup OS user only needed read permissions to all files created by server. to cleanup checkpoint itself, backup and server would need a directory, where both of them can write. This is awkward to document and to setup.
Ideally, server would provide mechanism to cleanup the temporary checkpoint.
set global rocksdb_create_checkpoint=NULL
would remove the last checkpoint dir made with SET rocksdb_create_checkpoint=<dir>