 |
 |
 |
 |
Registered: 06/12/06
Posts: 515
|
|
|
 |
 |
 |
 |
|
 |
 |
 |
 |
#178189 - 02/10/07 10:30 PM
Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not)
|
|
Registered: 06/05/06
Posts: 14903
Loc: Portland, OR; USA
|
|
1. Backup your current files, this is simple with the "tar" command in Linux/Unix/BSD as: 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: 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: 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: 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: 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: 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: '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: '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.
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
|
Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#178913 - 02/20/07 10:22 PM
Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not)
[Re: Gizmo]
|
addict
|
Registered: 08/04/04
Posts: 425
|
|
Righto, I just tried moving my forum to a new server and failed miserably.  I was able to do the following: -dump the db -tar both the dump as well as the forum folder titled "ubb" -wget both to the new server What I couldn't do: tar (unpack) any of the files on the new server 1. This is what I got when I typed "tar -xzvf forumdump.tgz" into the command prompt: ...a pause that lasted a few seconds, and then this... gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now2. I was also unable to tar (unpack) the forum files. I did the wget while being in the web root of the new server account, so the tgz file was naturally saved in "public_html" which was what I wanted. But when I tried to unpack it (tar -xzvf ubb.tgz) it simply listed all the compressed files like this... but no new files appeared anywhere so nothing got unpacked: home/forum/public_html/ubb/file1.whatever home/forum/public_html/ubb/file2.whatever home/forum/public_html/ubb/file3.whatever home/forum/public_html/ubb/file4.whatever and so on... What's interesting is that it was listing the path that was used on the old server: home/forum/... (which surprised me because why should a compressed file list the previous absolute path of all its elements), whereas on the new one the correct path is home/ubb/... Still, nothing was unpacked anywhere. ============ Any thoughts on how I can move my forum files across successfully? Is there a way to move over the ubb folder using wget but without a) having to compress anything -and- b) keep the original file permissions? The compression thing is messing me up and I can afford to go without it. But how can I keep all forum file permissions intact?
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#196904 - 09/09/07 10:08 PM
Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not)
[Re: BillT]
|
|
Registered: 06/05/06
Posts: 14903
Loc: Portland, OR; USA
|
|
This is the guide that i use (hence why I threw it on the forum ;)). I would totally recommend only using hosts with CLI access as it makes certain tasks much easier (backing up with tar, utilizing the mysqldump command, etc). That error occours becasue you're reaching your space limit (see Disk limit reached), you can't write after you reach your limit. Most hosts "secure" the mysql server by not allowing external (off site) connections, otherwise i'd tell you to use sqlyog (as i believe it will allow you to dump all data to your local machine). The backup utility in the forum will also reach this space limit, so no use recommending that... You may contact your host, and ask if they could dump the sql database for you as you reach this limit, a lot of them will actually be helpful for "backups". As for recommending a host, I only really recommend VPS for larger sites, and in that I recommend http://www.webintellects.com
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#219871 - 12/04/08 08:18 AM
Re: Gizmo's UBB.Threads 7.x Transfer Guide for Dummies (or not)
[Re: Crasher]
|
stranger
|
Registered: 12/15/07
Posts: 3
|
|
Gizmo,
I followed your instructions and have successfully transferred a modererate sized forum from one ISP account to another (same ISP). I have checked permissions, and modified all code in the custom islands to reflect the appropriate data paths as well as modifying the config file.
However, I have a problem. I have three custom islands that are not working. When I try to "modify" the code within the island, I get the SQL ServerError message:
Script: - Line: SELECT COUNT(*) as total, p.USER_ID, u.USER_DISPLAY_NAME, u.USER_MEMBERSHIP_LEVEL, up.USER_NAME_COLOR FROM ubbt_POSTS as p, ubbt_USERS as u, ubbt_USER_PROFILE as up
WHERE u.USER_ID = up.USER_ID AND p.POST_POSTED_TIME > 1212842253 AND p.USER_ID NOT IN (1,2) AND p.USER_ID = u.USER_ID GROUP BY p.USER_ID ORDER BY total DESC limit 5 - Server shutdown in progress
Of course the Posted Time changes...
Any advice?
Thanks
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
|
|