Advanced search  

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]

Pages: 1 2 [3] 4 5 6   Go Down

Author Topic: Backup: backup and restore the database  (Read 195507 times)

0 Members and 2 Guests are viewing this topic.

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Backup: backup and restore the database
« Reply #40 on: July 02, 2007, 08:45:18 am »

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/
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Backup: backup and restore the database
« Reply #41 on: July 09, 2007, 10:38:24 am »

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
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Backup: backup and restore the database
« Reply #42 on: July 09, 2007, 12:59:33 pm »

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
« Last Edit: July 09, 2007, 01:21:21 pm by Hein »
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Backup: backup and restore the database
« Reply #43 on: July 09, 2007, 09:05:22 pm »

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...
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Backup: backup and restore the database
« Reply #44 on: July 10, 2007, 02:31:28 pm »

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.
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Backup: backup and restore the database
« Reply #45 on: July 10, 2007, 09:12:51 pm »

Tested an working like a charm on my local server and on my web server (free.fr)
new french.php file attached
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Backup: backup and restore the database
« Reply #46 on: July 11, 2007, 08:33:42 am »

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 ;).
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Backup: backup and restore the database
« Reply #47 on: July 11, 2007, 08:46:12 am »

Quote
I 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  ;)
Quote
That'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
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Backup: backup and restore the database
« Reply #48 on: July 11, 2007, 09:21:53 am »

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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Backup: backup and restore the database
« Reply #49 on: July 11, 2007, 09:56:13 am »

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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

su_ict

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Backup: backup and restore the database
« Reply #50 on: July 11, 2007, 03:21:55 pm »

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.
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Backup: backup and restore the database
« Reply #51 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

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
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Backup: backup and restore the database
« Reply #52 on: July 11, 2007, 03:50:53 pm »

Version 2.1 tested without problem on my webserver (dump file is 1.8 MO)
French.php file modified according this new version
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Backup: backup and restore the database
« Reply #53 on: July 11, 2007, 03:58:55 pm »

At first - Hein thx for the quick reply  8)

;) 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 !
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Backup: backup and restore the database
« Reply #54 on: July 11, 2007, 05:27:32 pm »

I 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
Logged

su_ict

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Backup: backup and restore the database
« Reply #55 on: July 11, 2007, 07:27:43 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)
Logged

su_ict

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Backup: backup and restore the database
« Reply #56 on: July 17, 2007, 12:16:40 pm »

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
« Last Edit: July 19, 2007, 01:50:25 pm by su_ict »
Logged

AlexL

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 189
    • Velvet Photos
Re: Backup: backup and restore the database
« Reply #57 on: July 23, 2007, 05:28:19 pm »

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%
Code: [Select]
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);
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Backup: backup and restore the database
« Reply #58 on: July 23, 2007, 06:01:04 pm »

Hi, i had a similar problem with the tables create by the minicms plugin.  :-\
Logged
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

  • Guest
Re: Backup: backup and restore the database
« Reply #59 on: July 23, 2007, 08:21:17 pm »

Problem is probably here, in dump.php

Code: [Select]
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.
Logged
Pages: 1 2 [3] 4 5 6   Go Up
 

Page created in 0.033 seconds with 20 queries.