[MDEV-20552] Remove innobackupex mode from Mariabackup Created: 2019-09-10  Updated: 2023-11-30

Status: Stalled
Project: MariaDB Server
Component/s: Backup, mariabackup
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None

Issue Links:
Blocks
is blocked by MDEV-31505 Deprecate mariabackup --innobackupex ... Closed
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-19246 Change database and table used for Ma... Closed
relates to MDEV-19264 Better support MariaDB GTID for Maria... Closed
relates to MDEV-23695 remove unused xtrabackup code Open
relates to MDEV-32253 impossible to use --no-timestamp option Open
relates to MDEV-13524 Document --innobackupex option for Ma... Closed
relates to MDEV-18215 mariabackup does not report unknown c... Closed
relates to MDEV-20556 Remove references to "xtrabackup" and... Closed

 Description   

Mariabackup has an --innobackupex option, which can be used to enable innobackupex mode.

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

This is a compatibility option:

The primary purpose of innobackupex mode is to allow scripts and tools to more easily migrate to Mariabackup if they were originally designed to use the innobackupex utility that is included with Percona XtraBackup. It is not recommended to use this mode in new scripts, since it is not guaranteed to be supported forever.

This mode is not very different from the normal mode. The listed differences are:

  • To prepare a backup, the --apply-log option is used instead of the --prepare option.
  • To create an incremental backup, the --incremental option is supported.
  • The --no-timestamp option is supported.
  • To create a partial backup, the --include option is used instead of the --tables option.
  • To create a partial backup, the --databases option can still be used, but it's behavior changes slightly.
  • The --target-dir option is not used to specify the backup directory. The backup directory should instead be specified as a standalone argument.

These differences are not very significant, and having this extra mode is a bit confusing.

Maybe some of the behavioral differences in innobackupex mode should be merged into Mariabackup's normal mode, and then we should remove innobackupex mode?

UPDATE 14 Aug 2023
This task needs to be about:

  • verifying/ensuring that all innobackupex functionality is available in the normal mode (list to be updated)
    • add "timestamp" option
    • deprecation message for innobackupex (MDEV-31505)


 Comments   
Comment by Vladislav Lesin [ 2020-06-04 ]

ralf.gebhardt asked me, what options do we loose and what is the alternative options.

1. --innobackupex --apply-log is the same as --prepare;

2. --innobackupex --incremental is the same as --incremental-dir, example:

mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --incremental --no-timestamp --incremental-basedir=$targetdir/full $targetdir/inc;
mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --apply-log $targetdir/full;
mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --apply-log --incremental-dir=$targetdir/inc $targetdir/full;

can be exchanged with:

mariabackup --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --incremental-basedir=$targetdir/full --target-dir=$targetdir/inc;
mariabackup --defaults-file=$MYSQLTEST_VARDIR/my.cnf --prepare --target-dir=$targetdir/full;
mariabackup --defaults-file=$MYSQLTEST_VARDIR/my.cnf --prepare --incremental-dir=$targetdir/inc --target-dir=$targetdir/full;

3. --no-timestamp is the default mode for mariabackup, see the above example;

4. --include and --tables are the same

5. --databases - according to the code in ibx_init():

  if (opt_ibx_databases != NULL) {
    if (is_path_separator(*opt_ibx_databases)) {
      xtrabackup_databases_file = opt_ibx_databases;
    } else {
      xtrabackup_databases = opt_ibx_databases;
    }
  }

--innobackupex --databases can contain both the list of databases/tables and a file name which contains the list of databases/tables, while just --databases can contain only the list of databases/tables, while for the file there is another option --databases_file.

6. --target_dir is omitted in innobackupex mode, just target directory path is required, what is the same as --target_dir in mariabackup, see the example above.

I would say we don't loose any functionality, all innobackupex options have alternative mariabackup options.

Comment by Sergei Golubchik [ 2020-09-10 ]

What do we gain by removing it? Is this mode only about remapping of command-line options or are there deeper differences?

Comment by Vladislav Lesin [ 2020-09-15 ]

serg This mode is only for options remapping, https://mariadb.com/kb/en/mariabackup-options/#-innobackupex. This task can be considered as a part of MDEV-23695. innobackupex was removed from xtrabackup in December 2018.

Comment by Sergei Golubchik [ 2020-09-16 ]

if it's only option remapping, this seems like a small and easy to maintain chunk of code. May be it'd be better to keep it for compatibility reasons?

Comment by Vladislav Lesin [ 2020-09-17 ]

serg It's about 1k lines of code which just duplicates the code from another .cc file, has it's own "my option" array (which duplicates mariabackup options with some small changes) with it's own "handle_options" function with it's own "get_one_option" callback. And all of this is only to copy one variables to another ones, like

 /*=====================*/                                                     
  xtrabackup_copy_back = opt_ibx_copy_back;                                     
  xtrabackup_move_back = opt_ibx_move_back;                                     
  opt_galera_info = opt_ibx_galera_info;                                        
  opt_slave_info = opt_ibx_slave_info;                                          
  opt_no_lock = opt_ibx_no_lock;                                                
  opt_safe_slave_backup = opt_ibx_safe_slave_backup;                            
  opt_rsync = opt_ibx_rsync;                                                    
  opt_force_non_empty_dirs = opt_ibx_force_non_empty_dirs;                      
  opt_noversioncheck = opt_ibx_noversioncheck;                                  
  opt_no_backup_locks = opt_ibx_no_backup_locks;                                
  opt_decompress = opt_ibx_decompress;                                          

There is no effort to maintain it at all(I think this is because there is almost no difference between innobackupex and mariabackup options, and because nobody use innobackupex, and we don't have related bug reports). And you are correct, we gain nothing in functionality too by removing it. It's just code clean-up task to get rid of copy-pasted code. And if we really need the compatibility with innobackupex, we can keep it.

Comment by Sergei Golubchik [ 2020-09-18 ]

If indeed "nobody use innobackupex", then we'd better remove this 1K lines of code.

Comment by Viktor Szépe [ 2021-05-31 ]

Please consider adding a "timestamp" option to normal mode, so users are not forced to use

date --utc "+%F_%H-%M-%S"

to generate a sub-directory name.
Thank you.

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