Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 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 137648 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Backup: backup and restore the database
« Reply #80 on: October 28, 2007, 11:00:24 am »

My vote is yes too.
Cpg1.5.x development should not be discussed further within this thread!

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

erostew

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 63
Re: Backup: backup and restore the database
« Reply #81 on: October 29, 2007, 06:13:32 pm »

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
« Last Edit: October 29, 2007, 06:29:40 pm by erostew »
Logged

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: Backup: backup and restore the database
« Reply #82 on: October 30, 2007, 09:59:17 am »

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

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: Backup: backup and restore the database
« Reply #83 on: November 23, 2007, 11:48:52 pm »

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 -

Code: [Select]
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,

Logged
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

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: Backup: backup and restore the database
« Reply #85 on: November 24, 2007, 10:46:07 am »

Thanks, that fixed it.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Backup: backup and restore the database
« Reply #86 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.
Logged

disposition

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 183
Re: Backup: backup and restore the database
« Reply #87 on: January 18, 2008, 05:26:46 pm »

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

Nibbler

  • Guest
Re: Backup: backup and restore the database
« Reply #88 on: January 18, 2008, 05:38:23 pm »

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

disposition

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 183
Re: Backup: backup and restore the database
« Reply #89 on: January 18, 2008, 08:24:24 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Backup: backup and restore the database
« Reply #90 on: January 20, 2008, 12:43:00 pm »

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

PerformanceImagery

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Backup: backup and restore the database
« Reply #91 on: January 28, 2008, 06:31:12 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?
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Latest version in the first post
« Reply #92 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
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Backup: backup and restore the database
« Reply #93 on: January 30, 2008, 07:42:22 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.
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

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Backup: backup and restore the database
« Reply #94 on: January 30, 2008, 01:52:19 pm »

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.





Logged

IceQueen

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: Backup: backup and restore the database
« Reply #95 on: October 14, 2008, 08:02:27 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Backup: backup and restore the database
« Reply #96 on: October 15, 2008, 07:59:58 am »

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

AndrewRH

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
    • The Reeves-Hall Family
Re: Backup: backup and restore the database
« Reply #97 on: December 21, 2008, 01:06:30 am »

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

~Andrew~
Logged
~Andrew~

mikesreel

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
    • Mike's Reel Repair
Re: Backup: backup and restore the database
« Reply #98 on: January 19, 2009, 06:38:42 am »

THANK YOU THANK YOU THANK YOU!!

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

evildeepblue

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
TChinese_Big5 language tran done.
« Reply #99 on: January 19, 2009, 07:32:34 am »

dear

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

thanks your plug-in

Logged
Pages: 1 2 3 4 [5] 6   Go Up
 

Page created in 0.027 seconds with 20 queries.