Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
My understanding that making a test site is permitted, provided it's used only as a test site.

Here are my notes on how to do it. These are based on using a Linux platform, and having shell access.

-------------------------------

Cloning a test copy of a UBB.threads installation

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

Target board:
MySQL 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 foo1_db to the database foo2_db.

The easiest way is probably to use mysqldump to back up foo1_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 foo1_db >foo1_db.sql

mysql -ufoo_user -p foo2_db < foo1_db.sql

2) Copy all files from the source directories to the target directories.

If the target directories don't exist, create them:

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

If the target directories already exist, delete their contents:

rm -R /example/htdocs/ubbt/foo2_dir/*
rm -R /example/ubbt/foo2_dir/*

Copy the files:

cp -a /example/htdocs/ubbt/foo1_dir/* /example/htdocs/ubbt/foo2_dir
cp -a /example/ubbt/foo1_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 "foo1" 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) Edit any other files that contain path references or otherwise need to be different for this clone. For example, the following files may need to be edited:

/example/htdocs/ubbt/foo2_dir/includes/header.php
/example/ubbt/foo2_dir/cron/php/doexpire.php
/example/ubbt/foo2_dir/cron/php/subscriptions.php

5) Delete the copied log files.

rm /example/ubbt/foo2_dir/logs/*

That's it.

Sponsored Links
Entire Thread
Subject Posted By Posted
How do I make a Test site Liahona_dup1 02/28/2003 9:13 PM
Re: How do I make a Test site Dave_L_dup1 02/28/2003 9:46 PM
Re: How do I make a Test site Liahona_dup1 03/01/2003 12:06 AM
Re: How do I make a Test site Liahona_dup1 03/01/2003 1:12 PM
Re: How do I make a Test site Liahona_dup1 03/03/2003 7:47 PM
Re: How do I make a Test site Liahona_dup1 03/04/2003 9:31 PM
Re: How do I make a Test site JoshPet 03/04/2003 9:39 PM
Re: How do I make a Test site Liahona_dup1 03/04/2003 9:49 PM
Re: How do I make a Test site Dave_L_dup1 03/05/2003 12:58 AM
Re: How do I make a Test site Liahona_dup1 03/05/2003 1:02 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)