View Full Version : msyql files from backup drive: how to get them into a sql file to restore?
redbox
Tue 6th Jan '04, 9:24pm
I need to get my forum database from a backup drive. When I go into the drive, all I see are the folders which contain the actual database files.
I need to get this from the backup drive to the main drive and then to a new server altogether. I am familiar with moving forums from server to server, but I don't have a clue how to get those files from the backup drive into a single sql file.
Can anyone advise me?
Steve Machol
Tue 6th Jan '04, 10:07pm
http://www.vbulletin.com/manual/movingservers.html
redbox
Tue 6th Jan '04, 10:59pm
Thanks. I've done that too many times, lol.
My problem is that the files are somewhere that I cannot use the mysqldump command so I can't send the files into a single sql file, unless there is a trick I don't know about. That's what I'm hoping someone can tell me.
It's not actually a backup drive. Our server crashed last night and we are on a new drive. My last downloaded backups are not very fresh, and we had just done a massive upgrade which we want to preserve. The dead drive has been mounted like a backup drive and I can go into the old drive lost+found folder to get the mysql files. What I have access to are the individual files, such as the MYD, MYI, etc. What I'm trying to do is figure out how to get them into a sql file so I can take it to a new server and restore.
Steve Machol
Wed 7th Jan '04, 12:38am
To get these into an .sql file you will need to use mysqldump. What happens when you use mysqldump? Is MySQL running on that server? Are you using the correct db user name, password and dbname?
redbox
Wed 7th Jan '04, 2:09am
mysqldump won't allow me to select a database from the old drive, it's not recognizing it.
Unfortunately, I found that the forum database files are incomplete so it won't matter anyway. When Linux created the copy in lost+found, it was able to copy all the small databases intact. But my vB forum was 1.5gb and it didn't do it, it left out all the big tables such as the posts and members. All of my recent backups were fried and I'll have to rely on an older backup I had downloaded to my pc.
Thanks for your time :)
rake
Wed 7th Jan '04, 7:09pm
if you have root access, just tar + gzip all the files together, transfer them to the new server, untar them there, and move them to the mysql data folder. Usually /var/lib/mysql.
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.