coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: nowordneeded on March 26, 2013, 05:57:56 AM

Title: Importing Settings
Post by: nowordneeded on March 26, 2013, 05:57:56 AM
This really is a question for all my galleries, but for the sake of this post I'll mention this one: http://mitchpileggi.org/gallery. I'm running the current stable version of 1.5.20. So, I use the same settings on all my galleries an it's getting to be a pain in the 'you know where' to have to run through the config page an have to remember what the settings are each time. So my question is this: Is it possible to import the settings from a previous gallery to another in order to not have to keep going through the same process again and again and again?

Thanks in advance.

NWN
Title: Re: Importing Settings
Post by: Αndré on March 26, 2013, 01:40:49 PM
There's no import/export option, but you can easily restore a dump of your config table to your other galleries.
Title: Re: Importing Settings
Post by: nowordneeded on March 26, 2013, 07:52:40 PM
So what would I do then, import the config from mysql and use upload it to my other databases?
Title: Re: Importing Settings
Post by: Αndré on March 26, 2013, 08:16:38 PM
Create a dump of your "source" config table (export). Restore that dump to your "target" galleries' MySQL databases while overwriting the existing table (import). I personally use MySQLDumper to create dumps and to restore them. Of course you can also use PHPMyAdmin, any similar tool or a command line tool of your choice to do that.
Title: Re: Importing Settings
Post by: phill104 on March 26, 2013, 09:03:08 PM
Please remember to backup all your databases before starting ;)
Title: Re: Importing Settings
Post by: nowordneeded on March 29, 2013, 04:36:54 AM
Hi there. I have done what you've told me here, but I keep getting an error in the target gallery. For some reason I just cannot get the target gallery to import from the file export from the other database.

The target gallery is: http://joncypher.samskara.org/gallery and it is running the latest stable version of 1.5.20.
Title: Re: Importing Settings
Post by: phill104 on March 29, 2013, 09:44:14 AM
What error are you getting? I am guessing it is a table already exists error? If that is the case you need to first drop the table on your target database.
Title: Re: Importing Settings
Post by: nowordneeded on March 29, 2013, 09:50:00 AM
Here is the error:

Error

SQL query:

-- -- Dumping data for table `cpg15x_albums` -- INSERT INTO `cpg15x_albums` (`aid`, `title`, `description`, `visibility`, `uploads`, `comments`, `votes`, `pos`, `category`, `owner`, `thumb`, `keyword`, `alb_password`, `alb_password_hint`, `moderator_group`, `alb_hits`) VALUES
MySQL said: Documentation
#1062 - Duplicate entry '1' for key 1
Title: Re: Importing Settings
Post by: Αndré on April 09, 2013, 12:13:06 PM
Don't restore all tables, but just the config table (in your gallery cpg15x_config).