Auto Backup - how does it schedule
20 posts by 5 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: October 28, 2010 (RSS)
By weblm - October 22, 2010
-Kevin
Re: [kblm] Auto Backup - how does it schedule
By weblm - October 22, 2010
If this is the expected behavior.....is there a way to schedule this with cron at all?
-Kevin
Re: [kblm] Auto Backup - how does it schedule
By Jason - October 22, 2010
You could create a script that would do this. You would have to require viewer_functions.php at the top of your file. The function you would need to call is autoBackup_updateBackups()
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/
Re: [Jason] Auto Backup - how does it schedule
By weblm - October 22, 2010
Ok thanks. So in other words, by being logged into the admin, it will run backups at hourly, daily, etc. But you have to be logged in and active for it to work?
-Kevin
Re: [kblm] Auto Backup - how does it schedule
By Jason - October 22, 2010
That's correct. The autobackup won't run in the background on the server. You'd have to create a cron job in order to do that.
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: [Jason] Auto Backup - how does it schedule
By Chris - October 22, 2010 - edited: October 22, 2010
You don't have to be logged in, but something has to hit admin.php periodically. Because of this, it is possible to set up one of the many [url http://www.google.com/search?q=web+cron]Web Cron[/url] services to hit your admin.php page, allowing Auto Backup to do its thing. You won't need to provide a username/password or anything. Also, Web Crons tend to be very easy to configure!
I hope this helps! Please let me know if you have any questions.
Chris
Re: [chris] Auto Backup - how does it schedule
By weblm - October 24, 2010
Good to know thanks. So I can setup a cron on the server to simply load the admin.php page hourly, and the backup will run?
You know the syntax on cron to just load the admin.php page? Is it different than running a .sh script? Do I need to output the results to /dev/null?
-Kevin
Re: [chris] Auto Backup - how does it schedule
By weblm - October 24, 2010
/usr/local/bin/php -q ~/path/cmsAdmin/admin.php
(-q is suppose to supress the cron from emailing)
Haven't tested in cron yet, but it works from the command line.
Only issue so far is the backup files get filenames of:
no-hostname-v2.06-hourly-07.sql.php
Not sure if that matters or not.
-Kevin
Re: [chris] Auto Backup - how does it schedule
By weblm - October 24, 2010
0 * * * * /usr/local/bin/php /path/cmsAdmin/admin.php >/dev/null 2>&1
My server didn't have the -q flag for php.
The >/dev/null 2>&1 will suppress email.
-Kevin
Re: [chris] Auto Backup - how does it schedule
By weblm - October 24, 2010
$GLOBALS['AUTOBACKUP_DEFAULT_PREFIX'] = ''; // Backup file prefix, leave blank to use current domain name
So now my domain is in the filename.
-Kevin