Jump to content

Automatic Database Backup


Recommended Posts

well, your crontab would also have to log into the back office in some way too


I would create my own php file with the following code

<?php

require(dirname(__FILE__).'/config/config.inc.php');

$admin_dir = '/full/path/to/your/admin/folder/';
define('_PS_ADMIN_DIR_', $admin_dir);

$backup = new PrestaShopBackup();
$backup->add();

Put that file in your root folder and then use that in your crontab.  Make sure the admin_dir variable is set correctly

 

You could add a token to that as well to prevent it from accidentally being called from a bot, user etc...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...