# Compilation on Windows

**URL:** <https://forums.percona.com/t/compilation-on-windows/15300>\
**Category:** Percona XtraBackup\
**Created:** [April 19, 2022, 2:50pm UTC](https://forums.percona.com/t/compilation-on-windows/15300 "2022-04-19T14:50:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aik.fiend](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@aik.fiend](https://forums.percona.com/u/aik.fiend)\
**Post date:** [April 19, 2022, 2:50pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/1 "2022-04-19T14:50:20Z")

</div>

Greetings, hope to find you all well.

Any information about a successful compilation of the Xtrabackup on Windows?

Here’s a little hope that it can be compiled on Windows:

> **[percona-xtrabackup/Docs at 8.0 · percona/percona-xtrabackup](https://github.com/percona/percona-xtrabackup/tree/8.0/Docs)**
>
> 8.0/Docs

Or it was just inherited from here:

> **[mysql-server/Docs at 8.0 · mysql/mysql-server](https://github.com/mysql/mysql-server/tree/8.0/Docs)**
>
> 8.0/Docs

and to build it on Windows you need to make your own fork?

Yep, I know that it can be launched in Docker on Windows, but I am interested exactly in compiling on Windows.

---

<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 19, 2022, 3:21pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/2 "2022-04-19T15:21:30Z")

</div>

Hello @aik.fiend ,  
Windows is not a supported Percona OS for any of our software. We have no development processes that check that our code successfully builds on Windows. You don’t need to make your own fork, simply clone the repos and give it a go. Even if it compiles, there is no guarantee that all features will work.

Could you give us insight into why you desire a native Windows build? You can very easily run a standard VM with mysql inside, and then use xtrabackup natively.

---

<div class="post-metadata">

**Author:** ![aik.fiend](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@aik.fiend](https://forums.percona.com/u/aik.fiend)\
**Post date:** [April 19, 2022, 4:22pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/3 "2022-04-19T16:22:46Z")

</div>

@matthew, if you try to compile it right now on Windows - you’ll get a couple of issues, so it cannot be compiled successfully. Fixes made in a fork probably may resolve the issues, you can merge a pull request then or just leave it as is if you do not want to support Windows.

I need a native Windows app because existing MySQL Servers are already running on Windows and it would cost too many efforts and resources to support each existing and new installation: migrate on Linux / play with Docker / use VMs / mount NFS / etc. Therefore I am trying to find a unified solution.

---

<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 19, 2022, 4:50pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/4 "2022-04-19T16:50:10Z")

</div>

@aik.fiend,  
Any forks for windows support would benefit others like yourself. Percona has no plans to support Windows.

Docker is not required, nor is NFS. Migrating a 100GB MySQL on Windows to linux would take about an hour; it’s not difficult. Most of that time is waiting for the logical dump and import to finish.

I doubt you’ll ever find a unified solution. Physical backup tools (which is what xtrabackup creates) don’t exist for Windows. The only solution you’d have here is disk-level snapshots. Logical backups will work on Windows, but these are the slowest method to use.

---

<div class="post-metadata">

**Author:** ![aik.fiend](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@aik.fiend](https://forums.percona.com/u/aik.fiend)\
**Post date:** [April 19, 2022, 5:52pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/5 "2022-04-19T17:52:31Z")

</div>

@matthewb, thank you very much for your suggestions. Of course, just migrating the data doesn’t cost much time.

But every case may be specific. Someone just does not want to have Linux, sometimes you just do not have the access to the infrastructure. Someone may like more solutions with NFS or Docker.

@matthewb, @vadimtk,  
may I know the reason why Percona does not want to support Windows?  
It looks like the reason was in something conceptual since 2011:

> **[Percona XtraBackup 1.6 for Windows "try me" edition - Percona Database...](https://www.percona.com/blog/2011/04/21/percona-xtrabackup-1-6-for-windows-try-me-edition/)**
>
> Previously we had XtraBackup Windows binaries for 1.0 and 1.2 releases, and they were based on Cygwin compilation of MySQL. After MySQL 5.5 moved to CMake, and cygwin compilation is not supported anymore, it took some efforts for us to come up with...

---

<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 19, 2022, 6:10pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/6 "2022-04-19T18:10:02Z")

</div>

Windows is difficult to code against, for starters. Additionally, not many Enterprise companies use MySQL on Windows. We have many thousands of customers and less than a handful use MySQL on Windows, and in almost all of those cases it’s MySQL in a VM on a windows machine. It’s just not worth the time/effort/expense to get our software as performant on Windows as on Linux.

---

<div class="post-metadata">

**Author:** ![Cory\_Kitay](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cory_kitay/32/14808_2.png) [@Cory\_Kitay](https://forums.percona.com/u/Cory_Kitay)\
**Post date:** [January 23, 2024, 7:12pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/8 "2024-01-23T19:12:45Z")

</div>

Just wanted to reply to this since I am having a similar problem.

I have ran it from a VM running ubuntu linux but Percona still doesn’t work when attempting to back-up from windows using linux remotely.

Using something like this, but it doesn’t work:

> **[Percona XtraBackup for Windows](https://www.percona.com/blog/percona-xtrabackup-for-windows/)**
>
> There is no Percona XtraBackup for Windows. But this doesn't mean that you can't use XtraBackup to backup MySQL running on Windows.

This post has an example of why it doesn’t work:

> [@Problem with running xtrabackup 24 in debian with WSL2](https://forums.percona.com/t/problem-with-running-xtrabackup-24-in-debian-with-wsl2/14252):
>
> 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 --passwor…

Percona’s answer seems to be to just not use Windows for hosting mysql, unfortunately that’s not a practical answer when you’ve inherited a production mysql database that way.

---

<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:** [January 23, 2024, 8:00pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/9 "2024-01-23T20:00:12Z")

</div>

Hello @Cory_Kitay,  
Yes, xtrabackup is written for linux OS. The example you gave is a crash where PXB attempts to make an OS-level call to access a file on Windows filesystem that does not work.

The only solution here is to use either mydumper (you would have to custom compile it on Windows, if that even works) or migrate to a linux-based OS.

I understand that you inherited it as Windows, but that does not preclude migration to linux. In fact, I have 3 clients which are doing this very migration. We are moving them, 100% uptime/online, from MySQL 5.7 on Windows to MySQL 8 on Ubuntu. You can create a new VM with linux, install MySQL, take and restore a backup from prod Windows, configure replication to catch up data changes, then switch the IP from windows machine to linux machine to complete the migration.

---

<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 27, 2025, 5:46pm UTC](https://forums.percona.com/t/compilation-on-windows/15300/11 "2025-02-27T17:46:24Z")

</div>

Closed on February 27, 2025, 5:46pm UTC


