PDA

View Full Version : Server Upgrade. . .


d8pilot
Sat 17th Jun '06, 5:38pm
Hi everyone, I have my forum running on a PIII 733 Hz, 512 RAM server, running Win2k Server with IIS, PHP 5, and MYSQL 5. Everything is working well but before the forum gets busier I want to move it to another machine - PIV 2.66 GHz, 1.0 Gig RAM also with Win2k Server, IIS, and the same versions of PHP and MYSQL.

They are both my machines, I have full access and they are sitting side by side, 4 feet away from me.

What is the best, easiest, most reliable, safest, way to get the forum as it currently exists from one machine to another. I have no experience with Telnet or SSH as the help manual suggests but learn quickly. . .

Any help would be appreciated, the more detail the better. . . :)

Thanks in advance, Don

Sorry just realized that this section is for the new Beta version, I have 3.5.4 :o

Zachery
Sat 17th Jun '06, 5:50pm
You'll need to move the php files to the enw machine and also move the database.

You can do a dump by going to Start > Run > CMD

cd to your mysql folder then again to the bin folder

c:\mysql\bin>mysqldump --opt -Q -uUSERNAME -pPASSWORD DATABASENAME > c:\database.sql

Move the database.sql file to the new server and


c:\mysql\bin>mysql -uUSERNAME -pPASSWORD DATABASENAME < database.sql

d8pilot
Sat 17th Jun '06, 6:22pm
Thanks for your quick reply. . .

Do I have to do a complete original install of vBulletin on the new machine, then move the files and will it pick up all the previous settings and posts when run?

Thanks. . .

Don

Zachery
Sat 17th Jun '06, 6:50pm
Theres no reason to run the installer, moving the database and the files will take care of everything for you. vBulletin's install process only creates tables and enters the default data into them. You don't need to do this as the sql backup you are making as all of you current data in them.

d8pilot
Sat 17th Jun '06, 7:05pm
Excellant. . .

Using mysqldump created a 0 byte file and error message "unknown option '-m' "

???

slappy
Sat 17th Jun '06, 7:09pm
Maybe you simply mistyped the instruction. There was no "-m" option in what Zachery posted:

c:\mysql\bin> mysqldump --opt -Q -uUSERNAME -pPASSWORD DATABASENAME > c:\database.sql

Regards,

d8pilot
Sat 17th Jun '06, 7:12pm
I see what I did, used -username & -password instead of -uUSERNAME -pPASSWORD

Thanks, trying again. . .

slappy
Sat 17th Jun '06, 7:16pm
We've ALL made mistakes typing mysqldump and mysql restore instructions! No big deal. It simply requires focused attention to "details".

For example, did you know that if you type just the "-p" without the password, it will "prompt" you for the password and it will not show as you type it? Just an added security step that is possible. This would look like this:

c:\mysql\bin> mysqldump --opt -Q -uUSERNAME -p DATABASENAME > c:\database.sql <press enter>
>ENTER PASSWORD:


Regards,

d8pilot
Sat 17th Jun '06, 7:20pm
very cool, so far so good. . .

Do I need to create the new database on the new machine manually before using the second restore command or will that be done automatically?

Don

Zachery
Sat 17th Jun '06, 7:29pm
Depends, creating a database first might be easier.

slappy
Sat 17th Jun '06, 7:29pm
I've not actually attempted it that way on my localhost version of vBulletin. I have four copies, with various versions running at home, but that's the way I do it on the Unix server.

If that is what you intend to try, remember that the CREATE DATABASE command is run from the mysql prompt, NOT the command line. On Unix when you do a CREATE DATABASE, it just creates an empty database with a single, db.opt file in the folder.

I believe if you are running on windows and have the actual vbulletin mysql database files, you can simply create a new windows folder in the mysql/data/ folder and give it a name different from your "other" forum (or the same name, since it's on a different server), fix the vBulletin config.php file to point to this new database, copy your "forum" folder to the new server and, assuming you have correctly set up your OS to access and use mysql and php, you should be in business.

I'm using WAMP because my localhost is not a public accessable server, so it may make a difference. If it does, the process for creating the blank database should be essentially the same as I described above.

d8pilot
Sat 17th Jun '06, 7:44pm
That worked like a charm!!!

I used the restore command as Zachery had suggested in his original post, from the mysqldump I created on the first machine.

I had hoped it would be this straight forward, this software and you folks that design and support it are awesome! :cool:

Thank you so much. . . :D

Don

P.S. so dumping the database this way is the best and easiest way to back up the forum on either a daily or weekly basis?

slappy
Sat 17th Jun '06, 7:55pm
Yep. You should be able to set up a chron job which will automate the pocess for you. For Unix there are a number of availalbe scripts which do the job.

I'm sure if you run a google search with "windows vbulletin back-up script" (without the quotes) you should find what you are looking for. Running that search I quickly came up with this link here:

http://www.vbulletin.com/forum/showthread.php?t=62986

as one discussion. I'm sure searching here would find more, and there is always vbulletin.org for an alternative resourse.

Good luck!

Regards,