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

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 1 Guest are viewing this topic.

Joachim Müller

Quote from: AlexL on October 27, 2007, 09:53:23 PM
My vote is yes too.
Cpg1.5.x development should not be discussed further within this thread!

Quote from: AlexL on October 27, 2007, 09:53:23 PMBut with the extension of a separate php site (password protected) for restore in worstcase, if db corrupted and admin page don't work.
That's what I already have pointed out - see
Quote from: GauGau on July 11, 2007, 08:33:42 AMThings 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.

erostew

#81
If you do decide to add an external page for emergency restore then it could be implemented exactly as the install.php for good security. Will need the user to submit mysql db name, user and pass. Maybe a good idea anyway, in case the config.inc.php is corrupted or something. If the user doesn't have the required mysql info then probably he should not be using the script in the first place.

You could also make it use the same lock file as the install.php. That way the user must have access to ftp or a control panel file manager to be able to run it. Even a complete newbie with no knowledge of his mysql info and unable to figure out how to comment out a die statement in the source can surely figure out how to delete a file.

Or you could combine the 2 together. Less newbie friendly but more secure.

For scheduling I seem to remember seeing a couple of pseudo cron classes that could be used. Not sure if that is a good idea or not though. If it was done it should probably be coded to allow no more than daily backups, to avoid over zealous users trying to backup their db every 5 minutes and crippling the server. (not that I ever crippled a server by scheduling a cron task at too small an interval so that all the memory on the server was eaten up by tasks that never had a chance to finish before the next one started.  :o )

A db backup should definitely be a part of any web app that uses mysql so heavily. I personally have remote access to MySQL so I can use the MySQL Administrator tool that has scheduling capabilities and doesn't have the limitations of phpmyadmin when it comes to filesizes. However the majority of users do not have that option. A very good idea to develop this.  ;D

Davide Renda

Just been through this plug-in and realised the existing Italian translation were not adapted to the latest version 2.2, attached to this post reviewed Italian translation.
By the way, I'm using it on a Coppermine gallery with ModPack and works O.K.

just_some_guy

Hello,

I have been using this plugin for quite some time now, backing up the db as i go along and today came the time i needed to use it. Because i am changing mysql servers so i took a backup of the CPG tables and the SMF tables (its a bridge). I then i wanted to prepare the new server so i just needed to change the info in config.inc.php and it would work. I then went onto PHPMyAdmin and pasted the contents of the .sql file created by this plugin into the query section pf phpmyadmin. I then ran the query. But there are errors in the syntax, for example heres one -


INSERT INTO `smf_log_online`
VALUES (

'gga9hpcbmfus5ctfv15srum312', 2007 -11 -2322 :15 :49, 1, 1378420331, 'a:1:{s:10:\"USER_AGENT\";s:89:\"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\";}'
);

#1064 - 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 '22:15:49,1,1378420331,'a:1:{s:10:\"USER_AGENT\";s:89:\"Mozilla/4.0 (compatible; ' at line 1


How shall i go about creating the tables and the info on the new server now  :-\?

Thanks,

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums


just_some_guy

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

PerformanceImagery

Using v2.1 (as well as the plugin in the first post) I get this error...

ERROR !

No table selected. You have to select at least one table.

It was mentioned earlier in the thread, but nothing ever came of it.   My site is hosted on PowWeb and I've not ran into any restrictions with mySQLadmin (but I'm a newbie at it).  My Coppermine is bridged with Joomla and I'm thinking that is the source of the issue... as it is with most plugins in a bridged environment.  Just thought I'd report this.

disposition

Quote from: PerformanceImagery on January 10, 2008, 10:36:08 AM
Using v2.1 (as well as the plugin in the first post) I get this error...

ERROR !

No table selected. You have to select at least one table.

It was mentioned earlier in the thread, but nothing ever came of it.   My site is hosted on PowWeb and I've not ran into any restrictions with mySQLadmin (but I'm a newbie at it).  My Coppermine is bridged with Joomla and I'm thinking that is the source of the issue... as it is with most plugins in a bridged environment.  Just thought I'd report this.


I have the same issue, my gallery is bridged with phpbb and I get the same error.  Hopefully we will figure out why it gives this error.

Nibbler

You probably need to add $CONFIG['LINK_ID'] to all the mysql_* calls for bridge compatibility.

disposition

Ah, it is a bit over my head, at least at the moment.  I will look into it.  THANKS for your reply.

Joachim Müller

Rolled the contributed language file improvements into new package - attached is version 2.3 of the backup plugin

PerformanceImagery

Quote from: Nibbler on January 18, 2008, 05:38:23 PM
You probably need to add $CONFIG['LINK_ID'] to all the mysql_* calls for bridge compatibility.

Nibbler, can you explain this a bit more please?

cgc0202

Hello,

I wonder what the latest version of this plugin is.  GauGau has this:   cpg1.4.x_plugin_backup_2.3.zip  in his latest post.  Is this the latest and is it the same as the one in the original post?  If possible, kindly include the latest in the first post, to avoid confusion. Thanks.

Cornelio

François Keller

Quote from: cgc0202 on January 30, 2008, 01:26:48 AM
Hello,

I wonder what the latest version of this plugin is.  GauGau has this:   cpg1.4.x_plugin_backup_2.3.zip  in his latest post.  Is this the latest and is it the same as the one in the original post?  If possible, kindly include the latest in the first post, to avoid confusion. Thanks.

Cornelio
The latest version of this plugin is 2.3. You're right, i attach this version to the first post.
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

cgc0202

Quote from: Frantz on January 30, 2008, 07:42:22 AM
The latest version of this plugin is 2.3. You're right, i attach this version to the first post.

Thanks Frantz. And, to avoid confusion, would it be possible to remove the old one? 

I have some important clarifications. 

Case A:
Sometimes when I outgrow a certain "site" (subdomain), I have to create a more dedicated site. And since I am in a shared server, usually the database name dhqnges look like these:


siteusername1_databasename1 => old

siteusername2_databasename1 => new site (different server)

or even like this:

siteusername1_databasename2 => new site (same server)

How are the two situations dealt with?

Case B:

There are some multimedia applications as extensions of Joomla that I wanted to use; but these new applications require storage of the images in other directories, obviously outside of CPG and in Joomla.  To use the applications therefore, I have to place the "original or some derivative images" in the designated directories in Joomla. I am considering redoing   my various CPG photogalleries so that they conform with the Joomla directories used by the applications.  Basically they are placed in the "images" root directory of Joomla, otherwise the programs will not recognize they images. 

This means placing the respective "albums directory" of the various CPGs outside of the CPG. This is doable, I have done this many times  before, using a centralized image repository, outside of CPG.  [Thanks through the help  and tips of several CPG core team members.]

Is there an eway to change the "directory" location of the images  without creating new CPG galleries again?  If not possible, and I had to create the various CPGs with new installs,


  • Is there a way to harvest the "category and album" formats of each CPG, and re-upload them in each fresh CPG install?
  • I can transfer the images by CPG, essentially crating a mirror images of the "albums directory" in the centralzied site. Is there a way, to similarly harvest the "stored text captions" for each of the images and uploaded in the in the new CPG install?

Thanks

Cornelio

Note:

Over the years, I have  tens of thousands of images in several dozens of CPGs -- occupying something like 30-50Gb. They are found in a number of independent shared hosting servers, in multiple domains and subdomains, so I never totaled the actual. My own external disks mostly of photos has used up about 200Gb but these include some of my own photos (the contents of the CPG sites include  photos mostly from Contributors). Several thousands of these images already with captions, and it is a lot of work and time to transfer these captions manually.

Eventually, I have to consolidate my various accounts from the various shared servers I am using now  into a dedicated server, so the aforementioned issues, I will encounter again, in the future.






IceQueen

I want to install the modpack by Stramm in my gallery, but it says that I first need to make a backup of my gallery, so I downloaded this and installed, but when I try to make a backup, it keeps me saying "error!" :S :S

Joachim Müller

Since you failed to post relevant information (what error, link to your page etc.), your request is totally invalid, so you can't expect help.

AndrewRH

Would it be possible for it to be extended so that it compresses the database, eg. zip?

~Andrew~
~Andrew~

mikesreel

THANK YOU THANK YOU THANK YOU!!

V2.3 works perectly...the first time around too :)

evildeepblue

dear

Trad. Chinese (Big5) is tranlate done.  ;D

thanks your plug-in