# How to use xbstream to restore?

**URL:** <https://forums.percona.com/t/how-to-use-xbstream-to-restore/34233>\
**Category:** Percona XtraBackup\
**Created:** [October 8, 2024, 1:41pm UTC](https://forums.percona.com/t/how-to-use-xbstream-to-restore/34233 "2024-10-08T13:41:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [October 8, 2024, 4:52pm UTC](https://forums.percona.com/t/how-to-use-xbstream-to-restore/34233/4 "2024-10-08T16:52:01Z")

</div>

```auto
# Copy the backup from gcloud to local fs
/snap/bin/gsutil cp “gs://bucket/DB.xbstream” /path/local/DB.xbstream

# Extract
xbstream -xv -C /path/to/restore < /path/local/DB.xbstream

# Pepare
xtrabackup prepare --target-dir /path/to/restore

# Fix permissions
chown -R mysql:mysql /path/to/restore

# Start mysql
systemctl start mysql

```

Our documentation has many HOWTO examples on the above.

---

_[View the full topic](https://forums.percona.com/t/how-to-use-xbstream-to-restore/34233)._
