Restore Database

From Virtualizor Wiki
Jump to: navigation, search

Overview

This guide will show you how to run the Restore Database utility to retore your Virtualizor Database.

Notes

  • This utility requires an existing database backup located at /var/virtualizor/dbbackups/ and Virtualizor version 2.8.5
  • User can pass the name of the latest database backup as a parameter to the utility to restore because it will have the most recent changes.
  • If no parameters are specified then the utility will choose the latest backup file and restore it.

Command

Run the following command when you want to restore a specific database backup:

root# cd /var/virtualizor/dbbackups
root# /usr/local/emps/bin/php /usr/local/virtualizor/scripts/db_restore.php database_backup_name.sql.gz

Run the command without specifying any database backup as argument, it will restore the latest backup:

root# /usr/local/emps/bin/php /usr/local/virtualizor/scripts/db_restore.php