PHP Classes

Multi-Server hosted environment

Recommend this page to a friend!

      PHP Auto Backup MySQL to File  >  All threads  >  Multi-Server hosted environment  >  (Un) Subscribe thread alerts  
Subject:Multi-Server hosted environment
Summary:How does this class behave in a shared hosting environment
Messages:2
Author:David Mounsey
Date:2014-12-18 09:56:12
 

  1. Multi-Server hosted environment   Reply   Report abuse  
Picture of David Mounsey David Mounsey - 2014-12-18 09:56:12
In a shared hosting environment or where you have multiple front-end servers there is the potential that the autobackup may try to execute multiple times (once on each server)

Does the current script handle that situation

If not, could I suggest that you put a small randomised delay timer into the check that occurs before the backup starts.
Say a random delay and re-check in the range of 10-20 seconds.


Also in a hosted multi-server/load balanced environment if the backup stalls for what ever reason, how can you stop the backups and you may not have CLI access to the PHP environment.

Final suggestion for improvement might be to add ability to exclude some tables from the backup using the --ignore-table option with a space (or comma with parsing) separated list of tables to exclude from the backup.

  2. Re: Multi-Server hosted environment   Reply   Report abuse  
Picture of Carlos Manuel Rivera Atencio Carlos Manuel Rivera Atencio - 2014-12-18 13:46:41 - In reply to message 1 from David Mounsey
Thanks for your suggestions, i'll keep in mind the last one, to add an option to exclude tables.

This class is executed by user definition. For example, at index.php you can initialize an instance of the class and call it, the class will verify if the daily backup if done, if not, will do it. In a shared hosting this won't be a problem because, as I say, it only executes when it's called (at least that you define a Cron job to do the backup).

Any suggestions will be appreciated.