vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Problems cloning site (https://vborg.vbsupport.ru/showthread.php?t=148027)

bts420 05-24-2007 02:50 PM

Problems cloning site
 
I want to clone my production vbulletin forum to a test forum for testing and backup purposes.

so basically I want to create an exact duplicate to a new database and location.

Production
db = vb_prod
url = /mysite/forums

Test Site
db = vb_test
url = /testsite/forums

So here are the steps I've taken

- Dump vb_prod using phpmyadmin
- Edited dump vb_prod.sql and changed all occurences of "mysite/" to "testsite/"
- Restored vb_prod.sql to database vb_test using bigdump.php
- Copy all forum files from /mysite to /testsite
- Edited config.php and updated the database information

Unfortunately I must have missed somthing because this is not working. I get the following error when I try and access the testsite


Warning: array_keys(): The first argument should be an array in /includes/functions.php on line 4840

Warning: preg_replace(): Empty regular expression in /includes/functions.php on line 4840


Any thoughts

Dave Hawley 05-25-2007 03:52 AM

Can't help much with the errors sorry, but make sure you block all bots with a robots.txt file so SE don't pick the Test site over the real one.

Dismounted 05-25-2007 08:01 AM

They can't, all test forums must not be able to be viewed by the public.

bts420 05-25-2007 12:58 PM

Last night I basically redumped the database, and reimported and everything worked. Must of had either a bad export or a bad import the first round.

And yes, my test site is behind an htaccess :)

WetWired 05-25-2007 01:03 PM

I don't have the same version as you, but there's only one line in functions.php which has both a preg_replace and array_keys call on the same line. Judging from that, I'd guess that your datastore is corrupted. I'd strongly advise against the search and replace in the SQL file. Try importing the original export, then running the tools script from the "do not upload" folder (put it in admincp or install directory) to change the cookie domain, if needed (delete it once you're done). You can then login and change any other settings.

bts420 05-25-2007 01:19 PM

Hey wetwired, thanks for the post.

Here is the problem with not editing the SQL. I have vbadvanced installed. Unfortunately it is littered all over the place with the url. The thing that really sucks is that if I go and change the URL via admincp it catches a few but there were still tonnes of references to mysite/ getting mixed into my testsite/ forum.

I admit I am pretty much brand new to vbulletin. I'm converting over from phpbb. With phpbb I simply dumped the database, restored it to the new database and changed one setting. Easy as pie to clone or move the site.

Maybe there is a better way to do this I'm not sure. I might actualy go make a post at vbadvanced because this was a pain in the butt. The 2nd round I actually did not change the sql and I manually went into admincp and change the forum url and the vbadvanced url. Then I ended up spending another hour continually finding that my test site was transferring over the production site because all those damn references were not changed.
I had to update all my smilie, graphic references, html page references, etc. I'm still not sure if I got them all.

Actually I just went through the sql again and I had 78 references to the url in the following tables

vb_adv_pages
vb_datastore
vb_icon
vb_smilie
vb_template

Only 1 of these was vbadvanced, although there were a few vbadvanced related items in the other tables.

So my question then is, is there an easy way to change the site url from admincp and have it update all references easily?

SCRIPT3R 05-25-2007 05:18 PM

why not just use ImpEx?

WetWired 05-25-2007 07:17 PM

Only thing I can suggest, is if the import without the replace doesn't give you those errors, do to the replace on everything but the datastore table (as the datastore may not deserialize properly if it is tampered with), then go and make meaningless changes to various option pages to get the datastore rebuilt.

Dave Hawley 05-26-2007 06:15 AM

Quote:

Originally Posted by Dismounted (Post 1254328)
They can't, all test forums must not be able to be viewed by the public.

Sorry, don't know what you mean. But anyone COULD upload a "test" forum to their domain and if SE crawl it they MAY pick the test site over the real one.

Dismounted 05-27-2007 06:12 AM

The vBulletin license agreement states that all test forums must be secured in a way that the public cannot access. As soon as the directory is secured from the public, this renders all SE crawls useless to the test forum.


All times are GMT. The time now is 01:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01055 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete