coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Hercules24 on November 21, 2006, 02:00:54 AM

Title: Restoring an old backup
Post by: Hercules24 on November 21, 2006, 02:00:54 AM
Hi, I wonder if I ever have to reinstall a huge picture gallery that first started as CPG_133, but has been updated to 1410 I will get in trouble.
I remember once switching hosts when I had 133, and because back then 135 was already released, I had to manually install 133 first with the new host, then run a back up, and then upgrade to 135.
But since 141 there have been a lot of changes in the number of dbase tables, I wonder if it's still possible to get a backup working.
CPG 1.4.10 runs perfect now, but all my dbase tables are still named cpg133_albums etc.
So will I be able to get this back up restored if for what reason I have to start on a different server?
Thanks for the advice.
Title: Re: Restoring an old backup
Post by: Joachim Müller on November 21, 2006, 05:26:36 AM
There's no limit to the size of the database - you can backup and restore any size of database. The only issue you might run into is some tools like phpMyAdmin running into timeouts when backing up or restoring huge databases. To circumvent this, either use the shell if you have access to it. If you don't have it, use mySqlDumper (http://forum.coppermine-gallery.net/index.php?topic=31423.msg145478#msg145478).
Title: Re: Restoring an old backup
Post by: Hercules24 on November 21, 2006, 03:21:48 PM
Thanks Gaugau, I ment that will a newly installed CPG1410 "understand" an backup restore where the tables have the prefix 133?
I remember back then I would get like 13 empty tables with 135 prefix and after running a backup also 13 filled tables with prefix 133 but the new CPG only "saw" the empty 135 tables because it was looking for tables with the 135 prefix instead of 133.
Title: Re: Restoring an old backup
Post by: Joachim Müller on November 21, 2006, 05:47:55 PM
No, it will not "understand". Edit the dump with a text editor, replacing the prefix.
Title: Re: Restoring an old backup
Post by: Hercules24 on November 23, 2006, 12:19:35 AM
Ok thanks Gaugau, I don't no much about technicalities, but I think I can use PHP designer 2005 as an editor.
There's like 200 times "133 references" like cpg133_albums, cpg133_banned, cpg133_bridge etc.
In what exactly should I change the prefix when using this backup in a freshly installed 1.4.10 and maybe in a future 1.4.11?
Title: Re: Restoring an old backup
Post by: Nibbler on November 23, 2006, 12:45:40 AM
The prefix in the database has to match the prefix in include/config.inc.php. Change one or the other. That's all there is to it.
Title: Re: Restoring an old backup
Post by: Hercules24 on November 24, 2006, 12:13:37 AM
Thanks Nibbler,
It's a lot easier to change only 1 prefix in the config.inc.php.
This way it's even possible to change the Mysql dbase name I see.
Problem solved!