Topic : Backup cron optimization

Posted By: sparek on February 27, 2021, 7:54 pm
It seems that when users have a backup scheduled for their Softaculous installations - when those backups run, they all run simultaneously.

Would a better solution be to do these sequentially?  Run one backup, wait for it to finish, before starting another backup.

When a use schedules a backup it would seem to add a cron to the user's crontab:

/usr/local/cpanel/3rdparty/bin/php -d disable_functions="" "/usr/local/cpanel/whostmgr/docroot/cgi/softaculous"/cli.php --backup --auto=1 --insid=XXXXXXXX

This presumably sets a flag some where, so that root's cron knows to actually do the backup.

And then when root's cron runs:

/usr/local/cpanel/3rdparty/bin/php -d disable_functions="" /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/do_backups.php

all of the backups - across all users - all run at once.  This can create a huge disk i/o usage because all of those backups are trying to run at the same time.

I think it would be better logic for /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/do_backups.php to do one user's backup, wait for it to finish, and then move on to the next backup.

Posted By: Brijesh on March 10, 2021, 11:00 am | Post: 1

Sorry for the delay in response.

Thank you for the feedback.

We will make the required changes to execute max 10 backup processes at a time and this setting will be customizable by admin and you can set it to run max 1 backup at a time.

We will try to add this soon.

Loginizer - WordPress Security Plugin
Follow us on Twitter

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.