I don't know if this has been requested before, but it would be nice to have an backup feature like in WP. With my own site I put the ZP tables in the same databasa as WP. This way the WP backup utility backs up all my WP and ZP tables, once a day, and emails it to my gmail address. I will never forget to make a backup .
A friend of mine is now using ZP as a blog. Several times I ask him if he made a backup recently, but most of the time he just forgets. Could the backup feature be made like the one in WP?
The backup/restore script is kept as a utility, so wouldn't it be possible to simple run the script standalone via cron to achieve the same results? Seems to me that this would be the best solution.
in this case it should only be possible to start this script header(Location:http://www.domain.com/zp-core/utilities/backup_restore.php?backup=true&compress=0) without have to login. a cronjob can also only execute php scripts.
You will have to find some way for the chron job to log in. In addition, with the 1.3.1 release you will have to deal with the Cross Site Request Forgery protection. I do not know how that will work out with Chron jobs. It requires a consistend session between the request and the post processing.
I'm not good with PHP, but perhaps the plugin that handles backups from within WordPress could be a good example? It's this plugin: http://austinmatzko.com/wordpress-plugins/wp-db-backup/
From within WP this plugin can be set to 'daily' with the option to email the backup to a specified mail address. I think/thought that it was done through this plugin, but there also is this filed called cron.php in the wp-includes directory. It was just an idea .
In tonight's build there is now an automatic backup plugin. It should also be possible to use a CRON job to run backup automatically, however that is not tested.
Anyone wishing to implement a CRON automatic backup would be a big help for us. The approach is to create a PHP script for CRON to run.
Here is the code (untested). It assumes that the script is in a folder named CRON which is in the root of the Zenphoto installation. (The actual folder name is not important.)
`
`
Please add the instructions for the CRON job if you do get this going.