Forums / Install & configuration / About bpce_backupbdd extension
Alain LEMOINE
Saturday 13 February 2010 6:53:09 am
Hi,
Pascal posted on the forum of the bpce_backupbdd extension:
http://projects.ez.no/bpce_backupbdd/forum/general/how_does_this_extension_work
I ask myself the same questions because I can not to run this extension. Can anyone provide some help?Thanks in advance
Alain
Pascal France
Sunday 14 February 2010 12:59:46 am
Hi Alain,
Here what I found:
I added this line to /settings/siteaccess/your_siteaccess/cronjob.ini.append.php:
[CronjobSettings] Scripts[]=workflow.php Scripts[]=backup_bdd.php <== this line
and I did a litle script:
#!/bin/bash cd /home/xxxx/public_html/; /usr/local/bin/php runcronjobs.php -s your_public_siteaccess; exit 0
which is run by cron (as frequently you want).
In order to get a backup, you have to click on the "Create DB dump" button. This creates a creation.txt file in /var/your_siteaccess/log/. The dump is created only if this file existsOnce the script is run, the dump will be created in /var/your_siteaccess/log/
However, nothing appears in the list of dumps (tab backupbdd). It's the template design/admin/templates/backupbdd/list.tpl which is supposed to create the list of dumps, but the variable $listebdd (defined in modules/backupbdd/list.php) is empty.That's where I am ...
Pascal
Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish
Saturday 27 February 2010 9:23:14 am
There is really nobody to look at this quite small file:
http://svn.projects.ez.no/bpce_backupbdd/bpce_backupbdd/modules/backupbdd/list.php
to understand why the variable $listebdd is empty in the template list.tpl ?
The purpose is to obtain the list of the realized dumps such as shows this screen shot:
http://projects.ez.no/var/plain_site/storage/images/bpce_backupbdd/93483-1-eng-GB/bpce_backupbdd.png
I specify that, as shows the screen shot, I am under eZP 4.2.0.
Saturday 27 February 2010 11:46:14 am
The trouble comes from the fact that the extension of the dump name is .gz and not .sql (under Linux - see line 42 of http://svn.projects.ez.no/bpce_backupbdd/bpce_backupbdd/cronjobs/backup_bdd.php)
In the script:
http://svn.projects.ez.no/bpce_backupbdd/bpce_backupbdd/modules/backupbdd/list.php
we have to replace (line 17):
if ($extension != 'sql') continue;
by:
if ($extension != 'gz') continue;
Besides, the script:
http://svn.projects.ez.no/bpce_backupbdd/bpce_backupbdd/cronjobs/backup_bdd.php
needs a little modification because as it is it does not accept mysql data base access password with accents or white spaces.
Replace (line 40):
$command .= "-p$dbpass";
$command .= "-p\"$dbpass\"";
Monday 01 March 2010 5:05:11 am
Finally, I did a version a little bit enhanced of this useful extension.
Only problem, it is completely in French :-(
The PHP4 and PHP5 versions can be downloaded at the end of the page:
luxpopuli.fr