Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Re: Automated backups too long - backup half of them (even or odd)?

$
0
0
by Séverin Terrier.  

Hi,

Just wanted to confirm it's OK, modifying the backup/util/helper/backup_cron_helper.class.php file, to update the run_automated_backup function, inserting these lines just before the line containing "// Check if the course is not scheduled to run right now".

Another way to write it (more optimised):

                // Skip courses with odd id on even day,
                // and courses with even id on odd day
                if ((date('z') % 2) && (!($course->id % 2))) {
                    $skipped = 1;
                    $skippedmessage = 'No backup of even course on odd day';
                }
                elseif ((!(date('z') % 2)) && ($course->id % 2)) {
                    $skipped = 1;
                    $skippedmessage = 'No backup of odd course on even day';
                }
Séverin


Viewing all articles
Browse latest Browse all 6815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>