# Prepare: innodb\_init(): Error occured

**URL:** https://forums.percona.com/t/prepare-innodb-init-error-occured/13641
**Category:** Percona XtraBackup
**Created:** [December 26, 2021, 12:49pm UTC](https://forums.percona.com/t/prepare-innodb-init-error-occured/13641 "2021-12-26T12:49:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zebra8815](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/zebra8815/32/5406_2.png) [@zebra8815](https://forums.percona.com/u/zebra8815)
#### Post date: [December 26, 2021, 12:49pm UTC](https://forums.percona.com/t/prepare-innodb-init-error-occured/13641/1 "2021-12-26T12:49:34Z")

</div>

xtrabackup version 8.0.26-18 based on MySQL server 8.0.26 Linux (x86\_64) (revision id: 4aecf82)  
Server version: 8.0.26-16 Percona Server (GPL), Release ‘16’, Revision ‘3d64165’

xtrabackup --backup --target-dir=.

xtrabackup: using the following InnoDB configuration:  
xtrabackup: innodb\_data\_home\_dir = .  
xtrabackup: innodb\_data\_file\_path = ibdata1:12M:autoextend  
xtrabackup: innodb\_log\_group\_home\_dir = ./  
xtrabackup: innodb\_log\_files\_in\_group = 2  
xtrabackup: innodb\_log\_file\_size = 4294967296  
Number of pools: 1  
xtrabackup: inititialize\_service\_handles suceeded

When i try to prepare i receive error:  
xtrabackup --prepare --target-dir=.

```auto

xtrabackup: recognized server arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksums=1 --innodb_data_file_path=ibdata1:12M:autoextend --innodb_log_files_in_group=2 --innodb_log_file_size=4294967296 --innodb_page_size=16384 --innodb_undo_directory=./ --innodb_undo_tablespaces=2 --server-id=1 --innodb_log_checksums=ON --innodb_redo_log_encrypt=0 --innodb_undo_log_encrypt=0
xtrabackup: recognized client arguments: --prepare=1 --target-dir=.
xtrabackup version 8.0.26-18 based on MySQL server 8.0.26 Linux (x86_64) (revision id: 4aecf82)
xtrabackup: cd to /root/tstbckp/
xtrabackup: This target seems to be not prepared yet.
Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=8388608, start_lsn=(2118538983461)
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup: innodb_log_group_home_dir = .
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 8388608
xtrabackup: inititialize_service_handles suceeded
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup: innodb_log_group_home_dir = .
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 8388608
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
PUNCH HOLE support available
Uses event mutexes
GCC builtin __atomic_thread_fence() is used for memory barrier
Compressed tables use zlib 1.2.11
Number of pools: 1
Using CPU crc32 instructions
Directories to scan './'
Scanning './'
Completed space ID check of 303 files.
Initializing buffer pool, total size = 128.000000M, instances = 1, chunk size =128.000000M
Completed initialization of buffer pool
page_cleaner coordinator priority: -20
page_cleaner worker priority: -20
page_cleaner worker priority: -20
page_cleaner worker priority: -20
The log sequence number 12 in the system tablespace does not match the log sequence number 2118538983461 in the ib_logfiles!
Database was not shutdown normally!
Starting crash recovery.
Starting to parse redo log at lsn = 2118538983461, whereas checkpoint_lsn = 2118538983461 and start_lsn = 2118538983424
Doing recovery: scanned up to log sequence number 2118540089600
Log background threads are being started...
Applying a batch of 485 redo log records ...
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Apply batch completed!
Using undo tablespace './undo_001'.
Using undo tablespace './undo_002'.
Opened 2 existing undo tablespaces.
GTID recovery trx_no: 137950267
Parallel initialization of rseg complete
Time taken to initialize rseg using 4 thread: 61538 ms.
Creating shared tablespace for temporary tables
Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
File './ibtmp1' size is now 12 MB.
Scanning temp tablespace dir:'./#innodb_temp/'
Created 128 and tracked 128 new rollback segment(s) in the temporary tablespace. 128 are now active.
8.0.26 started; log sequence number 2118540089610
Allocated tablespace ID 21 for sys/sys_config, old maximum was 0
xtrabackup: innodb_init(): Error occured.

```

---

<div class="post-metadata">

### Author: ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)
#### Post date: [December 27, 2021, 12:24pm UTC](https://forums.percona.com/t/prepare-innodb-init-error-occured/13641/2 "2021-12-27T12:24:48Z")

</div>

Hi There,

This issue means innodb had some issue trying to start. Some times this is caused by different configuration between server vs backup. Can you try to run your `--prepare` with `--no-defaults-` as follow:

```auto
xtrabackup --no-defaults --prepare --target-dir=/root/tstbckp/

```

Thanks in advance.
