Restoring Database Backups



There may be times where you will need to restore a database backup in your system, possibly due to database corruption or hardware issues. To restore database backups, you need to work from the command-line with root privileges.

With each backup created, Xinet includes a script within the backup directory itself intended to automate the restoration process. The script will be called either RESTORE_QUICK or RESTORE_FULL, depending on whether the directory contains a quick or a full backup.

Note: The restoration script will temporarily stop the MySQL daemon and restore the backup found in the backup directory where you are running the backup restoration script, overwriting the existing database.

Please check the process described below to restore a backup.





  1. Open a command-line session with the root user.
  2. Move to the directory that contains the backup to restore. For this example, we will use a backup stored in /mnt/xinetbackups/wnv_quickbkup.2020.02.21 that includes a quick backup:
    cd /mnt/xinetbackups/wnv_quickbkup.2020.02.21
  3. Run the restoration script:
    • ./RESTORE_FULL: If it is a full backup to be restored.
    • ./RESTORE_QUICK: If it is a quick backup to be restored.

  4. In this example, the directory contains a quick backup which will require running the ./RESTORE_QUICK script, as shown below:


  5. The script will run, prompting for confirmation to restore the backup, to which you should answer affirmatively with a 'y.'


  6. The script will prompt you to enter the MySQL password.


  7. Afterward, the process will continue with the backup restoration. The time it takes to restore the backed-up database will vary, depending on the size of each table in the backup you are restoring and the server resources. When the process is complete, you will see a confirmation message like the one shown below:



Back to top



Please sign in to leave a comment.