View Full Version : Back up vB database
Jako
January 24th, 2005, 10:46 PM
What is the best way to backup a vbulletin database so everything I have is saved and I can move it to my new server. I am asking this because last time I tried, I screwed something up and lost all my data :(. Can you explain the exact steps on how I would back it up and then reupload it.
Thanks
JustJeff
January 24th, 2005, 11:26 PM
If you have SSH/Telnet/Shell access:
mysqldump -u<username> -p <dbname> > db_backup_YYMMDD.sql
Otherwise, use phpMyAdmin to generate a dump that includes complete inserts (it'll be a checkbox option).
Note that thorough db admins would also include 'drop table' statements, but since you don't seem have much experience (not a problem, just an observation), adding drop table may cause unexpected data loss if you try to restore the dump to a live box by accident.
CyanBlue
January 24th, 2005, 11:33 PM
Just out of curiosity, Jeff... :)
I thought that 'drop table' parameter adds that SQL command so that it will delete the table if exists when restoring it, right??? Then, it won't make any difference in Jako's case because basically what he wants to do is move everything to the new host... Or is there something that I am not seeing???
Jako... Do what JustJeff says... Do the database back up that way and ftp every files into the new host from the old host and restore the database... You should be fine... I don't really see a reason why you will lose the forum data... ;)
JustJeff
January 24th, 2005, 11:43 PM
CyanBlue,
Yes, a 'drop table' line will delete a table if it exists. Generally, this is desired, however - if it's run on a live server, and there's an error later in the file, you could be in a lot of trouble. Since he's asking how to do a backup, I'm assuming that he hasn't done many, and I'm trying to help him avoid any surprises (if, for example, he tried reuploading the script to the wrong server).
Since he's moving to a new server, there shouldn't be any tables, so drop'ing non-existent tables isn't of the highest priority.
CyanBlue
January 25th, 2005, 07:44 AM
if it's run on a live server, and there's an error later in the file
You mean the error in the SQL backup file, right??? Hm... That's something I have not thought about... Thanks for the tip... Learn something new everyday... ;)
Jako
January 26th, 2005, 06:09 PM
ok, just so I don't mess this up, what should I check on the check boxes and tic boxes etc.
I want to back up my vb database so I can put it on a new server so it keeps all of the information.
The current checks and tics were already selected by default I'm guessing, I haven't done anything yet...
http://img79.exs.cx/img79/2660/vb5mn.jpg
Jako
January 26th, 2005, 07:19 PM
Anyone :q:
Jako
January 26th, 2005, 08:12 PM
Not to be persistant, but I will be switching servers within a day or two because my old shared account is expiring. So I will need to know how to do this ASAP.
Jako
January 26th, 2005, 10:54 PM
:(
CyanBlue
January 26th, 2005, 11:54 PM
I don't use phpMyAdmin that often, but here is my guess... :D
Click on the 'Select All'... Check 'Complete Inserts' and 'Extended Inserts'...
and Check 'Save as File'... and click on the 'Go' button...
phpMyAdmin should prompt you to download the SQL file... Download it... You are done with the database backup...
Now FTP to your old site... and download ALL the files that goes with the forum...
FTP to your new site... and upload ALL the files and upload the SQL file as well...
Have phpMyAdmin import that SQL file to rebuild the database...
(Can't tell you how to do that because I have done that before... I always use shell command to do that...)
It's not really hard... Just try it and see if the forum works okay or not... and test it for a couple of days to make sure everything is working okay... and destroy the old site... That's all you need to do... ;)
GOOD LUCK!!! :D
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.