2. Restoring Your System From Backup

This section gives a brief overview of how a system could be restored from the backups made in the previous section. This is only one way to restore a system: there are plenty of other ways, depending on the tools you have at your disposal, and just as important, on the way you backed the system up.


All servers are different, and the restore process in your case may be different than what follows. If any of this confuses you or for some reason does not work, be sure to check the documentation that comes with OJS in the docs/ folder, as well as the support forum and FAQ. But also be sure to read your service provider and server documentation as well.

2.1. Restoring Files

To restore from backup, unpack the files and installation backups into their appropriate places:

$ cd /var/www/html
$ mkdir ojs
$ cd ojs
$ tar xzf /root/ojs-install.tar.gz
$ cd /usr/local
$ mkdir ojs-files
$ cd ojs-files
$ tar xzf /root/ojs-files.tar.gz

2.2. Restoring the Database

Re-create the MySQL database (dropping it first if necessary):

$ mysql -u root -p
Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 103
Server version: 5.1.38 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> DROP DATABASE ojs;
Query OK, 0 rows affected (0.23 sec)

Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL ON ojs.* TO pkpuser@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.01 sec)


Load the database dump into the newly created database:

$ zcat /root/ojs-database.sql.gz | mysql -u pkpuser -p ojs23