News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Copying boards and Membergroups from new forum to a Test Forum

Started by Siirist, April 25, 2015, 10:27:10 AM

Previous topic - Next topic

Siirist

Hi,

Well, I have been told in the past to always have a testing forum.

Now I do, but I don't want to have to create everything again.

Any thoughts on how to do this?

Siirist
Previously name was Cloud
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

margarett

Sure.
Just duplicate your database and your files. Then load repair_settings and fix the database + paths and you are all set ;)
What is repair_settings.php?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Siirist

Quote from: margarett on April 25, 2015, 12:17:43 PM
Sure.
Just duplicate your database and your files. Then load repair_settings and fix the database + paths and you are all set ;)
What is repair_settings.php?

Sounds easy enough.  ???  ::)

Will give it a shot.

Thank you for your quick reply!! :D

Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Siirist

Okay, so I went to my host, then logged into phpMyAdmin and then counted 65 files on the left sidebar. So, I went to help on how to copy / rename a database, and got the following:


"How to Copy a Database

To copy a database you will need to export the original database, and then import it onto a new database.
How to Export the Original Database

    Go to phpMyAdmin
    Click on the existing database on the left sidebar
         HELLO, there are 65 of them!
    Click Export at the top
    Click the "Save on server in the directory" checkbox, and click Go
    This will save a .sql file to a temporary folder on your account.

How to Import onto a New Database

    Create a new database in cPanel
    Go to phpMyAdmin
    Click the new database name in the top left
           Same deal, there are 65 of them!
    Click Import in the main area of phpMyAdmin
    Click the radio button "Select from the web server upload directory /home/USERNAME/tmp/:"
    Select the database you imported earlier from the drop down box and click Go

Note: phpMyAdmin will timeout after 30 seconds of attempting to import."

Sounds like about 130 activities total to "copy" a database.  :o
My estimate on time for me to complete, about 2 - 4.5 hours.
And this is something that I should be prepared to do if the forum ever "crashes"?  ???  Really?


Not counting the posts,
I can built a whole new forum, including boards, membergroups, mods, and themes. in less time than that. :(
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

br360

Are you saying you have 65 databases, or 65 tables in that database? Exporting then importing a database really doesn't take all that long.

Basically you export your database by doing a one click (click all) of all the tables, then press export. Then when you are about to import it, you just have to make sure that you have created a new database, name it, give yourself full permissions, make sure it is empty, and then import the database info you exported.

That whole part should take a few minutes. Here is a tutorial with some images that may help explain it better- http://kb.mediatemple.net/questions/129/Export+and+import+MySQL+databases#gs

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Siirist

Quote from: br360 on April 25, 2015, 02:46:46 PM
Are you saying you have 65 databases, or 65 tables in that database? Exporting then importing a database really doesn't take all that long.

Basically you export your database by doing a one click (click all) of all the tables, then press export. Then when you are about to import it, you just have to make sure that you have created a new database, name it, give yourself full permissions, make sure it is empty, and then import the database info you exported.

That whole part should take a few minutes. Here is a tutorial with some images that may help explain it better- http://kb.mediatemple.net/questions/129/Export+and+import+MySQL+databases#gs



Mine only shows the 65 files - NOT a database.

Hmm.....
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Illori

if you open your Settings.php file can you confirm that your database is on the same server that your phpmyadmin is showing? the very top line on the right side is your server name.

your server would be to the right side of this line in your Settings.php file

$db_server = 'localhost';

where mine says localhost yours will say something else.

your Settings.php file is in the same folder as your SSI.php file.

HDB

Having a test forum is a good idea. I have one but I don't have my database and files (pictures and attachments) duplicated on the test forum.

I may be wrong but for what it is worth I have been told that having a duplicate site with mirrored content will lower your search rank as the content is not unique when it is on two sites. The key of any search engine indexing success is having unique content.  Having the same content on two different sites will not be understood by search engines. Unless somehow you block their access.

The test forum I have is used for testing patches and mods before I put them on my main site. After installing a revised mod or a new patch I do test posts and load a test picture or two to see that everything works and no errors are logging as a result of the new patch or revised (or new) mod. To do that kind of testing you don't need your database and full content of your main forum.

Suki

There is a difference between a mirror and a test site.

The key point here is what exactly the OP wants to do.  But I strongly suggest we instruct the OP about the difference between a file a table and a database before going any further with this.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Kindred

Quote from: Suki on April 26, 2015, 09:48:06 AM
But I strongly suggest we instruct the OP about the difference between a file a table and a database before going any further with this.

yes, this....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Siirist

Quote from: Illori on April 26, 2015, 06:21:29 AM
if you open your Settings.php file can you confirm that your database is on the same server that your phpmyadmin is showing? the very top line on the right side is your server name.

your server would be to the right side of this line in your Settings.php file

$db_server = 'localhost';

where mine says localhost yours will say something else.

your Settings.php file is in the same folder as your SSI.php file.

Like this

########## Database Info ##########
$db_type = 'mysql';
$db_server = 'localhost';
$db_name = DELETED;
$db_user = DELETED;
$db_passwd = DELETED;
$ssi_db_user = '';
$ssi_db_passwd = '';
$db_prefix = DELETED;
$db_persist = 0;
$db_error_send = 0;
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Illori

your screenshot would leave me to believe that you are using phpmyadmin to connect to a remote server and not your localhost. you should talk to your host about this.

Siirist

Quote from: Illori on April 27, 2015, 11:27:56 AM
your screenshot would leave me to believe that you are using phpmyadmin to connect to a remote server and not your localhost. you should talk to your host about this.


Okay.  Also have started working with Margarett to restore using the old back-ups and may have him do this as well.

Will mark as solved.  ;)
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Advertisement: