What to backup?

Hi there,

I want to make a backup of my ojs application.
I would like to know what should i backup (folder, database ?), so that i can recover in case of incident or moving application to another server.

Thank you,

Hi @coldsummer,

See the OJS Quick Reference, available from the OJS Documentation page.

Regards,
Alec Smecher
Public Knowledge Project Team

I found the instructions for backup for v2.3.1 at https://pkp.sfu.ca/ojs/docs/userguide/2.3.1/systemAdministrationBackupRestore.html. Are there new ones for OJS3?

Hi @Aragon,

Those are still accurate for OJS3. Or you could try the backup plugin, which is available in the plugin gallery!

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher how to install backup plugin?

Hi @hussainyousaf,

The backup plugin is in the Plugin Gallery. See https://docs.pkp.sfu.ca/learning-ojs/en/settings-website#plugins for details.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher thanks for guidance. After download plugin, when i upload this message appear. I also not change the plugin original name

Please guide.

Hi @hussainyousaf,

That’s the wrong file. If you install the plugin using the Plugin Gallery, it will take care of downloading the right file automatically.

Regards,
Alec Smecher
Public Knowledge Project Team

i exactly download zip file from this link https://github.com/asmecher/backup but same error generating.

Hi @hussainyousaf,

Yes, that’s the wrong file. Use the Plugin Gallery.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher When i use plugin gallery this message show and when i click OK button this screen still there after an hour no installation perform.

Hi @hussainyousaf,

Check your PHP error log for details.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher this error i find in error log and error log not showing after 24-Dec-2019

[24-Dec-2019 01:42:09 UTC] PHP Fatal error: require_once(): Failed opening required ‘plugins/generic/usageStats/GeoLocationTool.inc.php’ (include_path=’.:/opt/cpanel/ea-php70/root/usr/share/pear’) in /home/pjoorgpk/public_html/lib/pkp/classes/plugins/Plugin.inc.php on line 467

@mohd_arshad Can you help me regarding backup plugin that not installing our journal, How can i install and after installation, how can i backup my system? Thanks in advance.

sorry i cannot help you with the plug in not installing.

i dont use the backup plugin. if i need a copy of a database i just download from the server. usually there are three item you need to backup if you want to upgrade…

  1. Database
  2. Files Folder
  3. Public Folder

i just do it manually…

Hi,

I’m reviving this thread because I’m having a problem with the backup plugin.
I installed it and it works fine for the files and code.
It doesn’t work for the database however. First, OJS requested to add to config.ini.php:
[cli]
dump = “/usr/bin/mysqldump -h {$hostname} -u {$username} - p{$password} {$databasename}”
I did so and the warning disappeared, but when I click on the link to download the database, the browser for a second acts as if it’s about to load something, then nothing happens.

Any idea how to solve this? Thanks!

Hi @Julien_L,

I think there’s a typo in the line above – the space between - and p{$password} shouldn’t be there.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher for your response.
I had deleted the space earlier in fact. Not being sure whether the curly brackets and the $ sign should be kept, I tried different combinations, but no change seems to happen.
Any other suggestion?

Hi @Julien_L,

This configuration line will be very picky about small changes – the form that’s in the documentation should be correct for most users:

[cli]
dump = "/usr/bin/mysqldump -h {$hostname} -u {$username} -p{$password} {$databasename}"

If that doesn’t work, I have two suggestions:

  • Check your PHP error log around the time you attempted the database dump. It’s possible that it’ll contain something helpful.
  • Test the dump command yourself on the server e.g. using a secure shell connection. Try running the same command that you’ve configured:
    /usr/bin/mysqldump -h {$hostname} -u {$username} -p{$password} {$databasename}
    
    …replacing {$hostname} with the database hostname, {$username} with the database username, etc., each matching the value in your config.inc.php configuration file and being careful not to change anything else about that command.

Regards,
Alec Smecher
Public Knowledge Project Team