Backup: backup and restore the database - Page 3 Backup: backup and restore the database - Page 3
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Backup: backup and restore the database

Started by François Keller, January 21, 2007, 03:04:39 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

François Keller

GauGau,

I don't know exactly what licence the scritp has.but i've found this http://www.01php.com/fiche-scripts-18.html if it can help you. I also had a mail from the author (but sorry, i've lost it in my computer crash) who was  ok for using the script in coppermine. I've seen that some BBS (PhpBB) used this script to backup...
The dreaXTeam sit is under construction http://dreaxteam.net/
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller

Hello all,

as suggested above I have looked into the backup plugin and changed several things. I have packaged it and attached it to this posting. Experienced users are welcome to download and test it.
Most changes are cosmetical, none of the changes is drastical in terms of core functionality.

This is the content of the changelog:
2007-07-09 Released version 2.0 of the backup plugin for testing
2007-07-08 Added check if target folder is writtable {GauGau}
2007-07-08 Added Warning text for restores {GauGau}
2007-07-08 Preselected coppermine tables for dump creation {GauGau}
2007-07-08 Fixed improperly nested tables {GauGau}
2007-07-07 Added links to announcement thread and original XT-Dump homepage (currently down) {GauGau}
2007-07-07 Moved plugin stylesheet into <head>-section where it belongs {GauGau}
2007-07-07 Added global header and footer include {GauGau}
2007-07-07 Added check for gallery admin mode as a safety precaution {GauGau}
2007-07-06 Moved version var from language file to config file {GauGau}
2007-07-06 Cleaned up a bit for version 2.0: $LANG-array replaced {GauGau}
2007-06-30 Croation translation added {Brane29}
2007-06-13 Version 1.6 released {Frantz}
2007-06-12 Dutch translation improved {Hein}
2007-02-14 Version 1.5 released {Frantz}
2007-03-22 German translation fixed {AlexL}
2007-02-14 Version 1.4 released {Frantz}
2007-02-14 German translation added {AlexL}
2007-02-06 Version 1.3 released {Frantz}
2007-02-06 Replaced hard-coded word with translation {Hein}
2007-01-31 Version 1.2 released {Frantz}
2007-01-30 Dutch translation added {Hein}
2007-01-21 Version 1.1 released {Frantz}
2007-01-21 Italian language added {Angeldevil}
2007-01-21 Version 1.0 - Initial release {Frantz}

@Frantz: please don't replace the version in the initial posting yet - let's test this version first thoroughly.

Things testers should be particularly mindfull off: I haven't tested the progress bars thorougly, as I haven't run this script on a large install yet. I haven't tested the restore feature thoroughly.

The additional language strings I have added shine through in English for the languages that I can't speak; translations would be welcome.

Please review and report. I'd love to see this plugin bundled with cpg1.5.x - please help us make it production-ready.

@Frantz: could you please contact the original author once more and ask for permission to bundle it with cpg1.5.x? Thanks in advance.

Cheers

Joachim

Hein Traag

#42
Tested plugin on two different servers where i use cpg. Both tested clean and perfect.

Added 'plugin_manager' => 'Plugin Manager', to dutch.php. It was missing and caused a texless button to appear next to the button you can click to go to the plugin support thread.

One request to make. I made several test dumps while testing the plugin and setting a different colour for the progress bar in the css file. I now have to delete each one seperatly. Would it be possible to add radio buttons so one could delete several dump files in one go ?

Attached updated dutch.php for 2.0 plugin. And it would indeed make a very nice add-on for the upcoming 1.5 cpg!

Hein

François Keller

GauGau,
Thank's for this 2.0 version.
I will test it asp.
Quote@Frantz: please don't replace the version in the initial posting yet - let's test this version first thoroughly.
OK
Quote@Frantz: could you please contact the original author once more and ask for permission to bundle it with cpg1.5.x? Thanks in advance.
I will see if i can find the email adress from the original author. I let you know the answer...
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

su_ict

Got the files, need to set up a test coppermine (had to do this someday anyway  ;D) and will test it - results will show up in this thread.

François Keller

Tested an working like a charm on my local server and on my web server (free.fr)
new french.php file attached
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller

Thank you both for your language file updates. I have added the feature "delete several files at once" to the plugin and added some other improvements. Attached, you will find version 2.1 of the plugin. As suggested above, the plugin should be tested some more, preferably using a large coppermine install with a huge database.

Things that are left to do: backing up your database is important and can be achieved using this plugin. However, if the database is broken and needs to be restored from a backup, the coppermine user interface might be broken as well. Subsequently, newbies can't restore the database using the plugin (which requires the coppermine user interface to be up). That's why I plan to implement a standalone file for restoring the dump. I'm not sure though if this will go into the plugin (because I'm not sure how to accomplish this permissions-wise) nor when I will have the time to look into this, so don't expect such a file in the near future.

Please test the plugin thoroughly and report your feedback.

Cheers

Joachim

P.S. I developed my improvements on my cpg1.5.x testbed, so the plugin should already be ready to run with the future version ;).

François Keller

QuoteI developed my improvements on my cpg1.5.x testbed, so the plugin should already be ready to run with the future version
Hey good news  ;)
QuoteThat's why I plan to implement a standalone file for restoring the dump
Yes, surelly a good idea for newbies and for other users  ;D

I'll test the new version
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Hein Traag

Tested 2.1 on my private cpg and two other cpg's i am working on. The largest being 2500+ pictures , not a big one but bigger then my own ;)

Test was a 100% clean. The radio buttons are a big plus. Now deleting multiple dump files is as easy as riding a bike, thanks GauGau.

Added dutch.php , some minor cosmetical language editing.

And i agree with GauGau that it would be a good idea to have this as a standalone page for when your cpg is really gone belly up. I am not sure but i think i saw Lycos (ISP) provide XT-dump to its users as a standalone page.

Hein

Sami

I didn't test new version yet ! But I'll  ;D

here is Persian language file
and also there is a missing parenthesis on English lang file line #34

Sami
‍I don't answer to PM with support question
Please post your issue to related board

su_ict

Hmm, i stated i had to put a test coppermine running beside my production version but now i am a bit stuck and confused  :-[

What is the easiest way to setup a development (or call it test) environment to test this new plugin ? How would you do it ? Restriction - i am working on a company PC so installing at localhost is not possible - i have full control over our site management however.

Ps. if this is not for this thread, i will open a new one - if the answer is somewhere in the forum, be so nice to point me there - i have been over it searching and could not find it.

Hein Traag

 ;) you guessed right, what you are asking is not ment for this thread. I can't do anything within the plugin contributions part of the board otherwise i would have moved it to here http://forum.coppermine-gallery.net/index.php?board=47.0

But this might be something you can use, it's the CPG live demo. I am not sure if you can run plugins in that demo as wel.
You can find the live demo here http://forum.coppermine-gallery.net/index.php?topic=34418.0

François Keller

Version 2.1 tested without problem on my webserver (dump file is 1.8 MO)
French.php file modified according this new version
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

su_ict

At first - Hein thx for the quick reply  8)

Quote from: Hein on July 11, 2007, 03:49:00 PM
;) you guessed right, what you are asking is not ment for this thread. I can't do anything within the plugin contributions part of the board otherwise i would have moved it to here http://forum.coppermine-gallery.net/index.php?board=47.0
Maybe someone else can move it ? Or indicate i should really open a new thread  ::) ;)
Quote from: Hein
But this might be something you can use, it's the CPG live demo
I saw that one - as stated in the descr. it is not a real installation so i imagine a plugin install is not be possible at least not desirable !

Joachim Müller

Quote from: Hein on July 11, 2007, 03:49:00 PMI am not sure if you can run plugins in that demo as wel.
Sure you can - the live demo is a full apache webserver. In fact my development system is based on the live demo (it's portable, I can take it with me on a stick).
However, as you suggested: su_ict's question doesn't belong into this thread. The live-demo goes unsupported, so I won't answer further questions on it - the only thing I can do is to recommend using it, especially for testing purposes.

Joachim

su_ict

Quote from: GauGau on July 11, 2007, 05:27:32 PM
Sure you can - the live demo is a full apache webserver. In fact my development system is based on the live demo (it's portable, I can take it with me on a stick).

Slightly off-topic - thanks GauGau - will step into it  ;D 8)

su_ict

#56
Ok, tested 2.1 version and works ok, thx !

@Hein - ducth language version - when dump is done - following line is put above a link to the dump file -
(dutch - Je vindt de backup bestanden hier. Ook kun je ze hier downloaden.:)

More accurate (  ??? ) looks to me :
(dutch - De backup file kan hier gedownload worden : )

Just a thougt  ;)

*added 19/07 *
String DELETE_FILE_OK should be modified to : Bestand %s is/zijn verwijderd

AlexL

Hello

tested v 2.1  ;D after a little confusion causes from the UpdateHistoryPlugIn (after installation of Backup V2.1 this wasn't show on PlugInsManager - uninstalled the UpdateHistoryPlugIn and it's V2.1 is back and ok)
Save DB without errors - maybe a little beauty error - it's shows 0% after a correct save.
But then I find a little problem :'( - maybe it's not a problem of the plugin rather a mismatch on my db

I've testet the restore function and got the following error after 80%
Query Error Line 109
Error :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '23:42:13,NULL,NULL)' at line 1

INSERT INTO `cpg132_cms` VALUES(1,0,'Willkommen bei Velvet Photos','<p>Schickt mir Euer Feedback und Eure Anregungen - nutzt das <a href="http:\/\/www.velvet-photos.de/kontakt.php">Kontakt-Formular</a>. Es werden bald neue Fotos hier erscheinen. Schaut immer mal wieder vorbei.</p>',0,0,2007-04-14 23:42:13,NULL,NULL);
Query Error Line 110
Error :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '16:31:28,NULL,NULL)' at line 1

INSERT INTO `cpg132_cms` VALUES(4,11,'Lautenfestival - Ein zusätzlicher Hinweis','Die Bands Asfur und IOCULATORES traten im Rahmen dieses Festivals auf - die Fotos dazu finden Sie hier und&nbsp;in der Kategorie Konzertfotos, dann unter dem Namen der jeweiligen Band.',1,1,2007-03-14 16:31:28,NULL,NULL);
Query Error Line 111
Error :You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '21:55:18,NULL,NULL)' at line 1

INSERT INTO `cpg132_cms` VALUES(5,0,'test2','Test2',1,3,2007-01-01 21:55:18,NULL,NULL);


François Keller

Hi, i had a similar problem with the tables create by the minicms plugin.  :-\
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Nibbler

Problem is probably here, in dump.php

if ($type == 'tinyint' || $type == 'smallint' || $type == 'mediumint' ||

$type == 'int' || $type == 'bigint'  ||$type == 'timestamp')


That code is causing the timestamps not to be quoted, which is incorrect. Remove timestamp from that bit and remake the dump.