Auto Backup - how does it schedule

By Jason - October 25, 2010

Hi Kevin,

Thank you for posting that solution! I'm glad that everything is working for you now.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [chris] Auto Backup - how does it schedule

By aev - October 25, 2010

Is it possible to make "/cmsAdmin/lib/viewer_functions.php" trigger the Auto Backups (in the background of course)?

Then any normal site visit would trigger the backups..

-aev-

Re: [aev] Auto Backup - how does it schedule

By Chris - October 25, 2010

Hi aev,

I think this should be possible by changing this line in the plugin:

addAction('init_complete', 'autoBackup_updateBackups', null, 0);

...to:

autoBackup_updateBackups();

That might cause some extra strain on your server if you're getting a lot of visitors. Please let me know if that works for you.
All the best,
Chris

By weblm - October 25, 2010

Just a quick followup question....so loading the admin.php page will be the only time a backup is run by default?

If that's the case, then does it simply check to see what backup(s) it needs to do next?

For example, if I just installed it and have it backup hourly, daily, weekly, and monthly. I login to the CMS admin on monday morning.....it will perform one of each of those backups. If I'm in the CMS admin for the next 3 hours, it will have run 2 more hourly backups. Now, if I get out....and don't go back in until Wednesday morning, and I don't touch the admin...no other backups should have been created (assuming no one loaded admin.php)?

Then, on Wed...if I login, it will then create a new hourly backup and daily backup?

-Kevin
LM

By Chris - October 25, 2010

Hi Kevin,

Correct! :)
All the best,
Chris

Re: [chris] Auto Backup - how does it schedule

By aev - October 26, 2010

Hi Chris,

concerning server strain, wouldn't that be minimal even if CMSB is set to do hourly backups?

If we have 1000 pageviews/hour wouldn't that require only a simple 'if' check or something similar for 999 of those? And then pageview #1000 triggers the backup?

-aev-

By Jason - October 26, 2010

Hi,

aev:
You're correct. The plugin will check if a backup had already been made that hour and if it has, it won't overwrite it. So if you have a 1000 visits in an hour, the backup will only be triggered once.

Kevin:

Each "page" you view inside CMS Builder is first run through admin.php, so no matter where you go, you're executing that file. So the plugin in automatic in the sense that you don't have to use the manual backup function to produce a backup.
As for your second question, it would be possible for us to produce a plugin that would do what you're asking. If you're interested in this, please email consulting@interactivetools.com and we can get a quote for you.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Dave - October 28, 2010

Hi Guys,

I just read this thread and I think there's some confusion even among our internal programmers. I wrote this plugin and it does in fact backup any time either admin.php is access or _any_ viewer page. So for a website with any traffic at all you'll get accurate backup time stamps.

And if you have 100 users hitting a website page in the same second only 1 of them will get a delay while the backup is being created. And... You'll only get a delay if it's a large database.

Hope that helps, let me know any additional questions and I'll be happy to answer them. Sorry for the confusion!
Dave Edis - Senior Developer

interactivetools.com

Re: [Dave] Auto Backup - how does it schedule

By weblm - October 28, 2010

Dave,

That's awesome! I just checked it out and it does work exactly like that. Any viewer page on the site will force it to run. Wow....to think I was going to do a cron just to load admin.php [;)]

This also explains why I had one site, seemly creating backups way more than only having the admin.php page load.

-Kevin
LM