Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

Latest Modifications

  • [vB 3.8.4] THX - Hack for VB. 3.8.4
    By: bluedog
  • [vB 3.8.4] Cyb - Chatbox V.2.3
    By: bluedog
  • [vB 4.0.x] PHPKD - Advanced Quick...
    By: PHPKD
  • [vB 3.6.x] StopSpam
    By: flappi282
  • [vB 3.8.x] vBulletin Chat Addon for...
    By: 123flashchat

Latest Template Mods

  • [vB 4.0.x] Remove My Profile Link...
    By: Ak Worm
  • [vB 3.8.x] Images DownloadBox...
    By: cRs!MP
  • [vB 3.8.x] Adviertise Mod On Forum...
    By: MG4
  • [vB 3.8.4] Images PassWordBox...
    By: cRs!MP
  • [vB 3.8.4] Footer Follow Ups
    By: Ak Worm

Latest Styles

  • [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
    By: Belon
  • [vB 4.0.x] [4.0.3] vbdesigns.de...
    By: Belon
  • [vB 3.8.4] CompletevB - Skylight
    By: DreadKnight
  • [vB 3.8.3] [vB 3.8.4] Barcelona...
    By: hoiquantinhoc.com
  • [vB 3.8.3] Natures Walk by vBSkin...
    By: Chri5

Latest Graphics

  • [vB ] [anim.]Team Ranks
    By: cRs!MP
  • [vB ] Abstract Circles (3...
    By: cRs!MP
  • [vB ] PlayStation Rank Images
    By: cRs!MP
  • [vB 3.6.12] Heavy Stroked Button...
    By: Shelley
  • [vB ] Minature Ranks.
    By: Shelley
vBulletin Modifications » General vBulletin Section » vBulletin Modification Tutorials » [HOW-TO] Backup/restore using phpMyAdmin/SSH
Reply
Page 1 of 3 1 23 >

 

  • Thread Tools
Old 07-19-2006, 05:13 PM   #1
Darkblade
Coder

Darkblade's Avatar

Activity Longevity
0/20 15/20
Today Posts
0/3 sssssss19
Location: Cleveland, OH
Age: 21
Darkblade is on a distinguished road
Send a message via AIM to Darkblade Send a message via MSN to Darkblade Send a message via Yahoo to Darkblade
Status: Offline [HOW-TO] Backup/restore using phpMyAdmin/SSH
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!
  1. Login to PHPMyAdmin.
  2. Select the database you wish to use.
  3. On the navigation bar on the top select "Export" (besides SQL, Structure, Search, Query... etc.)
  4. You should now be presented with a nifty little page which shows all the tables in the database, SQL Options and Save types.*
  5. To backup the whole database click "Select All" under the list of tables in the page.
  6. 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!).
  7. 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.
  8. 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)!
  9. 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!
  1. Login to phpMyAdmin.
  2. Select the database you wish to use.
  3. On the navigation bar on the top select "SQL" (besides Export, Structure, Search, Query... etc.)
  4. 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.
  5. 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.)
  6. 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/~sgtatha.../download.html). Don't know how to use it? Search on google for a tutorial.
  1. Connect to your host via SSH, login & run: mysqldump --opt -u user -p dbname > {path}/backup.sql
  2. 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/~sgtatha.../download.html). Don't know how to use it? Search on google for a tutorial.
  1. Connect to your host via SSH, login & run: mysql -u user -p dbname < {path}/backup.sql
  2. 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!

Sincerely,
-Darkblade
www.metalgearsolidforums.com
Metal Gear Solid Forums.com | Final Fantasy Forums.net

My Mods: Archive Thread v1.1 | My Tutorials: [HOW-TO] Backup/restore using phpMyAdmin/SSH

Last edited by Darkblade; 09-15-2006 at 06:49 PM.
Reply With Quote
Old 07-21-2006, 06:50 PM   #2
AC-MILAN
vB Newbie

Activity Longevity
0/20 13/20
Today Posts
0/3 ssssssss8
AC-MILAN is on a distinguished road
Status: Offline Default
Thanks m8 for this!!!
Reply With Quote
Old 07-21-2006, 09:11 PM   #3
HDRebel88
vB User

HDRebel88's Avatar

Activity Longevity
0/20 13/20
Today Posts
0/3 sssssss98
Location: New Jersey, U.S.A.
Age: 21
HDRebel88 is on a distinguished road
Status: Offline Default
Is it possible to use this to transfer a MySQL database to another server. I'm going to be changing hosts eventually, when I can afford to pay instead of free hosting, but if I export as say an Excel doc. and then Import on the other server there shouldn't be a problem right?
Reply With Quote
Old 07-22-2006, 12:32 AM   #4
Michael Biddle
Staff
Michael Biddle's Avatar

Activity Longevity
1/20 18/20
Today Posts
0/3 sssss2818
Location: Anaheim
Age: 22
Michael Biddle is on a distinguished road
Status: Offline Default
thank you for this
Support will only be offered through forums
Michael Biddle / vBHackers.com
vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for download now

vBSEO Google Sitemap Generator - Version 2.5 Released

Crawlability Network: vBulletin SEO | vBulletin Hackers
Reply With Quote
Old 07-23-2006, 12:51 PM   #5
Darkblade
Coder

Darkblade's Avatar

Activity Longevity
0/20 15/20
Today Posts
0/3 sssssss19
Location: Cleveland, OH
Age: 21
Darkblade is on a distinguished road
Send a message via AIM to Darkblade Send a message via MSN to Darkblade Send a message via Yahoo to Darkblade
Status: Offline Default
Quote:
Originally Posted by HDRebel88
Is it possible to use this to transfer a MySQL database to another server. I'm going to be changing hosts eventually, when I can afford to pay instead of free hosting, but if I export as say an Excel doc. and then Import on the other server there shouldn't be a problem right?
Yes that shoudn't be a problem and will work just fine while switching to a new host or server. If you are trying to move a huge database, then I recommend you to do it via SSH. Or if you're having a small forum with a few posts, then phpMyAdmin will do the job for you.
Reply With Quote
Old 08-21-2006, 05:13 PM   #6
daPLAYBOY
Coder

daPLAYBOY's Avatar

Activity Longevity
1/20 13/20
Today Posts
0/3 sssssss51
Location: United Kingdom & www.cellpda.tk
daPLAYBOY is on a distinguished road
Send a message via Yahoo to daPLAYBOY
Status: Offline Default
Many thanks, Darkblade!

If using phpMyAdmin full backup, and when it comes to restoring, will I get these 'Timed Out errors'..because I've read about such problems!

Kindly advise!

Cheers!
Reply With Quote
Old 08-21-2006, 05:16 PM   #7
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default
Use bigdump, (search for it on google,) It just imports the database but does it X many lines at a time to avoid template.
Reply With Quote
Old 08-21-2006, 05:40 PM   #8
daPLAYBOY
Coder

daPLAYBOY's Avatar

Activity Longevity
1/20 13/20
Today Posts
0/3 sssssss51
Location: United Kingdom & www.cellpda.tk
daPLAYBOY is on a distinguished road
Send a message via Yahoo to daPLAYBOY
Status: Offline Default
Hello Roger

Thx for the info!

So are you saying bigdump is far more reliable than phpMyAdmin?
Is it just as easy to use n restore?

Cheers!
Reply With Quote
Old 08-21-2006, 05:50 PM   #9
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default
pretty much. It also works better with vB Backups. Let me explain: vB backups back up the sql database to the server where as you have to download the phpmyadmin backup and then re upload it. So bigdump which can read it from the server is a lot more efficient if you use the vb backup utility.
Reply With Quote
Old 08-23-2006, 02:13 AM   #10
daPLAYBOY
Coder

daPLAYBOY's Avatar

Activity Longevity
1/20 13/20
Today Posts
0/3 sssssss51
Location: United Kingdom & www.cellpda.tk
daPLAYBOY is on a distinguished road
Send a message via Yahoo to daPLAYBOY
Status: Offline Default
I've just downloaded bigdump.php, and transfered it to forumroot...wht do I do next for a backup?

Br.
Reply With Quote

Reply
Page 1 of 3 1 23 >

« [How To] Run a Query | [How-To] Simple hack development stages »

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

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

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 Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
[How To] Create forum counters Niels vBulletin Modification Tutorials 50 Yesterday 09:51 PM
[How To] Run a Query Ken Iovino vBulletin Modification Tutorials 9 07-30-2008 05:29 AM
[How to] Set User Titles Rex vBulletin Modification Tutorials 24 11-20-2007 08:25 PM
[How to] Add navigation groups to your admincp left panel Ken Iovino vBulletin Modification Tutorials 11 07-16-2007 02:59 AM
[How to] submit a press release Rex Growing Your vB Forum 1 06-19-2006 06:36 PM



All times are GMT. The time now is 06:12 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!