Previous Thread
Next Thread
Print Thread
Hop To
Anonymous
Unregistered
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" />

Anonymous
Unregistered
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.

Anonymous
Unregistered
Anonymous
Unregistered
Thanks, but doing this I need two databases. Is it impossible doing this with just one?

Anonymous
Unregistered
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?

Anonymous
Unregistered
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

Anonymous
Unregistered
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!

Anonymous
Unregistered
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?

Anonymous
Unregistered
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?


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
0 members (), 118 guests, and 136 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)