Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2007, 02:50 PM
bts420 bts420 is offline
 
Join Date: Jan 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 05-25-2007, 03:52 AM
Dave Hawley Dave Hawley is offline
 
Join Date: Jun 2004
Location: Australia
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 05-25-2007, 08:01 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They can't, all test forums must not be able to be viewed by the public.
Reply With Quote
  #4  
Old 05-25-2007, 12:58 PM
bts420 bts420 is offline
 
Join Date: Jan 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 05-25-2007, 01:03 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 05-25-2007, 01:19 PM
bts420 bts420 is offline
 
Join Date: Jan 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 05-25-2007, 05:18 PM
SCRIPT3R SCRIPT3R is offline
 
Join Date: Jan 2005
Posts: 1,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why not just use ImpEx?
Reply With Quote
  #8  
Old 05-25-2007, 07:17 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 05-26-2007, 06:15 AM
Dave Hawley Dave Hawley is offline
 
Join Date: Jun 2004
Location: Australia
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
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.
Reply With Quote
  #10  
Old 05-27-2007, 06:12 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03: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.04223 seconds
  • Memory Usage 2,248KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete