# Extract XBSTREAM File to CSV

**URL:** <https://forums.percona.com/t/extract-xbstream-file-to-csv/21264>\
**Category:** Uncategorized\
**Created:** [April 9, 2023, 9:22pm UTC](https://forums.percona.com/t/extract-xbstream-file-to-csv/21264 "2023-04-09T21:22:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerry1337](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Jerry1337](https://forums.percona.com/u/Jerry1337)\
**Post date:** [April 9, 2023, 9:22pm UTC](https://forums.percona.com/t/extract-xbstream-file-to-csv/21264/1 "2023-04-09T21:22:55Z")

</div>

Hey there  
I received my xbstream file from percona and I would like to open it as csv file  
I extracted the file using xbstream command and I got around 3000 files in QP ending now what

---

<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:** [April 10, 2023, 2:31pm UTC](https://forums.percona.com/t/extract-xbstream-file-to-csv/21264/2 "2023-04-10T14:31:26Z")

</div>

Hi @Jerry1337

xbstream format will the transiet format to stream files from two nodes. The end result files are binary files, not suitable to be open as CSV.

> I extracted the file using xbstream command and I got around 3000 files in QP ending now what

It seems like the original backup used compression. Now you need to decompress the files either manually using qpress or using `xtrabackup --decompress --target-dir=/folder/with/qpress/files`

---

<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 10, 2023, 2:59pm UTC](https://forums.percona.com/t/extract-xbstream-file-to-csv/21264/3 "2023-04-10T14:59:16Z")

</div>

@Jerry1337 CSV stands for comma-separated-values, which is a string/text-based file type. This is akin to a _logical backup_. Xtrabackup creates _physical backups_ which are binary files, not text. If you want a logical backup, check out [mydumper](https://github.com/mydumper/mydumper). If you want CSV, you’ll need to use mysqldump.

---

<div class="post-metadata">

**Author:** ![Jerry1337](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Jerry1337](https://forums.percona.com/u/Jerry1337)\
**Post date:** [April 10, 2023, 10:11pm UTC](https://forums.percona.com/t/extract-xbstream-file-to-csv/21264/4 "2023-04-10T22:11:58Z")

</div>

done all the required commands  
xbstream and then decompress the qp files  
now what 🙂  
can i run and view the information as local host “server”

---

<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 10, 2023, 11:37pm UTC](https://forums.percona.com/t/extract-xbstream-file-to-csv/21264/5 "2023-04-10T23:37:16Z")

</div>

@Jerry1337, once again, xbstream is used for _physical backups_. You cannot read the files with a text editor. You must restore the database files to a MySQL server and start MySQL in order to read the files.

---

<div class="post-metadata">

**Author:** ![Jerry1337](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Jerry1337](https://forums.percona.com/u/Jerry1337)\
**Post date:** [April 11, 2023, 12:26am UTC](https://forums.percona.com/t/extract-xbstream-file-to-csv/21264/6 "2023-04-11T00:26:23Z")

</div>

That is exactly as I done and tried to do at the past hours

small summary  
XBSTREAM\>QP \> dozens of files from WP files, to ibd, to ibdata to cnf etc  
I received 2 files at the past from Percona I got into the point that I dont have a clue how to procced I even tried to use Percona server but with no success

Could I speak with an agent to solve this issue? (I will pay for this assistant if required)

---

<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 11, 2023, 12:47am UTC](https://forums.percona.com/t/extract-xbstream-file-to-csv/21264/7 "2023-04-11T00:47:20Z")

</div>

@Jerry1337, you can contact us here: [Sales & General Inquiries - Percona](https://www.percona.com/about/contact)
