# Xbackup on large DB decompress option

**URL:** <https://forums.percona.com/t/xbackup-on-large-db-decompress-option/12115>\
**Category:** Percona XtraBackup\
**Created:** [September 9, 2021, 8:27pm UTC](https://forums.percona.com/t/xbackup-on-large-db-decompress-option/12115 "2021-09-09T20:27:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![meyerder](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/meyerder/32/16994_2.png) [@meyerder](https://forums.percona.com/u/meyerder)\
**Post date:** [September 9, 2021, 8:27pm UTC](https://forums.percona.com/t/xbackup-on-large-db-decompress-option/12115/1 "2021-09-09T20:27:25Z")

</div>

I am looking for a better way of doing this…

Right now I have a 10TB DB in two physically geographical locations. I run nightly backups on one of the nodes that has a 50TB backup partition  
I leverage the compress option on the backups and everything works fine (no issues with the backups)

The problem I ran into is with the system that the backups were NOT on had issues and needed to be rebuilt.

As the non backup system does not have a /backup drive with a ton of space I copied the files to the main mysql data dir (I have a /data /logs and /tmp)

When running the decompress option I run out of drive space as the compressed files and the datafiles are on the same mount point

Question:  
Does an option exist for after the file is decompressed delete the compressed file? (for each thread as I am using about 30 threads)

---

<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:** [September 10, 2021, 12:17pm UTC](https://forums.percona.com/t/xbackup-on-large-db-decompress-option/12115/2 "2021-09-10T12:17:42Z")

</div>

Hi @meyerder

I belive you are looking for [–remove-original](https://www.percona.com/doc/percona-xtrabackup/8.0/xtrabackup_bin/xbk_option_reference.html#cmdoption-remove-original) option:

```auto
marcelo@marce-bld:/work/pxb/src/8.0$ xtrabackup --decompress --remove-original --target-dir=/tmp/backup
xtrabackup: recognized client arguments: --user=root --decompress=1 --remove-original=1 --target-dir=/tmp/backup
xtrabackup version 8.0.26-18 based on MySQL server 8.0.26 Linux (x86_64) (revision id: 56a46198d3e)
210910 09:16:03 [01] decompressing ./xtrabackup_binlog_info.qp
210910 09:16:03 [01] removing ./xtrabackup_binlog_info.qp
210910 09:16:03 [01] decompressing ./ibdata1.qp
210910 09:16:03 [01] removing ./ibdata1.qp
210910 09:16:03 [01] decompressing ./sys/sys_config.ibd.qp
210910 09:16:03 [01] removing ./sys/sys_config.ibd.qp
210910 09:16:03 [01] decompressing ./binlog.index.qp
210910 09:16:03 [01] removing ./binlog.index.qp

```
