Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
6 registered (jacampbe, MacW, nick1, smallufo, unixpaul, 1 invisible), 18 Guests and 24 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 10/21/08
Posts: 4
Top Posters (30 Days)
Ruben Rocha 158
Rick 118
Gizmo 110
Thelockman 62
driv 55
ScriptKeeper 36
phoebe 35
AllenAyres 35
Ian 31
Mark S 30
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Page 1 of 5 1 2 3 4 5 >
Topic Options
Rate This Topic
#178189 - 02/10/07 07:30 PM Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) ****
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11967
Loc: Portland, OR; USA
1. Backup your current files, this is simple with the "tar" command in Linux/Unix/BSD as:
 Code:
tar -cvpzf my_ubb_backup.tgz /path/to/threads


Additionally, if you're on a "windows" machine you can zip the directory or use any other archival tools available on the machine; if you don't have any you *could* download them file by file via FTP but it will take quite a while.

2. Now you'll want to backup your database, you can do this from free tools like PHPMyAdmin, however I recommend doing so through the command line (in Linux/Unix/BSD) as:
 Code:
mysqldump -uusername -ppassword my_database_name > my_database_name.sql


(Note that you can optionally use the -hhostname and -Pport trigger should you be communicating with a non-local SQL server; please note that most servers do not allow non-local access.)

You can also tar the output by:
 Code:
tar -cvpzf my_ubb_database.tgz my_database_name.sql


Alternatively, if you're on another OS or cannot use Linux command line tools, you can use web utilities like PHPMyAdmin to download an archive of your sql data. Please note that on large forums this is not recommended, and it is always recommended to use the "compression" options within PHPMyAdmin itself (tar/globalzip are recommended).

The Linux/Command Line versions will take MUCH less time to import/export, as you're not going through a php script which uses the web server; you're accessing the SQL server directly.

3. Now you'll want to transfer your backups to your new server. You'd do this either by downloading the database and forum backups to your hard disk, and uploading them to the new server -OR- you can place them both in a web-accessible directory on your old server, and use the "wget" command in Linux/Unix/BSD to download them, ex:
 Code:
wget http://www.yousite.tld/files/my_ubb_database.tgz
wget http://www.yoursite.tld/files/my_ubb_backup.tgz


From here you'll need to decide how you'll put the old files on the new server. If the new server is a Linux machine and you can access it via SSH and have access to "tar" and mysql command line this is a simple process. If your new server is windows based you'll want to be sure it has compression tools if you wish to place a compressed archive (that you likely created in steps 1 and 2) on it.

You'll want to decompress the files on the new server; in Linux/Unix/BSD with tar you'd do:
 Code:
tar -xzvf my_ubb_backup.tgz
tar -xzvf my_ubb_database.tgz


Once tar has extracted the files, you'll want to change to the appropriate directories within the extracted files, and use the "mv" command to move the forum files to their proper new location, EX:
cd the/directories/that/where/created/when/you/made/your/backup/ (by not using a starting slash you tell the command to go from where you are now vs the physical path ont he server)
mv forum /the/new/location/of/your/forum

4. Now that the old files are on the new server, you need to import your database; you can again use PHPMyAdmin or use the command line to import the database. The command line way of doing this (note, this is not the MySQL command line, simply the Linux command line) would be:
 Code:
mysql -h localhost -uuser -ppass database_name < databasebackupfile.sql


(Note that you can optionally use the -hhostname and -Pport trigger should you be communicating with a non-local SQL server; please note that most servers do not allow non-local access.)

The Linux/Command Line versions will take MUCH less time to import/export, as you're not going through a php script which uses the web server; you're accessing the SQL server directly.

Now that the database and files are now on the new server, you need to update your permissions of files and directories, they may or may not have been carried over via your backup (if you used tar), so you'll want to make sure that your files are chmodded 666 and your directories 777.

After checking your permissions, you'll want to update your includes/config.inc.php file, updating the paths (and urls if they're different) for the new server. At the time I'm writing this article, these lines are:
 Code:
  'FULL_URL' => '',
  'BASE_URL' => '',
  'FULL_PATH' => '',
  'SESSION_PATH' => '',
  'REFERERS' => '',
  'ATTACHMENTS_PATH' => '',
  'ATTACHMENTS_URL' => '',


You'll also want to update the MySQL connect information in your includes/config.inc.php file:
 Code:
  'DATABASE_SERVER' => 'localhost',
  'DATABASE_USER' => 'username',
  'DATABASE_PASSWORD' => 'password',
  'DATABASE_NAME' => 'databasename',
  'TABLE_PREFIX' => 'table_prefix',
  'HOMEPAGE_URL' => 'http://www.example.com',


5. From here, you should be completely moved over, it may sound quite difficult at first, but it's really not. Time can vary based on the size of your database, and some sites will be larger than others.

Additionally, if you don't feel comfortable about preforming the move yourself, you can always hire a developer *ahem*orme*ahem* to preform the migration for you.
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#178205 - 02/11/07 04:01 AM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Gizmo]
Mark S Offline
Carpal Tunnel
***

Registered: 07/04/06
Posts: 4041
Loc: Liverpool : England : UK
Very handy Gizmo \:\)

If only for the comand lines at the very least.
I'm going to be doing a sort of transfer when we have 7.1 Final
so i can give it a blast.
_________________________
Version v7.2.2 smile smile < Threads satisfaction status
People who inspire me Rick Gizmo Ian David jgeoff ntdoc
To answer the question you must first give a question.

Top
#178225 - 02/11/07 02:00 PM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Mark S]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11967
Loc: Portland, OR; USA
hehe, i need to write an upgrade guide for within 7.x ;\)
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#178650 - 02/17/07 03:33 PM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Gizmo]
Conrad Offline
enthusiast

Registered: 08/04/04
Posts: 361
Good work, Gizmo. \:\)

Regarding "tar" and file/directory permissions, does anyone know for sure whether they carry over or not?

Top
#178654 - 02/17/07 04:33 PM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Conrad]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11967
Loc: Portland, OR; USA
they should with the -p flag
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#178707 - 02/18/07 03:20 PM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Gizmo]
Conrad Offline
enthusiast

Registered: 08/04/04
Posts: 361
I can move a tar file manually to the new server by downloading it to my desktop first, right? And I take it that I would use binary for this, which seems to be the way to move zip files as well?

If I was to do it using the "wget" command then how do I then transfer & unpack it in the right directory, namely the "/public_html/" one?

And how would I be able to "wget" the database dump into a directory that is not the www one, say one level above the web root?

Top
#178710 - 02/18/07 04:18 PM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Conrad]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11967
Loc: Portland, OR; USA
1. You CAN.
2. You'd untar it, then cd to the directory of files you wish to move, then:
mv old_public_html/* /path/to/new_public_html

And WGet is a linux command, you can run it from any directory that you have permissions to run it from; but on the site you're grabbing it from, it has to be in the webroot to use wget to grab it.
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#178725 - 02/19/07 08:22 AM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Gizmo]
Conrad Offline
enthusiast

Registered: 08/04/04
Posts: 361
The directory I'm currently in when I type in "tar -cvpzf my_ubb_backup.tgz /path/to/threads" is where the zipped file will be placed?

OR is there a command that I can add to that line that will point to the directory where I want the zipped file to be saved?

Top
#178737 - 02/19/07 12:06 PM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Conrad]
Ian Moderator Offline

***

Registered: 06/05/06
Posts: 4156
Loc: Essex, UK
just put the full path to the chosen directory before the my_ubb_backup.tgz - so /full/path/to/my_ubb_backup.tgz
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....))

Top
#178743 - 02/19/07 01:44 PM Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not) [Re: Ian]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11967
Loc: Portland, OR; USA
If you do ian's route you can specify the directory, if no directory is defined the file will be created wherever you execute the command (assuming you have write access to that directory)
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
Page 1 of 5 1 2 3 4 5 >


Shout Box

Today's Birthdays
Neptin
Recent Topics
Custom Island per Forum?
by unixpaul
13 minutes 32 seconds ago
SQL Corruption?
by Jason Carey
Today at 05:52 AM
adding views column to portal page
by nick1
Today at 05:12 AM
Upload broken in 7.4.1
by MacW
Today at 03:23 AM
Pruning Messages
by EMG
11/18/08 06:57 PM
Forum Stats
4247 Members
33 Forums
30482 Topics
154616 Posts

Max Online: 978 @ 06/24/07 08:19 PM