# Fastest way to backup and restore databases?

**URL:** https://forums.percona.com/t/fastest-way-to-backup-and-restore-databases/7048
**Category:** Percona XtraBackup
**Created:** [June 5, 2019, 12:45am UTC](https://forums.percona.com/t/fastest-way-to-backup-and-restore-databases/7048 "2019-06-05T00:45:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thinh2610](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@thinh2610](https://forums.percona.com/u/thinh2610)
#### Post date: [June 5, 2019, 12:45am UTC](https://forums.percona.com/t/fastest-way-to-backup-and-restore-databases/7048/1 "2019-06-05T00:45:45Z")

</div>

Currently, I have databases with 2.2TB of data. I am using Xtrabackup as follows:

1. innobackupex --rsync --user=xxx --password=xxx --no-timestamp --compress --compress-threads=4 $BACKUP\_DIR/FULL

2. for bf in `find $BACKUP_DIR/FULL -iname "*\.qp"`; do qpress -d $bf $(dirname $bf) ;echo “processing” $bf; rm $bf; done

3. innobackupex --apply-log --redo-only $BACKUP\_DIR/FULL \> $BACKUP\_DIR/log\_prepare.txt 2\>&1

4. tar -czvf FULL.tar.gz FULL/

The total time for the backup process is 2.5 days.  
The total time for restore in another server is 1 days (uncompress tar.gz file and copy back)

I’m not thinking of any way to backup and restore data in the shortest time.

Looking forward to receiving help from everyone.

Tks!
