# Percona xtrabackup bypass xbcloud locally for retore

**URL:** <https://forums.percona.com/t/percona-xtrabackup-bypass-xbcloud-locally-for-retore/26562>\
**Category:** Percona XtraBackup\
**Created:** [November 15, 2023, 2:08pm UTC](https://forums.percona.com/t/percona-xtrabackup-bypass-xbcloud-locally-for-retore/26562 "2023-11-15T14:08:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhare](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@bhare](https://forums.percona.com/u/bhare)\
**Post date:** [November 15, 2023, 2:08pm UTC](https://forums.percona.com/t/percona-xtrabackup-bypass-xbcloud-locally-for-retore/26562/1 "2023-11-15T14:08:12Z")

</div>

I normally sync to my storage box which is running minio via `xtrabackup` and `xbcloud put` similar to [Use the xbcloud binary with MinIO - Percona XtraBackup](https://docs.percona.com/percona-xtrabackup/8.0/xbcloud-minio.html). Then in order to restore a backup I use this command:

```auto
xbcloud get s3://database/202311112041-full_backup --s3-endpoint='http://storage.domain.com:9000' --s3-access-key='minioadmin' --s3-secret-key='#####' --parallel=10 | xbstream -x -C restore --parallel=8

```

However, I want to restore the backup on the local minio server; So I want to access the backup but not have it go through xbcloud/s3 since I am executing the commands locally and just want to use xbstream to restore it.

Is this possible? What command would I run assuming `s3://database/202311112041-full_backup` correlates to `/mnt/data/database/202311112041-full_backup`

---

<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:** [November 15, 2023, 3:33pm UTC](https://forums.percona.com/t/percona-xtrabackup-bypass-xbcloud-locally-for-retore/26562/2 "2023-11-15T15:33:19Z")

</div>

I believe that xbcloud breaks up the backup stream into equal sized fragments for storage into S3. If you simply run the equivalent of `aws s3 ls s3://path/to/backup` you’ll see what I mean. As such, you must use xbcloud to stitch the fragments back together for restore.

---

<div class="post-metadata">

**Author:** ![bhare](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@bhare](https://forums.percona.com/u/bhare)\
**Post date:** [July 3, 2024, 2:21am UTC](https://forums.percona.com/t/percona-xtrabackup-bypass-xbcloud-locally-for-retore/26562/3 "2024-07-03T02:21:48Z")

</div>

I have xbcloud, how do I stitch the files back together?

For example

`ibdata1.qp.00000000000000000000 ibdata1.qp.00000000000000000001 ibdata1.qp.00000000000000000002`

back to

`ibdata1.qp`

i tried

```auto
cat ibdata1.qp.00000000000000000000 ibdata1.qp.00000000000000000001 ibdata1.qp.00000000000000000002 > ibdata1.qp;
qpress -do ibdata1.qp > ibdata1

```

Results in `qpress: Source file was not compressed with qpress` so I believe xbcloud must stitch files in a special 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:** [July 3, 2024, 4:19am UTC](https://forums.percona.com/t/percona-xtrabackup-bypass-xbcloud-locally-for-retore/26562/4 "2024-07-03T04:19:10Z")

</div>

Hello @bhare,  
Use xbcloud to also fetch and stitch files back together.

> **[Percona XtraBackup - Use the xbcloud binary with Amazon S3](https://docs.percona.com/percona-xtrabackup/innovation-release/xbcloud-s3.html#restore-with-s3)**
>
> Percona XtraBackup is an open source hot backup utility, for MySQL - based servers, that keeps your database fully available during planned maintenance windows.

---

<div class="post-metadata">

**Author:** ![bhare](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@bhare](https://forums.percona.com/u/bhare)\
**Post date:** [July 3, 2024, 4:23am UTC](https://forums.percona.com/t/percona-xtrabackup-bypass-xbcloud-locally-for-retore/26562/5 "2024-07-03T04:23:41Z")

</div>

I no longer have an s3 compatible service. Before it discontinued I downloaded all the raw files to my local disk. Now I have unstitched local files. Is my only option to host a local minio server and pretend I have a server on 127.0.0.1?

---

<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:** [July 3, 2024, 2:39pm UTC](https://forums.percona.com/t/percona-xtrabackup-bypass-xbcloud-locally-for-retore/26562/6 "2024-07-03T14:39:22Z")

</div>

Yes, I would say that is the fastest way to move forward, setting up a local minio.

> **[Percona XtraBackup - Use the xbcloud binary with MinIO](https://docs.percona.com/percona-xtrabackup/innovation-release/xbcloud-minio.html)**
>
> Percona XtraBackup is an open source hot backup utility, for MySQL - based servers, that keeps your database fully available during planned maintenance windows.
