[MDEV-32361] mariadb-backup --move-back leaves out ib_logfile0 Created: 2023-10-06  Updated: 2023-10-30  Resolved: 2023-10-06

Status: Closed
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.4, 10.4.31, 10.5, 10.6, 10.7
Fix Version/s: 10.4.32, 10.5.23, 10.6.16

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Attachments: File backup.tar.bz2    
Issue Links:
Relates
relates to MDEV-27199 Require ib_logfile0 to exist unless i... Closed

 Description   

This makes restoring a 10.4 prepared instance to 10.11 faulty. The ib_logfile0 is left in the initial directory.



 Comments   
Comment by Marko Mäkelä [ 2023-10-06 ]

danblack, can you attach a copy of such a 10.4 data directory?

When I implemented MDEV-27199, I intended to make sure that if no ib_logfile0 exists, but the system tablespace contains a nonzero FIL_PAGE_FILE_FLUSH_LSN, that one would be used for creating a new log file. Is this logic not working as intended?

Comment by Daniel Black [ 2023-10-06 ]

$  extra/mariabackup/mariadb-backup --no-defaults  --backup --target-dir=/tmp/backup --socket=/tmp/build-mariadb-server-10.4.sock  --user dan
[00] 2023-10-06 08:35:24 Connecting to MySQL server host: localhost, user: dan, password: not set, port: not set, socket: /tmp/build-mariadb-server-10.4.sock
[00] 2023-10-06 08:35:24 Using server version 10.4.32-MariaDB
extra/mariabackup/mariadb-backup based on MariaDB server 10.4.32-MariaDB Linux (x86_64)
[00] 2023-10-06 08:35:24 uses posix_fadvise().
[00] 2023-10-06 08:35:24 cd to /tmp/build-mariadb-server-10.4-datadir/
[00] 2023-10-06 08:35:24 open files limit requested 0, set to 1024
[00] 2023-10-06 08:35:24 mariabackup: using the following InnoDB configuration:
[00] 2023-10-06 08:35:24 innodb_data_home_dir = 
[00] 2023-10-06 08:35:24 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2023-10-06 08:35:24 innodb_log_group_home_dir = ./
[00] 2023-10-06 08:35:24 InnoDB: Using Linux native AIO
2023-10-06  8:35:24 0 [Note] InnoDB: Number of pools: 1
[00] 2023-10-06 08:35:24 mariabackup: Generating a list of tablespaces
[00] 2023-10-06 08:35:24 >> log scanned up to (60952)
[01] 2023-10-06 08:35:24 Copying ibdata1 to /tmp/backup/ibdata1
[01] 2023-10-06 08:35:24         ...done
[01] 2023-10-06 08:35:24 Copying ./mysql/gtid_slave_pos.ibd to /tmp/backup/mysql/gtid_slave_pos.ibd
[01] 2023-10-06 08:35:24         ...done
[01] 2023-10-06 08:35:24 Copying ./mysql/transaction_registry.ibd to /tmp/backup/mysql/transaction_registry.ibd
[01] 2023-10-06 08:35:24         ...done
[01] 2023-10-06 08:35:24 Copying ./mysql/innodb_index_stats.ibd to /tmp/backup/mysql/innodb_index_stats.ibd
[01] 2023-10-06 08:35:24         ...done
[01] 2023-10-06 08:35:24 Copying ./mysql/innodb_table_stats.ibd to /tmp/backup/mysql/innodb_table_stats.ibd
[01] 2023-10-06 08:35:24         ...done
[00] 2023-10-06 08:35:25 >> log scanned up to (60952)
[00] 2023-10-06 08:35:25 Acquiring BACKUP LOCKS...
[00] 2023-10-06 08:35:25 Starting to backup non-InnoDB tables and files
[01] 2023-10-06 08:35:25 Copying ./test/db.opt to /tmp/backup/test/db.opt
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./performance_schema/db.opt to /tmp/backup/performance_schema/db.opt
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/gtid_slave_pos.frm to /tmp/backup/mysql/gtid_slave_pos.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/index_stats.MAD to /tmp/backup/mysql/index_stats.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/index_stats.MAI to /tmp/backup/mysql/index_stats.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/index_stats.frm to /tmp/backup/mysql/index_stats.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/column_stats.MAD to /tmp/backup/mysql/column_stats.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/column_stats.MAI to /tmp/backup/mysql/column_stats.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/column_stats.frm to /tmp/backup/mysql/column_stats.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/table_stats.MAD to /tmp/backup/mysql/table_stats.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/table_stats.MAI to /tmp/backup/mysql/table_stats.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/table_stats.frm to /tmp/backup/mysql/table_stats.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/proxies_priv.MAD to /tmp/backup/mysql/proxies_priv.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/proxies_priv.MAI to /tmp/backup/mysql/proxies_priv.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/proxies_priv.frm to /tmp/backup/mysql/proxies_priv.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/transaction_registry.frm to /tmp/backup/mysql/transaction_registry.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/innodb_index_stats.frm to /tmp/backup/mysql/innodb_index_stats.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/innodb_table_stats.frm to /tmp/backup/mysql/innodb_table_stats.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/event.MAD to /tmp/backup/mysql/event.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/event.MAI to /tmp/backup/mysql/event.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/event.frm to /tmp/backup/mysql/event.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/slow_log.CSV to /tmp/backup/mysql/slow_log.CSV
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/slow_log.CSM to /tmp/backup/mysql/slow_log.CSM
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/slow_log.frm to /tmp/backup/mysql/slow_log.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/general_log.CSV to /tmp/backup/mysql/general_log.CSV
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/general_log.CSM to /tmp/backup/mysql/general_log.CSM
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/general_log.frm to /tmp/backup/mysql/general_log.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/procs_priv.MAD to /tmp/backup/mysql/procs_priv.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/procs_priv.MAI to /tmp/backup/mysql/procs_priv.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/procs_priv.frm to /tmp/backup/mysql/procs_priv.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/proc.MAD to /tmp/backup/mysql/proc.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/proc.MAI to /tmp/backup/mysql/proc.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/proc.frm to /tmp/backup/mysql/proc.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_leap_second.MAD to /tmp/backup/mysql/time_zone_leap_second.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_leap_second.MAI to /tmp/backup/mysql/time_zone_leap_second.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_leap_second.frm to /tmp/backup/mysql/time_zone_leap_second.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_transition_type.MAD to /tmp/backup/mysql/time_zone_transition_type.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_transition_type.MAI to /tmp/backup/mysql/time_zone_transition_type.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_transition_type.frm to /tmp/backup/mysql/time_zone_transition_type.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_transition.MAD to /tmp/backup/mysql/time_zone_transition.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_transition.MAI to /tmp/backup/mysql/time_zone_transition.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_transition.frm to /tmp/backup/mysql/time_zone_transition.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone.MAD to /tmp/backup/mysql/time_zone.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone.MAI to /tmp/backup/mysql/time_zone.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone.frm to /tmp/backup/mysql/time_zone.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_name.MAD to /tmp/backup/mysql/time_zone_name.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_name.MAI to /tmp/backup/mysql/time_zone_name.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/time_zone_name.frm to /tmp/backup/mysql/time_zone_name.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_keyword.MAD to /tmp/backup/mysql/help_keyword.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_keyword.MAI to /tmp/backup/mysql/help_keyword.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_keyword.frm to /tmp/backup/mysql/help_keyword.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_relation.MAD to /tmp/backup/mysql/help_relation.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_relation.MAI to /tmp/backup/mysql/help_relation.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_relation.frm to /tmp/backup/mysql/help_relation.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_category.MAD to /tmp/backup/mysql/help_category.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_category.MAI to /tmp/backup/mysql/help_category.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_category.frm to /tmp/backup/mysql/help_category.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_topic.MAD to /tmp/backup/mysql/help_topic.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_topic.MAI to /tmp/backup/mysql/help_topic.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/help_topic.frm to /tmp/backup/mysql/help_topic.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/columns_priv.MAD to /tmp/backup/mysql/columns_priv.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/columns_priv.MAI to /tmp/backup/mysql/columns_priv.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/columns_priv.frm to /tmp/backup/mysql/columns_priv.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/tables_priv.MAD to /tmp/backup/mysql/tables_priv.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/tables_priv.MAI to /tmp/backup/mysql/tables_priv.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/tables_priv.frm to /tmp/backup/mysql/tables_priv.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/servers.MAD to /tmp/backup/mysql/servers.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/servers.MAI to /tmp/backup/mysql/servers.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/servers.frm to /tmp/backup/mysql/servers.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/plugin.MAD to /tmp/backup/mysql/plugin.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/plugin.MAI to /tmp/backup/mysql/plugin.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/plugin.frm to /tmp/backup/mysql/plugin.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/func.MAD to /tmp/backup/mysql/func.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/func.MAI to /tmp/backup/mysql/func.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/func.frm to /tmp/backup/mysql/func.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/roles_mapping.MAD to /tmp/backup/mysql/roles_mapping.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/roles_mapping.MAI to /tmp/backup/mysql/roles_mapping.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/roles_mapping.frm to /tmp/backup/mysql/roles_mapping.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/user.frm to /tmp/backup/mysql/user.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/global_priv.MAD to /tmp/backup/mysql/global_priv.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/global_priv.MAI to /tmp/backup/mysql/global_priv.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/global_priv.frm to /tmp/backup/mysql/global_priv.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/db.MAD to /tmp/backup/mysql/db.MAD
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/db.MAI to /tmp/backup/mysql/db.MAI
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/db.frm to /tmp/backup/mysql/db.frm
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying ./mysql/db.opt to /tmp/backup/mysql/db.opt
[01] 2023-10-06 08:35:25         ...done
[00] 2023-10-06 08:35:25 Finished backing up non-InnoDB tables and files
[01] 2023-10-06 08:35:25 Copying /tmp/build-mariadb-server-10.4-datadir//aria_log.00000001 to /tmp/backup/aria_log.00000001
[01] 2023-10-06 08:35:25         ...done
[01] 2023-10-06 08:35:25 Copying /tmp/build-mariadb-server-10.4-datadir//aria_log_control to /tmp/backup/aria_log_control
[01] 2023-10-06 08:35:25         ...done
[00] 2023-10-06 08:35:25 Waiting for log copy thread to read lsn 60952
[00] 2023-10-06 08:35:26 >> log scanned up to (60952)
[00] 2023-10-06 08:35:26 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
[00] 2023-10-06 08:35:26 mariabackup: The latest check point (for incremental): '60943'
mariabackup: Stopping log copying thread.[00] 2023-10-06 08:35:26 >> log scanned up to (60952)
 
[00] 2023-10-06 08:35:26 >> log scanned up to (60952)
[00] 2023-10-06 08:35:26 Executing BACKUP STAGE END
[00] 2023-10-06 08:35:26 All tables unlocked
[00] 2023-10-06 08:35:26 Backup created in directory '/tmp/backup/'
[00] 2023-10-06 08:35:26 Writing backup-my.cnf
[00] 2023-10-06 08:35:26         ...done
[00] 2023-10-06 08:35:26 Writing xtrabackup_info
[00] 2023-10-06 08:35:26         ...done
[00] 2023-10-06 08:35:26 Redo log (from LSN 60943 to 60952) was copied.
[00] 2023-10-06 08:35:26 completed OK!
 
~/repos/build-mariadb-server-10.4 
$ extra/mariabackup/mariabackup --prepare --target-dir=/tmp/backup
extra/mariabackup/mariabackup based on MariaDB server 10.4.32-MariaDB Linux (x86_64)
[00] 2023-10-06 08:35:59 cd to /tmp/backup/
[00] 2023-10-06 08:35:59 open files limit requested 0, set to 1024
[00] 2023-10-06 08:35:59 This target seems to be not prepared yet.
[00] 2023-10-06 08:35:59 mariabackup: using the following InnoDB configuration for recovery:
[00] 2023-10-06 08:35:59 innodb_data_home_dir = .
[00] 2023-10-06 08:35:59 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2023-10-06 08:35:59 innodb_log_group_home_dir = .
[00] 2023-10-06 08:35:59 InnoDB: Using Linux native AIO
[00] 2023-10-06 08:35:59 Starting InnoDB instance for recovery.
[00] 2023-10-06 08:35:59 mariabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
2023-10-06  8:35:59 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-10-06  8:35:59 0 [Note] InnoDB: Uses event mutexes
2023-10-06  8:35:59 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2023-10-06  8:35:59 0 [Note] InnoDB: Number of pools: 1
2023-10-06  8:35:59 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-10-06  8:35:59 0 [Note] InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
2023-10-06  8:35:59 0 [Note] InnoDB: Completed initialization of buffer pool
2023-10-06  8:35:59 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2023-10-06  8:35:59 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=60943
[00] 2023-10-06 08:35:59 Last binlog file , position 0
[00] 2023-10-06 08:35:59 completed OK!
 
$ tar -cvf /tmp/backup.tar /tmp/backup
 
$ extra/mariabackup/mariabackup --target-dir=/tmp/backup/ --datadir=/tmp/restore --move-back
extra/mariabackup/mariabackup based on MariaDB server 10.11.6-MariaDB Linux (x86_64)
[01] 2023-10-06 08:39:29 Moving ./aria_log_control to /tmp/restore/aria_log_control
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./aria_log.00000001 to /tmp/restore/aria_log.00000001
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ib_logfile0 to /tmp/restore/ib_logfile0
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ibdata1 to /tmp/restore/./ibdata1
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./xtrabackup_info to /tmp/restore/xtrabackup_info
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./performance_schema/db.opt to /tmp/restore/performance_schema/db.opt
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./test/db.opt to /tmp/restore/test/db.opt
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/db.opt to /tmp/restore/mysql/db.opt
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/db.frm to /tmp/restore/mysql/db.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/db.MAI to /tmp/restore/mysql/db.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/db.MAD to /tmp/restore/mysql/db.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/global_priv.frm to /tmp/restore/mysql/global_priv.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/global_priv.MAI to /tmp/restore/mysql/global_priv.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/global_priv.MAD to /tmp/restore/mysql/global_priv.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/user.frm to /tmp/restore/mysql/user.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/roles_mapping.frm to /tmp/restore/mysql/roles_mapping.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/roles_mapping.MAI to /tmp/restore/mysql/roles_mapping.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/roles_mapping.MAD to /tmp/restore/mysql/roles_mapping.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/func.frm to /tmp/restore/mysql/func.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/func.MAI to /tmp/restore/mysql/func.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/func.MAD to /tmp/restore/mysql/func.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/plugin.frm to /tmp/restore/mysql/plugin.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/plugin.MAI to /tmp/restore/mysql/plugin.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/plugin.MAD to /tmp/restore/mysql/plugin.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/servers.frm to /tmp/restore/mysql/servers.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/servers.MAI to /tmp/restore/mysql/servers.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/servers.MAD to /tmp/restore/mysql/servers.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/tables_priv.frm to /tmp/restore/mysql/tables_priv.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/tables_priv.MAI to /tmp/restore/mysql/tables_priv.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/tables_priv.MAD to /tmp/restore/mysql/tables_priv.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/columns_priv.frm to /tmp/restore/mysql/columns_priv.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/columns_priv.MAI to /tmp/restore/mysql/columns_priv.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/columns_priv.MAD to /tmp/restore/mysql/columns_priv.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_topic.frm to /tmp/restore/mysql/help_topic.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_topic.MAI to /tmp/restore/mysql/help_topic.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_topic.MAD to /tmp/restore/mysql/help_topic.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_category.frm to /tmp/restore/mysql/help_category.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_category.MAI to /tmp/restore/mysql/help_category.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_category.MAD to /tmp/restore/mysql/help_category.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_relation.frm to /tmp/restore/mysql/help_relation.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_relation.MAI to /tmp/restore/mysql/help_relation.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_relation.MAD to /tmp/restore/mysql/help_relation.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_keyword.frm to /tmp/restore/mysql/help_keyword.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_keyword.MAI to /tmp/restore/mysql/help_keyword.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/help_keyword.MAD to /tmp/restore/mysql/help_keyword.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_name.frm to /tmp/restore/mysql/time_zone_name.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_name.MAI to /tmp/restore/mysql/time_zone_name.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_name.MAD to /tmp/restore/mysql/time_zone_name.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone.frm to /tmp/restore/mysql/time_zone.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone.MAI to /tmp/restore/mysql/time_zone.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone.MAD to /tmp/restore/mysql/time_zone.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_transition.frm to /tmp/restore/mysql/time_zone_transition.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_transition.MAI to /tmp/restore/mysql/time_zone_transition.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_transition.MAD to /tmp/restore/mysql/time_zone_transition.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_transition_type.frm to /tmp/restore/mysql/time_zone_transition_type.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_transition_type.MAI to /tmp/restore/mysql/time_zone_transition_type.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_transition_type.MAD to /tmp/restore/mysql/time_zone_transition_type.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_leap_second.frm to /tmp/restore/mysql/time_zone_leap_second.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_leap_second.MAI to /tmp/restore/mysql/time_zone_leap_second.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/time_zone_leap_second.MAD to /tmp/restore/mysql/time_zone_leap_second.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/proc.frm to /tmp/restore/mysql/proc.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/proc.MAI to /tmp/restore/mysql/proc.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/proc.MAD to /tmp/restore/mysql/proc.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/procs_priv.frm to /tmp/restore/mysql/procs_priv.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/procs_priv.MAI to /tmp/restore/mysql/procs_priv.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/procs_priv.MAD to /tmp/restore/mysql/procs_priv.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/general_log.frm to /tmp/restore/mysql/general_log.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/general_log.CSM to /tmp/restore/mysql/general_log.CSM
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/general_log.CSV to /tmp/restore/mysql/general_log.CSV
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/slow_log.frm to /tmp/restore/mysql/slow_log.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/slow_log.CSM to /tmp/restore/mysql/slow_log.CSM
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/slow_log.CSV to /tmp/restore/mysql/slow_log.CSV
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/event.frm to /tmp/restore/mysql/event.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/event.MAI to /tmp/restore/mysql/event.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/event.MAD to /tmp/restore/mysql/event.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/innodb_table_stats.frm to /tmp/restore/mysql/innodb_table_stats.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/innodb_index_stats.frm to /tmp/restore/mysql/innodb_index_stats.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/transaction_registry.frm to /tmp/restore/mysql/transaction_registry.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/proxies_priv.frm to /tmp/restore/mysql/proxies_priv.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/proxies_priv.MAI to /tmp/restore/mysql/proxies_priv.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/proxies_priv.MAD to /tmp/restore/mysql/proxies_priv.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/table_stats.frm to /tmp/restore/mysql/table_stats.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/table_stats.MAI to /tmp/restore/mysql/table_stats.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/table_stats.MAD to /tmp/restore/mysql/table_stats.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/column_stats.frm to /tmp/restore/mysql/column_stats.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/column_stats.MAI to /tmp/restore/mysql/column_stats.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/column_stats.MAD to /tmp/restore/mysql/column_stats.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/index_stats.frm to /tmp/restore/mysql/index_stats.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/index_stats.MAI to /tmp/restore/mysql/index_stats.MAI
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/index_stats.MAD to /tmp/restore/mysql/index_stats.MAD
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/gtid_slave_pos.frm to /tmp/restore/mysql/gtid_slave_pos.frm
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/innodb_table_stats.ibd to /tmp/restore/mysql/innodb_table_stats.ibd
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/innodb_index_stats.ibd to /tmp/restore/mysql/innodb_index_stats.ibd
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/transaction_registry.ibd to /tmp/restore/mysql/transaction_registry.ibd
[01] 2023-10-06 08:39:29         ...done
[01] 2023-10-06 08:39:29 Moving ./mysql/gtid_slave_pos.ibd to /tmp/restore/mysql/gtid_slave_pos.ibd
[01] 2023-10-06 08:39:29         ...done
[00] 2023-10-06 08:39:29 completed OK!

Comment by Daniel Black [ 2023-10-06 ]

so I guess its the difference between prepare on 10.4 mariabackup and move-back in 10.11

Comment by Vladislav Vaintroub [ 2023-10-06 ]

As far as I remember, mariabackup backups are not portable between major versions.

Comment by Daniel Black [ 2023-10-06 ]

After they are prepared, I think its reasonable to expect them to be portable between major versions.

Comment by Marko Mäkelä [ 2023-10-06 ]

wlad, the mariadb-backup --prepare should be executed in the same major version that the backup was made with. That is not being violated here.

Because of MDEV-27199, MariaDB Server 10.8 or later would refuse to start up if an ib_logfile0 is not present:

10.11 034848c6c27530d8803ddcffffc58ba5ee12d9a4

2023-10-06 11:44:53 0 [Note] InnoDB: Completed initialization of buffer pool
2023-10-06 11:44:53 0 [Note] InnoDB: Setting O_DIRECT on file ./ibdata1 failed
2023-10-06 11:44:53 0 [ERROR] InnoDB: File ./ib_logfile0 was not found
2023-10-06 11:44:53 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1453] with error Generic error
2023-10-06 11:44:53 0 [Note] InnoDB: Starting shutdown...
2023-10-06 11:44:54 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

The dummy empty file in the prepared backup.tar.bz2 is fine; in that case MariaDB startup will read the shutdown LSN from the first page of the system tablespace and create a new log:

10.11 034848c6c27530d8803ddcffffc58ba5ee12d9a4

2023-10-06 11:43:30 0 [Note] InnoDB: Completed initialization of buffer pool
2023-10-06 11:43:30 0 [Note] InnoDB: Setting O_DIRECT on file ./ibdata1 failed
2023-10-06 11:43:30 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2023-10-06 11:43:30 0 [Note] InnoDB: Upgrading redo log: 4.000GiB; LSN=60952
2023-10-06 11:43:32 0 [Note] InnoDB: 128 rollback segments are active.

Did I understand it correctly that the MariaDB Server 10.11 startup would fail because in 10.4, mariadb-backup --move-back would not move the 0-sized ib_logfile0 to the data directory?

Comment by Daniel Black [ 2023-10-06 ]

Yes.

I was using the --move-back of 10.11 and the backup/prepare stage from 10.4, but same outcome.

Generated at Thu Feb 08 10:30:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.