Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
7 registered (smallufo, SteveS, sampsonzurich, Bjab, FordDoctor, Stan, Pilgrim), 27 Guests and 13 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 05/17/12
Posts: 3
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 14
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#21314 - 01/04/03 02:25 PM Upgrading and creating new instalation on same server
Anonymous
Unregistered

Hi,

Im currently running UBBT 6.1.

I want to first create a development site in a .htaccess protected catalog on the same server (using the same database) as the live 6.1 site. I want the database content of the 6.1 site imported/duplicated to the new development site.

How do I do this?

When this is done, and the 6.2 dev site is working with all the mods I´m about to install, I´ll upgrade the live 6.1 site to 6.2.

As I understand 6.2 is designed so that one can have multiple installations of UBBT, but is that only when creating new boards or will it work for in my case as well?

All in all... help! <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />
Top
#21315 - 01/04/03 04:15 PM Re: Upgrading and creating new instalation on same server
Anonymous
Unregistered

If I understand your question, you just want to "clone" your production installation of UBB.threads 6.1? Here are some notes I wrote up. This is for 6.2 on Linux, and uses shell commands, but it may be helpful.

----------

Cloning a test copy of a UBB.threads installation

Source board:
MySQL database name - foo_db
MySQL user - foo_user
install dir - /example/htdocs/ubbt/foo_dir
non-HTTP dir - /example/ubbt/foo_dir
admin/MySQL log dir - /example/ubbt/foo_dir/logs
cookie prefix - 1

Target board:
database name - foo2_db
MySQL user - foo_user
install dir - /example/htdocs/ubbt/foo2_dir
non-HTTP dir - /example/ubbt/foo2_dir
admin/MySQL log dir - /example/ubbt/foo2_dir/logs
cookie prefix - 2

1) Copy the database foo_db to the database foo2_db.

The easiest way is probably to use mysqldump to back up foo_db, and then restore the backup into foo2_db.

First create the database foo2_db, and if necessary, adjust foo_user's grants so that it has access to foo2_db.

Then:

mysqldump --quick --add-drop-table --add-locks --lock-tables -ufoo_user -p foo_db >foo_db.sql

mysql -ufoo_user -p foo_db < foo_db.sql

2) Create the clone directories, and copy all files from the source directories to the target directories.

mkdir /example/htdocs/ubbt/foo2_dir
mkdir /example/ubbt/foo2_dir

cp -a /example/htdocs/ubbt/foo_dir/* /example/htdocs/ubbt/foo2_dir
cp -a /example/ubbt/foo_dir/* /example/ubbt/foo2_dir

(Ensure that hidden files such as .htaccess were copied.)

3) Edit the configuration files to change the references.

Change all occurrences of "foo" to "foo2" in the following files:

/example/htdocs/ubbt/foo2_dir/main.inc.php
/example/ubbt/foo2_dir/config.inc.php

Edit /example/ubbt/foo2_dir/config.inc.php and change $config['cookieprefix'] from "1" to "2".

4) Delete the copied log files.

rm /example/ubbt/foo2_dir/logs/*

That's it.
Top
#21316 - 01/04/03 05:34 PM Re: Upgrading and creating new instalation on same server
Anonymous
Unregistered

Thanks, but doing this I need two databases. Is it impossible doing this with just one?
Top
#21317 - 01/04/03 05:37 PM Re: Upgrading and creating new instalation on same server
Anonymous
Unregistered

Do you mean you want to duplicate all the database tables, but put the duplicate tables in the same database as the original tables?
Top
#21318 - 01/05/03 11:51 AM Re: Upgrading and creating new instalation on same server
Anonymous
Unregistered

Dave_L - could your method above still work but you would open up the dump file by hand and change the table names consistently?

i.e. - rename w3t_ to w4t_ for the foo2 install?and be sure to hand edit the config.inc.php file the same way?

Regards,

Brett Harris
Infopop Corporation
Top
#21319 - 01/05/03 02:48 PM Re: Upgrading and creating new instalation on same server
Anonymous
Unregistered

</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">Originally posted by Dave_L:
Do you mean you want to duplicate all the database tables, but put the duplicate tables in the same database as the original tables?</font><hr /></blockquote><font size="" face="">At first this is what I needed. But now my host has supplied me with an additional database, so now I can follow the instructions given here!

Thanks!
Top
#21320 - 01/06/03 03:40 AM Re: Upgrading and creating new instalation on same server
Anonymous
Unregistered

</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">
2) Create the clone directories, and copy all files from the source directories to the target directories.

mkdir /example/htdocs/ubbt/foo2_dir
mkdir /example/ubbt/foo2_dir

cp -a /example/htdocs/ubbt/foo_dir/* /example/htdocs/ubbt/foo2_dir
cp -a /example/ubbt/foo_dir/* /example/ubbt/foo2_dir

(Ensure that hidden files such as .htaccess were copied.)

</font><hr /></blockquote><font size="" face="">Is it possible to tar the direcroties and "un tar" them into the new place? If I just duplicate the directories, won´t I loose all permission settings? Or is that exacly what you´re saying?
Top
#21321 - 01/05/03 04:02 PM Re: Upgrading and creating new instalation on same server
Anonymous
Unregistered

</font><blockquote><font size="1" face="">quote:</font><hr /><font size="" face="">Originally posted by Dave_L:

2) Create the clone directories, and copy all files from the source directories to the target directories.

mkdir /example/htdocs/ubbt/foo2_dir
mkdir /example/ubbt/foo2_dir

cp -a /example/htdocs/ubbt/foo_dir/* /example/htdocs/ubbt/foo2_dir
cp -a /example/ubbt/foo_dir/* /example/ubbt/foo2_dir

(Ensure that hidden files such as .htaccess were copied.)

3) Edit</font><hr /></blockquote><font size="" face="">When trying "cp -a /example/htdocs/ubbt/foo_dir/* /example/htdocs/ubbt/foo2_dir"

this is what i get:
<pre>
cp: illegal option -- a
usage: cp [-R [-H | -L | -P]] [-f | -i] [-pv] src target
cp [-R [-H | -L | -P]] [-f | -i] [-pv] src1 ... srcN directory</pre>

Strange. Any idea of what could be wrong?
Top



Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Due Date Calculator-Calculate When Your Baby is Due
by StewartMyduedate
12:54 AM
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image