[SOLVED] Transferring live site structure to local host copy

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
Gumboots
Registered User
Posts: 196
Joined: Fri Oct 11, 2019 1:59 am

[SOLVED] Transferring live site structure to local host copy

Post by Gumboots » Tue Oct 15, 2019 1:08 am

I'm setting up a phpBB test site on local, and I want to duplicate the basic structure of the live site. IOW, categories, boards, member groups and permissions, but no actual content.

Which db tables to I need to import to local to get this result? I know I will need phpbb_groups and phpbb_forums. Anything else required?
Last edited by Gumboots on Tue Oct 15, 2019 3:21 am, edited 1 time in total.

User avatar
dingus33
Registered User
Posts: 127
Joined: Fri Sep 29, 2017 11:11 am

Re: Transferring live site structure to local host copy

Post by dingus33 » Tue Oct 15, 2019 1:14 am

Gumboots wrote:
Tue Oct 15, 2019 1:08 am
I'm setting up a phpBB test site on local, and I want to duplicate the basic structure of the live site.
great idea, but why don't you want to reproduce the other data?
a suggestion if i may: use this as an opportunity to test your automatic backups. restore them to your local environment so you know they work. in addition, it gives you more experience with restoring them. i do this whenever i start developing something new.

User avatar
Gumboots
Registered User
Posts: 196
Joined: Fri Oct 11, 2019 1:59 am

Re: Transferring live site structure to local host copy

Post by Gumboots » Tue Oct 15, 2019 1:29 am

The reason I don't want all the data is that I don't need it on local anyway, since I'm just testing ideas for presentation. I can always Cthuvian Ipsum up a dozen or so topics if I feel like, but for hacking things like the site header they're not necessary. I just want something that looks like the overall look of the actual site.

Plus I'd have to screw around in the local's config files to get it to import the whole shebang, and at the moment I'm too lazy to do that. :D

Testing backups is a good idea, but I can do that on the actual server just by importing them to second db and pointing the site at that (I made a backup before moving hosts the other day and have already checked the content in that).

User avatar
Lumpy Burgertushie
Registered User
Posts: 66858
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Transferring live site structure to local host copy

Post by Lumpy Burgertushie » Tue Oct 15, 2019 1:36 am

you can't just pick and choose tables to import. most , if not all, of the phpbb tables are interconnected.
just do a export of the database and then import it to your local database.

then, if you just don't want the posts etc. you can delete them, same with the members, etc.


luck,
robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Gumboots
Registered User
Posts: 196
Joined: Fri Oct 11, 2019 1:59 am

Re: Transferring live site structure to local host copy

Post by Gumboots » Tue Oct 15, 2019 1:46 am

Lumpy Burgertushie wrote:
Tue Oct 15, 2019 1:36 am
you can't just pick and choose tables to import. most , if not all, of the phpbb tables are interconnected.
You're just trying to encourage me to try it anyway. :lol:
I wouldn't bet my life on it right now, but I think you can as long as you pick the right tables. I've done it before with other software for the same purpose, which is why I asked.

For example, the forums table won't be cross-referenced with the members table on a fresh installation. No need for it to be. No members, for one thing, and they have to be able to add themselves as it goes anyway.

And we both know that in some circumstances it's handy to be able to import or or two tables anyway, like if they are knackered and you have a backup of them, but importing the entire db would take longer than you want. I get that you're trying to n00b-proof this question, but I don't want you to. It's only a local test site anyway. Those are a dime a dozen. ;)

User avatar
dingus33
Registered User
Posts: 127
Joined: Fri Sep 29, 2017 11:11 am

Re: Transferring live site structure to local host copy

Post by dingus33 » Tue Oct 15, 2019 1:51 am

i hear you. if i knew off the top of my head how to do it and that it would for sure work, i'd just directly answer your question.

but since i don't..

instead, i'll encourage you to put that energy towards solutions that let you conveniently restore locally (or elsewhere in the event of a failure). and for local dev work, maybe set up a vm environment similar to your hosting? an ideal backup solution to work towards wouldn't be just for your phpBB files and db. it would be for your server configs as well.

User avatar
Gumboots
Registered User
Posts: 196
Joined: Fri Oct 11, 2019 1:59 am

Re: Transferring live site structure to local host copy

Post by Gumboots » Tue Oct 15, 2019 2:13 am

Sounds good in theory, but I'm not really a server type myself. I don't run the thing and frankly wouldn't know how. I just like messing with where things are on a GUI and how they look, and sometimes with how they function.

I'll see if I can find a brief summary in the docs of what each table does, then make a few deductions and try a few things.

User avatar
3Di
Former Team Member
Posts: 14389
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Transferring live site structure to local host copy

Post by 3Di » Tue Oct 15, 2019 2:27 am

Install a fresh copy of the same phpBB version you running live. in local.

There will be only you the admin and 1 post. :lol:

Then copy the style(s) (if any).. else you can go ahead.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
✒️ Black Friday 2019 @ The Studio ▪️◾️

User avatar
Gumboots
Registered User
Posts: 196
Joined: Fri Oct 11, 2019 1:59 am

Re: Transferring live site structure to local host copy

Post by Gumboots » Tue Oct 15, 2019 3:15 am

Already got it sorted. If anyone else wants to know:

1/ Export these tables from your live site (data and structure, with DROP/CREATE commands included):

Code: Select all

phpbb_acl_groups
phpbb_acl_options
phpbb_acl_roles
phpbb_acl_roles_data
phpbb_acl_users
phpbb_forums
phpbb_groups
phpbb_ranks
2/ Export backups of the same tables from your local. Stash these somewhere handy, in case you make a mistake.

3/ Import file from 1/ into your local.

4/ Yay! Things will be borked. :lol: Not to worry. Easy to fix.

5/ Go into ACP.

6/ Clear cache.

7/ Go to Prune Forums.

8/ Select all.

9/ Hit the button and pray.

10/ Go back to board index. Hey presto! It works. :P

And they said it couldn't be done. :lol:

WARNING: Do not ever try this stunt on a live site.
It is only for setting up a stripped facsimile of your live site on a disposable test site.
If you try it on any site, disposable or otherwise, you and you alone are responsible for the outcome.
This means you. Not me. You. Kthnxbai. :D

User avatar
warmweer
Registered User
Posts: 3055
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Transferring live site structure to local host copy

Post by warmweer » Tue Oct 15, 2019 9:02 am

Gumboots wrote:
Tue Oct 15, 2019 3:15 am
Already got it sorted. If anyone else wants to know:
...
Nothing wrong with your method but you could achieve exactly the same with just setting up a complete copy of your board on localhost, and then edit that to your needs.
Gumboots wrote:
Tue Oct 15, 2019 3:15 am
And they said it couldn't be done.
Who said that?
The year is 2192. The British Prime Minister visits Brussels to ask for an extension of the Brexit deadline. No one remembers where this tradition originated, but every year it attracts many tourists from all over the world.

User avatar
Gumboots
Registered User
Posts: 196
Joined: Fri Oct 11, 2019 1:59 am

Re: [SOLVED] Transferring live site structure to local host copy

Post by Gumboots » Tue Oct 15, 2019 9:29 am

Lumpy did. ;)

The thing about setting up the complete site on local is that it would involve importing 140meg of stuff I don't need. This would require changing the config of the local server (it's only a basic desktop package) and it would require time to import. From my perspective, for this use case, it's much faster and easier to just import 140 kB of stuff I do need. YMMV.

User avatar
david63
Registered User
Posts: 16718
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [SOLVED] Transferring live site structure to local host copy

Post by david63 » Tue Oct 15, 2019 9:41 am

Seems a lot of effort when you could have used the Quick Install extension (which is designed for this very purpose) and had it up and running in 10 minutes.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Gumboots
Registered User
Posts: 196
Joined: Fri Oct 11, 2019 1:59 am

Re: [SOLVED] Transferring live site structure to local host copy

Post by Gumboots » Tue Oct 15, 2019 10:07 am

What does it do apart from install? Does it generate a range of content automatically?

My way didn't take long, and would take even less time now I know exactly what's required. Plus it was a bit of fun, and I learnt something anyway.

User avatar
david63
Registered User
Posts: 16718
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [SOLVED] Transferring live site structure to local host copy

Post by david63 » Tue Oct 15, 2019 10:18 am

Gumboots wrote:
Tue Oct 15, 2019 10:07 am
Does it generate a range of content automatically?
Yes
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Gumboots
Registered User
Posts: 196
Joined: Fri Oct 11, 2019 1:59 am

Re: [SOLVED] Transferring live site structure to local host copy

Post by Gumboots » Tue Oct 15, 2019 10:22 am

Ok, I'll try that next time.

Post Reply

Return to “[3.2.x] Support Forum”