duplicating a forum on a new host?

Started by rcane, January 10, 2022, 09:58:47 AM

Previous topic - Next topic

rcane

So I have need to start an SMF forum on a different host--blue host to be exact. 

Rather than re-write all the tweaks I've learned to do here (hide the news from guests and such), I hoped I could just wrap up my entire forum, migrate (copy) to the new place, and then clear out the member table (except for the moderators) to start bringing in the new users.

Can anyone pen a few steps as I plan this?  I don't want to leave anything out.



Doug Heffernan

Quote from: rcane on January 10, 2022, 09:58:47 AMSo I have need to start an SMF forum on a different host--blue host to be exact. 

Rather than re-write all the tweaks I've learned to do here (hide the news from guests and such), I hoped I could just wrap up my entire forum, migrate (copy) to the new place, and then clear out the member table (except for the moderators) to start bringing in the new users.

Can anyone pen a few steps as I plan this?  I don't want to leave anything out.


Move the complete forum folder to the new host, restore the database backup there, and as last but not least, run the repair_settings.php file to enter the db info of the new host, (you can do this manually as well by entering all the relevant db info to the Settings.php file), and update/straighten out all the urls/paths.

rcane

Quote from: Doug Heffernan on January 10, 2022, 10:37:57 AM
Quote from: rcane on January 10, 2022, 09:58:47 AMSo I have need to start an SMF forum on a different host--blue host to be exact. 

Rather than re-write all the tweaks I've learned to do here (hide the news from guests and such), I hoped I could just wrap up my entire forum, migrate (copy) to the new place, and then clear out the member table (except for the moderators) to start bringing in the new users.

Can anyone pen a few steps as I plan this?  I don't want to leave anything out.


Move the complete forum folder to the new host, restore the database backup there, and as last but not least, run the repair_settings.php file to enter the db info of the new host, (you can do this manually as well by entering all the relevant db info to the Settings.php file), and update/straighten out all the urls/paths.


sounds easy enough.  cPanel the folder down to my desktop.  cPanel it back up to the other place.  thanks.

Matthias

Quality first

rcane

Quote from: Matthias on January 10, 2022, 10:49:23 AMHave a look to this manual:
https://wiki.simplemachines.org/smf/Hosting_-_How_do_I_move_my_SMF_forum_to_a_different_host

Thanks.  fortunately I won't have to update re-directs.   Fresh domain and such.  I just want to bring it over with all the changes I've made, minus the member list.

Sir Osis of Liver

If you try to "clear out the member table" you'll have a really bad day. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

rcane

Quote from: Sir Osis of Liver on January 10, 2022, 11:46:31 AMIf you try to "clear out the member table" you'll have a really bad day. 

Yeah?  what's the safest way to delete members besides doing it one at a time?


Sir Osis of Liver

Many of the database tables are linked, especially to members table.  If you delete things directly from tables, you'll damage the database.  You can delete members in batches of 30 (iirc) in Admin -> Members.  Other content from old forum will remain. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Deaks

many good hosts will migrate your website most for free some may charge
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

rcane

Quote from: Deaks on January 10, 2022, 05:29:17 PMmany good hosts will migrate your website most for free some may charge

true, but i don't want to migrate it over.  I want to duplicate it--just for the tweaks I've made.  Then clean out the member list, attachments, and messages. 

Kindred

If you don't want the content, then why even bother with the database?

Install a new forum on your new site
Install any mods (don't worry about additional customizations)
Then copy the files from your old host backup, with the exception of settings.php

Done.
Clean forum, with all of your file edits intact
Сл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."

rcane

Quote from: Kindred on January 10, 2022, 06:43:18 PMIf you don't want the content, then why even bother with the database?

Install a new forum on your new site
Install any mods (don't worry about additional customizations)
Then copy the files from your old host backup, with the exception of settings.php

Done.
Clean forum, with all of your file edits intact

Because I made some changes in languages; subs; etc.  I didn't want to have to track all those subtle adjustments down.

Just copying over and removing the members seemed the least amount of work.

Illori

if you only made changes to the files/code you most likely dont need the matching database to go with it. unless the code changes were to the database.

Sir Osis of Liver

There are also settings and permissions stored in the database, you'd have to reset those manually.  But would be a better idea to start with clean database.  If you've made customizations to themes and mods, you'd need to reinstall them before copying over files, or they won't show up as installed on new forum.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

That's what I said

Install a new forum on the new site
Install mods

THEN
Overwrite the files with the backup from your old site, except fir settings.php

You get all the customizations with none of the data to clean up
Сл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."

shawnb61

Changes to languages & subs, anything in a .php file, would come over if you follow Kindred's technique.

But any settings in the DB would not, e.g., mod settings, membergroup configs, permissions changes you've made, boards, topics, categories, etc.  All of that is in the DB, and would need to be re-setup. 

As others have noted above, members leave their mark everywhere.  They likely have posts, topics, personal messages, avatars, calendar entries, notification settings, etc.  They likely appear in multiple logs.  You need to clean all that up; it's not just deleting a member record.

If it's a relatively small number of members, only a couple hundred, just copy everything over, files & DB, and delete them by hand.

You can try out anything you want if you get well practiced in backups and restores and have a test copy of your forum.

E.g., you could write a script that calls deleteMember().  That's pretty safe, it walks around and flags messages as being posted by a guest, deletes PMs & avatars, etc.

I actually just did a test & tried what you said.  Just delete them outright in the members table and run the forum maintenance routines to correct issues.  The 'find and fix any errors' and 'recount totals and stats' are actually very robust and do in fact try to deal with missing/deleted members.

So, as a test, I just deleted 37000 members, leaving 10, in a test copy of my 2.0 forum, and ran all the forum maintenance routines, and...

It's a mess.  Thousands of errors just navigating around.  No bueno.  Don't do it in 2.0...

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: