1. Making Backups of Your System

A full back up of an OJS or OCS installation should include three components: the OJS system files; the files/ directory you created on installation; and the database. There are many ways to make backups of these three components. Depending on the tools at your disposal you may be able to make backups entirely over the web via an administrative interface such as CPanel; or you may have to make backups via the command line. The following section demonstrates one way to back up files via the command line.


All servers are different, and the backup 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.

1.1. Backing up the OJS System Files

To find your system files, look for the config.inc.php configuration file; this will be in the directory where you originally installed OJS. Back up all files in this directory and all subdirectories. Assuming OJS is installed in /var/www/html/ojs and the backup should be placed in /root, the following example will compress the OJS system files to a file in /root/ called ojs-install.tar.gz:

$ cd /var/www/html/ojs
$ tar czf /root/ojs-install.tar.gz *

1.2. Backing up the Database

You will need to know the database name, username, and password; these can be found in the database section of your config.inc.php configuration file:


driver = mysql
host = localhost
username = pkpuser
password = password
name = ojs

Back up the database using the mysqldump tool, e.g. if the backup should be placed in /root/:

$ mysqldump -u pkpuser -p password | gzip -9 > /root/ojs-database.sql.gz

Of course, phpMyAdmin or other tools could be used to back up the database.

1.3. Backing up the files/ Directory

To find where the files/ directory is, look at the files_dir parameter in the config.inc.php configuration file:


; Complete path to directory to store uploaded files
; (This directory should not be directly web-accessible)
; Windows users should use forward slashes
files_dir = /usr/local/ojs-files

Back up this directory and all of its contents, e.g. if the backup should be placed in /root/:

$ cd /usr/local/ojs-files/
$ tar czf /root/ojs-files.tar.gz

When these steps have been completed, you will have created three backup files, which can be found in /root. All three of these are required to restore a copy of OJS from backup.