cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduled backup is not creating any backup files

SOLVED

Scheduled backup is not creating any backup files

Hi,

 

Magento version 2.2.3

I have scheduled a database backup to run everyday at 05:00am (putting the store in maintenance mode)

the cron job is the following:

/opt/plesk/php/7.0/bin/php /var/www/vhosts/domain.com/httpdocs/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/vhosts/domain.com/httpdocs/var/log/magento.cron.log

domain.com is replaced with my domain name.

 

The issue is that no backup is created, and the magento.cron.log is empty!

all other logs have no information regarding any failed backup attempts

 

How can I check what is wrong and why the backup is not running?

 

Regards

2 REPLIES

Re: Scheduled backup is not creating any backup files

have you checked your cron is running or not.

 

please check cron status by calling below way from SSH,

php bin/magento cron:run
crontab -l

 

If Issue Solved, Click Kudos/Accept As solutions.

Re: Scheduled backup is not creating any backup files

I have managed to debug it (run cron from within the plesk panel) and got error:

[Exception] Notice: Undefined index: jobs in /vendor/magento/module-cron/Model/Config/Converter/Db.php on line 39

 

So after some web search I found out that the cron was not running and not logging any errors.

The issue was that migration tool (migrated magento 1 to magento 2 store) has some bug when migrating cronjobs. It does not created the group for the cron.

example:

in core_config_data the path for cronjobs was 'crontab/jobs' instead of 'crontab/default/jobs' (default is the group).

 

After deleting the wrong 'crontab/jobs' entries, cron is working fine and backup was created automaticaly.

 

I hope this helps someone else too, or magento team can check it an fix migration tool issue.

Also a system/module to check if cron is running fine or not would be nice! 

 

regards