vBulletin Modifications

restore database

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 07-10-2006, 06:48 AM   #1
vB Newbie
Join Date: Jun 2006
mohammed is on a distinguished road

Default restore database

hi all i have a problem i want to restore the database of my site please tell me how i have taken a backup and the size of the backup is 9.75 mb please help me plz try with pictures




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-10-2006, 11:15 AM   #2
vB User
MaxM's Avatar
Join Date: Jun 2006
MaxM is on a distinguished road

Default

Dude, i can't make ss right now...but i'll try to explain how to restore via phpmyadmin.. i think its the easiest way out there!!!

Now, from your hosting cpanel ..in 'MySql section' click 'Phpmyadmin'
There select vb database from dropdown menu on left side and then click export! Thats it download the file

and via restoring, make a new fresh my sql database and from 'phpmyadmin' click 'Sql' from top. From there locate the file (the one you downloaded!) and click restore... that it

For details read this-- (credits Lil Ripsta at bonethugsforums.com)
Quote:
Backing Up & Restoring a MySQL Database using phpMyAdmin / SSH
================================================== =====

This is just a short mini-tutorial explaining how to backup parts of the mySQL database using phpMyAdmin & also via SSH (Secure Shell) access. This tutorial should be of use to most people, as it's an important part of any website/forum maintenance!

So, let's get started...

Step 1 - Backing up using phpMyAdmin
=============================================

Note: Most good hosts provide phpMyAdmin (mySQL administration). If you do not know where it is or even if it exists on your server, just get in touch with your host!
Login to PHPMyAdmin.
Select the database you wish to use.
On the navigation bar on the top select "Export" (besides SQL, Structure, Search, Query... etc.)
You should now be presented with a nifty little page which shows all the tables in the database, SQL Options and Save types.*
To backup the whole database click "Select All" under the list of tables in the page.
To backup a selected few, just hold down CTRL on your keyboard and select the tables you wish to backup (release the key when all selecting is done!).
SQL Options can be left as default, but I suggest ticking the "Add DROP TABLE" option as if you are restoring a backup on a database that already exsists and has the table in it - you will get a lot of errors! This way, by ticking the "Add DROP TABLE" you will avoid the errors. For more information on the options just click the little "?" icon after SQL Options.
If you want to save the backup as a file (recommended) then tick "Save as file" - Leave file name as is or edit for your needs. Select "gzipped" as compression. Now click "Go". If asked, choose "Save to disk" and save it wherever on your computer (It may take sometime depending on the size)!
If you want to show the whole backup SQL on your browser window, don't tick "Save as file" - once you have selected the tables you wish to backup (explained in Step 5/6) click "Go". The page will now change and should show the SQL information. (It may take sometime depending on the size). Copy and paste it to a text file or do whatever you want with it!
*Note: Yes the tables of the database will be shown to the far left in a frame, but they will also be displayed in a different form on this new page to the right in phpMyAdmin.

Congratulations! You have successfully backed up your database / selected tables!

Step 2 - Restoring your database using phpMyAdmin
================================================== ==========

Note: Most good hosts provide phpMyAdmin (MySQL Administration). If you do not know where it is or even if it exists on your server, just get in touch with your host!
Login to phpMyAdmin.
Select the database you wish to use.
On the navigation bar on the top select "SQL" (besides Export, Structure, Search, Query... etc.)
You should now be presented with a little page which allows you to run SQL query/queries on the database - Either by inputting the query/queries to the input box or by locating a text file on your computer.
You now have 2 options: 1) Paste the SQL which you backed up earlier in the "Input Box" and click "Go" or 2) If you saved the file on your PC then use the option below the first one; Click Browse > Locate the File > Click "Go". (Note: Most servers set a "Max File Size" for uploading the SQL, the size appears beside the Browse button.)
It may take sometime for the file to be uploaded and fully run, so give it a chance! Once it worked, it will bring you back to the same page and should confirm if all went well "Your SQL-query has been executed successfully: The content of your file has been inserted."
Congratulations! If all went well, you have successfully restored your backed up database!

Step 3 - Backing up using SSH
===================================

Note: Some hosts do not offer SSH access, I suggest contacting your host and asking him/her if SSH access is enabled and if so the details. A good program to use for connecting via SSH is PuTTY (Get it at: http://www.chiark.greenend.org.uk/~s...download.html). Don't know how to use it? Search on google for a tutorial.
Connect to your host via SSH, login & run: mysqldump --opt -u user -p dbname > {path}/backup.sql
You will be asked to type out your password once you run that command, do so & click enter. It may take some time for it to respond, but once completed you should be brought back to where you started (bash/command line).
Congratulations! You successfully backed up your database using SSH.

Step 4 - Restoring using SSH
=================================

Note: Some hosts do not offer SSH access, I suggest contacting your host and asking him/her if SSH access is enabled and if so the details. A good program to use for connecting via SSH is PuTTY (Get it at: http://www.chiark.greenend.org.uk/~s...download.html). Don't know how to use it? Search on google for a tutorial.
Connect to your host via SSH, login & run: mysql -u user -p dbname < {path}/backup.sql
You will be asked to type out your password once you run that command, do so & click enter. It may take some time for it to respond, but once completed you should be brought back to where you started (bash/command line).
Congratulations! You have successfully restored your database using SSH.

That's basically it I think, I believe I have covered everything? Anything I missed? Comments or suggestions? Just let me know! Hope this tutorial was as useful to you as it is to me!

Thanks,
-Lil Ripsta
www.bonethugsforums.com




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-10-2006, 11:47 AM   #3
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

Default

another way to restore that db (suggestion):

1. backup anything that might be lost when you overwrite the db with your backup.

2. download bigdump script from http://www.ozerov.de/bigdump.php
(direct download link = http://www.ozerov.de/pphlogger/dlcou...de/bigdump.zip)

3. edit file bigdump.php @ lines 37-44
You must first be a registered member to view any code.
* fill in your DB info into first 3 vars (db name, db user, db pass) - you should know what to fill here (what you have set up on the server or got from your sys admin) - no one can help u with those details, if you don't know what they are then contact your hosting support.
* update the file name of your backup (.sql extension)
* save changes made to bigdump.php file

example for those lines:
You must first be a registered member to view any code.

4.upload both bigdump & your .sql file to your host, to root or any other folder (togther) - just make sure the folder has correct chmod premissions.

5. run the script (just write url into browser, like http://www.mydomain.com/bigdump.php or any other path you put it into) & follow instruction shown on page - all written in simple English (matter of clicking "next" button till it's all done).

Note: if you get error during restore about conflicting values, then go into phpmyadmin, and either empty or drop the tables conflicting, and then run script again.

6. now you should have your db restored, feel free to remove restore script & .sql file from server hosting.
__________________
Idan / vBHackers.com
vBSEO 3.1 GOLD Released vB Blogs Compatible | Non-Encrypted | Branding Removal Option | Sitemaps 2.1 | Language Packs

Crawlability Network: vBulletin SEO | vBulletin Hackers

Last edited by Idan; 07-10-2006 at 11:54 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-13-2006, 11:59 AM   #4
vB Newbie
Join Date: Jun 2006
mohammed is on a distinguished road

Default

thanks alot for helping me




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-24-2007, 01:23 AM   #5
vB Newbie
Join Date: Mar 2007
mudvayne is on a distinguished road

Default

Quote:
Originally Posted by Idan View Post
another way to restore that db (suggestion):

1. backup anything that might be lost when you overwrite the db with your backup.

2. download bigdump script from BigDump: The Staggered MySQL Dump Importer
(direct download link = http://www.ozerov.de/pphlogger/dlcou...de/bigdump.zip)

3. edit file bigdump.php @ lines 37-44
You must first be a registered member to view any code.
* fill in your DB info into first 3 vars (db name, db user, db pass) - you should know what to fill here (what you have set up on the server or got from your sys admin) - no one can help u with those details, if you don't know what they are then contact your hosting support.
* update the file name of your backup (.sql extension)
* save changes made to bigdump.php file

example for those lines:
You must first be a registered member to view any code.
4.upload both bigdump & your .sql file to your host, to root or any other folder (togther) - just make sure the folder has correct chmod premissions.

5. run the script (just write url into browser, like http://www.mydomain.com/bigdump.php or any other path you put it into) & follow instruction shown on page - all written in simple English (matter of clicking "next" button till it's all done).

Note: if you get error during restore about conflicting values, then go into phpmyadmin, and either empty or drop the tables conflicting, and then run script again.

6. now you should have your db restored, feel free to remove restore script & .sql file from server hosting.
You must first be a registered member to view any code.
please help




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-24-2007, 08:08 PM   #6
Got Beer ?
Join Date: Jan 2007
Location: Australia
ducksguts is on a distinguished road

Default

Quote:
Originally Posted by mudvayne View Post
please help
? you need to be a bit more specific, he was offering an alternative to restoring the database tho i think the phpmyadmin way is the simplest, what do you mean by "please help" ?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-24-2007, 08:56 PM   #7
vB Newbie
Join Date: Mar 2007
mudvayne is on a distinguished road

Default

please read above




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
database question world32 General vBulletin Support 7 07-02-2006 07:02 AM
ripping users out of database lasto General vBulletin Support 1 03-14-2006 08:52 AM
Database problem Key-Hack General vBulletin Support 4 01-08-2006 03:25 PM
Backup Database pilsentico General vBulletin Support 2 11-09-2005 03:47 PM
Database backup script cLord vBulletin Modification Requests 2 04-30-2004 05:53 PM


All times are GMT -3. The time now is 05:08 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)