Member
Member
jackdaw   2010-07-18, 06:22
#1

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?

Administrator
Administrator
acrylian   2010-07-18, 09:27
#2

We have a database backup feature on the admin overview page since quite some versions now...you have to do it manually though.

Member
Member
sbillard   2010-07-18, 17:44
#3

The backup could be made automatic, but then when should it be done? Could be quite a burden if it is done on each and every time you save something.

Member
Member
kagutsuchi   2010-07-19, 02:11
#4

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.

Administrator
Administrator
acrylian   2010-07-19, 08:18
#5

I had the same idea, although I am not used to cron jobs at all. If you could make up some code for that this would probably a good idea. We could add it to the extensions section then.

Member
Member
michaelsam   2010-07-22, 19:05
#6

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.

Member
Member
sbillard   2010-07-23, 02:26
#7

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.

Member
Member
jackdaw   2010-07-24, 17:05
#8

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/

Member
Member
sbillard   2010-07-24, 17:22
#9

Well, this Wordpress backup is not automated. So it is really no different from what we already offer.

Member
Member
jackdaw   2010-07-24, 17:45
#10

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 .

Member
Member
sbillard   2010-07-24, 19:15
#11

I'll look at that cron.php file and see if we can adapt it.

Member
Member
sbillard   2010-07-27, 20:13
#12

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.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.