# Problem with running xtrabackup 24 in debian with WSL2

**URL:** <https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252>\
**Category:** Percona XtraBackup\
**Created:** [February 4, 2022, 2:51pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252 "2022-02-04T14:51:12Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![sodith](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sodith](https://forums.percona.com/u/sodith)\
**Post date:** [February 4, 2022, 2:51pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/1 "2022-02-04T14:51:12Z")

</div>

Hi,  
I try to make a backup for my MYSQL Server which runs in Windows 10, I’ve installed debian using WSL2 on same machine but I keep getting the same error.  
My MySQL version is 5.7.27  
and I use this: xtrabackup version 2.4.24 based on MySQL server 5.7.35 Linux (x86\_64) (revision id: b4ee263)

and the following is my error:

root@DESKTOP-RU61JK7:/mnt/c/Users/MRC# xtrabackup --backup --datadir=“/mnt/c/mysql/data/” --target-dir=“/mnt/c/backup/” --no-timestamp --parallel=4 --user=backup --password=1234 -H 192.168.1.132  
xtrabackup: recognized server arguments: --datadir=/mnt/c/mysql/data/ --parallel=4  
xtrabackup: recognized client arguments: --backup=1 --target-dir=/mnt/c/backup/ --user=backup --password=\* --host=192.168.1.132  
220204 17:47:55 version\_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql\_read\_default\_group=xtrabackup;host=192.168.1.132’ as ‘backup’ (using password: YES).  
220204 17:47:55 version\_check Connected to MySQL server  
220204 17:47:55 version\_check Executing a version check against the server…  
220204 17:47:55 version\_check Done.  
220204 17:47:55 Connecting to MySQL server host: 192.168.1.132, user: backup, password: set, port: not set, socket: not set  
Using server version 5.7.27  
Warning: MySQL variable ‘datadir’ points to nonexistent directory 'C:\mysql\data'  
Warning: option ‘datadir’ has different values:  
‘/mnt/c/mysql/data/’ in defaults file  
'C:\mysql\data' in SHOW VARIABLES  
xtrabackup version 2.4.24 based on MySQL server 5.7.35 Linux (x86\_64) (revision id: b4ee263)  
xtrabackup: uses posix\_fadvise().  
xtrabackup: cd to /mnt/c/mysql/data/  
xtrabackup: open files limit requested 0, set to 1024  
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 = 268435456  
InnoDB: Number of pools: 1  
220204 17:47:55 \>\> log scanned up to (5724105)  
2022-02-04 17:47:56 0x7f01d8943740 InnoDB: Assertion failure in thread 139645905286976 in file srv0start.cc line 936  
InnoDB: Failing assertion: dir  
InnoDB: We intentionally generate a memory trap.  
InnoDB: Submit a detailed bug report to [http://bugs.mysql.com](http://bugs.mysql.com).  
InnoDB: If you get repeated assertion failures or crashes, even  
InnoDB: immediately after the mysqld startup, there may be  
InnoDB: corruption in the InnoDB tablespace. Please refer to  
InnoDB: [MySQL :: MySQL 5.7 Reference Manual :: 14.22.2 Forcing InnoDB Recovery](http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html)  
InnoDB: about forcing recovery.  
14:47:56 UTC - xtrabackup got signal 6 ;  
This could be because you hit a bug or data is corrupted.  
This error can also be caused by malfunctioning hardware.  
Attempting to collect some information that could help diagnose the problem.  
As this is a crash and something is definitely wrong, the information  
collection process might fail.

Thread pointer: 0x0  
Attempting backtrace. You can use the following information to find out  
where mysqld died. If you see no messages after this, something went  
terribly wrong…  
stack\_bottom = 0 thread\_stack 0x10000  
xtrabackup(my\_print\_stacktrace+0x3b)[0x56029e5e9f1b]  
xtrabackup(handle\_fatal\_signal+0x285)[0x56029e2a53f5]  
/lib/x86\_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f01d85240c0]  
/lib/x86\_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f01d6075fff]  
/lib/x86\_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f01d607742a]  
xtrabackup(+0x5667e6)[0x56029df667e6]  
xtrabackup(\_Z25srv\_undo\_tablespaces\_initbbmPm+0x1281)[0x56029e391991]  
xtrabackup(\_Z22xtrabackup\_backup\_funcv+0x1866)[0x56029df8dd96]  
xtrabackup(main+0xf23)[0x56029df6f693]  
/lib/x86\_64-linux-gnu/libc.so.6(\_\_libc\_start\_main+0xf1)[0x7f01d60632e1]  
xtrabackup(\_start+0x2a)[0x56029df841aa]

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 4, 2022, 4:22pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/2 "2022-02-04T16:22:46Z")

</div>

Hi @sodith , welcome to the Percona forums!

Percona XtraBackup is not supported on Windows. Consider running on a full Linux distribution and verifying if you continue to hit this same error.

> [@sodith](#):
>
> 2022-02-04 17:47:56 0x7f01d8943740 InnoDB: Assertion failure in thread 139645905286976 in file srv0start.cc line 936

---

<div class="post-metadata">

**Author:** ![sodith](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sodith](https://forums.percona.com/u/sodith)\
**Post date:** [February 4, 2022, 4:37pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/3 "2022-02-04T16:37:22Z")

</div>

Hi,  
Isn’t WSL2 almost same as full Linux?  
Can I use a different machine in network that uses Linux?

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 4, 2022, 4:43pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/4 "2022-02-04T16:43:18Z")

</div>

Hi @sodith

Our Supported Platforms are listed on this page: [Percona Release Lifecycle Overview](https://www.percona.com/services/policies/percona-software-support-lifecycle#mysql)

Unfortunately we don’t support Windows and don’t provide packages for this platform.

My recommendation is that you provision a Linux-only host and try to reproduce your workload, and if you hit the same error we will be in a position to assist you. Best of luck!

---

<div class="post-metadata">

**Author:** ![sodith](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sodith](https://forums.percona.com/u/sodith)\
**Post date:** [February 4, 2022, 4:51pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/5 "2022-02-04T16:51:40Z")

</div>

But I’ve seen people doing it, I just don’t know what I do wrong.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [February 5, 2022, 6:55pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/6 "2022-02-05T18:55:18Z")

</div>

Xtrabackup takes backups by copying actual files on disk. You would need to map your datadir into your Linux environment. As Michael said, this is not supported, even though others have accomplished this.

---

<div class="post-metadata">

**Author:** ![sodith](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sodith](https://forums.percona.com/u/sodith)\
**Post date:** [February 7, 2022, 6:10am UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/7 "2022-02-07T06:10:30Z")

</div>

I already have, when I navigate to “/mnt/c/mysql/data/” I can see my datadir folder and the user I’m working on has read permission.

---

<div class="post-metadata">

**Author:** ![vadimtk](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadimtk/32/9528_2.png) [@vadimtk](https://forums.percona.com/u/vadimtk)\
**Post date:** [February 8, 2022, 1:08pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/8 "2022-02-08T13:08:53Z")

</div>

@sodith  
In theory it should work, but as other mentioned this is not supported platform, so we do not test it regularly.  
First that comes to mind is to make sure you have enough permissions for  
both --datadir=“/mnt/c/mysql/data/” --target-dir=“/mnt/c/backup/” directories.  
Another thing that caught my attention:

> [@sodith](#):
>
> Warning: MySQL variable ‘datadir’ points to nonexistent directory ‘C:\mysql\data’  
> Warning: option ‘datadir’ has different values:

it may happen that xtrabackup is still trying to do something with “C:\mysql\data” which is not accessible from WSL

---

<div class="post-metadata">

**Author:** ![sodith](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sodith](https://forums.percona.com/u/sodith)\
**Post date:** [February 8, 2022, 1:24pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/9 "2022-02-08T13:24:12Z")

</div>

Yeah I saw those warnings but it looks like xtrabackup just kept continue untill it throws an error, any way to get more details about this failed assertion for dir?

---

<div class="post-metadata">

**Author:** ![vadimtk](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadimtk/32/9528_2.png) [@vadimtk](https://forums.percona.com/u/vadimtk)\
**Post date:** [February 8, 2022, 1:32pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/10 "2022-02-08T13:32:08Z")

</div>

looking at source code location

> <https://github.com/mysql/mysql-server/blob/mysql-5.7.37/storage/innobase/srv/srv0start.cc#L936>

it might be related to undo spaces.

Do you have a special config for undo tablespace?

---

<div class="post-metadata">

**Author:** ![sodith](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sodith](https://forums.percona.com/u/sodith)\
**Post date:** [February 8, 2022, 1:37pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/11 "2022-02-08T13:37:08Z")

</div>

I’m literally using MySQL in the very default way possible, nothing different or special. Thinking of, maybe that is the problem, I should’ve configured some settings maybe

Update: I’ve checked the file on 5.7.27 over here

> <https://github.com/mysql/mysql-server/blob/mysql-5.7.27/storage/innobase/srv/srv0start.cc#L936>

there is a method call to “fil\_set\_max\_space\_id\_if\_bigger” I’ll check that one out

---

<div class="post-metadata">

**Author:** ![sodith](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sodith](https://forums.percona.com/u/sodith)\
**Post date:** [April 13, 2022, 11:53am UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/12 "2022-04-13T11:53:47Z")

</div>

Up, I still need to solve this issue.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 13, 2022, 12:04pm UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/13 "2022-04-13T12:04:39Z")

</div>

Hello @sodith,  
As it has been said by a couple times above, Windows is not a supported platform. You need to make sure all directories are mounted and permissions are good and path parameters are correct. Good luck!

---

<div class="post-metadata">

**Author:** ![sodith](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sodith](https://forums.percona.com/u/sodith)\
**Post date:** [April 29, 2022, 6:41am UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/14 "2022-04-29T06:41:53Z")

</div>

Hello Matthew,  
You say it’s not supported but the only problem left is that percona is taking the data directory from mysql. If I only can provide and skip that phase it will work… The problem is when percona takes that value from mysql server, mysql gives a windows path…

---

<div class="post-metadata">

**Author:** ![brucefoo](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@brucefoo](https://forums.percona.com/u/brucefoo)\
**Post date:** [January 24, 2024, 6:58am UTC](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252/15 "2024-01-24T06:58:23Z")

</div>

I have also encountered this problem, and finally resolved, hope to be able to help you and other people like us

**The innodb\_undo\_directory variable defines the location of undo tablespace files. If the innodb\_undo\_directory variable is undefined, undo tablespaces reside in the data directory.**

set the `innodb_undo_directory` = `/mnt/c/mysql/data/` in new file named `xtrabackup.ini` ,the content like this

```auto
[mysqld]
datadir = "/mnt/c/mysql/data/"
innodb_undo_directory = "/mnt/c/mysql/data/"

```

last,try

```auto
 xtrabackup --defaults-file="/path/to/xtrabackup.ini" --backup --datadir="/mnt/c/mysql/data/" --target-dir="/mnt/c/backup/" --no-timestamp --parallel=4 --user=backup --password=1234 -H 192.168.1.132

```
