[MDEV-19246] Change database and table used for Mariabackup's history Created: 2019-04-12  Updated: 2023-08-07  Resolved: 2022-09-12

Status: Closed
Project: MariaDB Server
Component/s: mariabackup
Fix Version/s: 10.11.0

Type: Task Priority: Critical
Reporter: Geoff Montee (Inactive) Assignee: Alexander Barkov
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Blocks
Relates
relates to MDEV-14746 mariabackup doesn't read [mariabackup... Closed
relates to MDEV-18347 mariabackup doesn't read all server o... Closed
relates to MDEV-18405 Add Mariabackup option to set gtid_sl... Stalled
relates to MDEV-18917 Don't create xtrabackup_binlog_pos_in... Closed
relates to MDEV-18931 Rename Mariabackup's xtrabackup_* fil... Closed
relates to MDEV-18985 Remove support for XtraDB's changed p... Confirmed
relates to MDEV-19264 Better support MariaDB GTID for Maria... Closed
relates to MDEV-20552 Remove innobackupex mode from Mariaba... Stalled
relates to MDEV-20556 Remove references to "xtrabackup" and... Closed

 Description   

Mariabackup still uses the PERCONA_SCHEMA.xtrabackup_history table to store history:

https://mariadb.com/kb/en/library/mariabackup-options/#-history

https://github.com/MariaDB/server/blob/mariadb-10.4.4/extra/mariabackup/xtrabackup.cc#L1123

https://github.com/MariaDB/server/blob/mariadb-10.4.4/extra/mariabackup/backup_mysql.cc#L584

https://github.com/MariaDB/server/blob/mariadb-10.4.4/extra/mariabackup/backup_mysql.cc#L1439

Maybe we should rename this database and table?



 Comments   
Comment by Sergei Golubchik [ 2022-03-25 ]

is this table only used by mariabackup itself for incremental backups? Does it have any other usages, other tools that use it, perhaps?

Comment by Geoff Montee (Inactive) [ 2022-03-25 ]

I am not aware of any tools other than Percona XtraBackup and mariabackup that use the table.

According to the Percona XtraBackup documentation, the table is primarily intended for maintaining a history of backups for informational purposes:

Percona XtraBackup supports storing the backups history on the server. This feature was implemented in Percona XtraBackup 2.2. Storing backup history on the server was implemented to provide users with additional information about backups that are being taken. Backup history information will be stored in the PERCONA_SCHEMA.XTRABACKUP_HISTORY table.

https://www.percona.com/doc/percona-xtrabackup/LATEST/xtrabackup_bin/backup.history.html

Comment by Ralf Gebhardt [ 2022-04-04 ]

But it is not only to log a history, XtraBackup can also use this history to for incremental backups

Comment by Sergei Golubchik [ 2022-04-04 ]

okay, if there aren't any tools that would break because of this change, then yet, let's do it.
What should be the new name? mysql.mariabackup_history ?

Comment by Alexander Barkov [ 2022-09-09 ]

Hello serg,

Can you please review this patch:

https://github.com/MariaDB/server/commit/24d3f2cb8037f40dfce4b6da7ca243c838aa9800

?

Thanks!

Comment by Sergei Golubchik [ 2022-09-09 ]

24d3f2cb8037f40dfce4b6da7ca243c838aa9800 is ok to push

Comment by Sergei Golubchik [ 2022-09-09 ]

The primary name is mariadb-backup, but it'd be inconvenient to have a dash in the identifier (table name), it'd always need to be quoted. So mariabackup_history or maria_backup_history. And I think between those two either is fine.

Comment by Alexander Barkov [ 2022-09-12 ]

Let's go with mariadb_backup_history. It's closest possible to the program name, just using an underscore instead of a dash.

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