About bpce_backupbdd extension

Author Message

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 exists
Once 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

Pascal France

Saturday 27 February 2010 9:23:14 am

Hi,

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.

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

Pascal France

Saturday 27 February 2010 11:46:14 am

Hi,

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";

by:

$command .= "-p\"$dbpass\"";

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

Pascal France

Monday 01 March 2010 5:05:11 am

Hi,

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

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:12:21
Script start
Timing: Jan 18 2025 16:12:21
Module start 'layout'
Timing: Jan 18 2025 16:12:21
Module start 'content'
Timing: Jan 18 2025 16:12:21
Module end 'content'
Timing: Jan 18 2025 16:12:21
Script end

Main resources:

Total runtime0.0166 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.0313152.6406
Module start 'layout' 0.00620.0027 740.671939.4766
Module start 'content' 0.00890.0056 780.148493.5547
Module end 'content' 0.01450.0020 873.703138.3047
Script end 0.0165  912.0078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002514.7967140.0002
Check MTime0.00106.3166140.0001
Mysql Total
Database connection0.00074.010810.0007
Mysqli_queries0.003219.462930.0011
Looping result0.00000.060410.0000
Template Total0.00169.710.0016
Template load0.00084.962410.0008
Template processing0.00084.703610.0008
Override
Cache load0.00053.256010.0005
General
dbfile0.00127.180580.0001
String conversion0.00000.046040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs