Restore Database from Physical Backup File

Last updated: 2019-11-18 18:28:08


Operation Scenario

The document describes how to restore a database on another server from a downloaded logical backup file.


Downloading a Backup File

For more information on directions, see Backup Download.

Unpacking/Decompressing a Backup File

Like a physical backup, a logical backup also needs to be compressed with qpress and then packaged with xbstream. For more information on how to use xbstream and qpress, see Restoring a Database from a Physical Backup.

  • Unpack a backup file with xbstream.
    xbstream -x < test_import_57_backup_20181114115236.xb
    The unpacking result is as shown below:
  • Decompress a backup file with qpress.
    qpress -d test_import_57_backup_20181114115236.sql.qp .
    The decompressing result is as shown below:

Importing into Database

Import the files into the database by running the following command:

mysql -uroot -P3306 -h127.0.0.1 -p < test_import_57_backup_20181114115236.sql