• Increase font size
  • Default font size
  • Decrease font size
Home Tips Tips and Tricks Backup & Restore Big Joomla Databases Using Telnet

Backup & Restore Big Joomla Databases Using Telnet

Here is a simple way to backup your joomla website databases using Telnet/SSH. Why using telnet? You can backup large  joomladatabases using telnet which is not possible from Phpmyadmin interface where memory is an issue.

BACKING UP MYSQL DATABASE USING TELNET

STEP 1:

FTP into your web site where you want to backup the database. Create a folder named ‘backup’ (or any name you want) in your public_html directory. Chmod it to 777. (Note: If your server API is CGI, you will get ‘Internal server error’ with 777. So if this is your case, chmod it back to 755.)

STEP 2:

Telnet into your web site using Putty.

STEP 3:

At the command prompt type the backup query like this - (single line)

mysqldump -u mysite_User -ptest123 mysite_database
> /home/path/to/backup_folder_name/backup.sql

Press ENTER.

* Website - mywebsite.com
* Database name - user_database
* Database Username - user_User
* Password - test123

If everything is OK, you will go to the command prompt again. Check your ‘backup’ folder. You will see backup.sql file.

Note: There is no space between -p and your password.

Tip: Copy the above command on a notepad and modify it with your details. Then copy and paste at command prompt.

STEP 4:

Download it to your computer in ASCII mode of your ftp software. (Not in AUTO mode.)


RESTORING YOUR DATABASE

You need to restore the data into the database if you lost your data or if your database is corrupted.

STEP 1:

Create a folder ‘restore’ (or whatever you like) on your site. Upload the ‘backup.sql’ that is saved on your computer to this folder in ASCII mode.

STEP 2:

Login into your web host panel and go to Phpmyadmin. Select the database into which you want the data restored to. Delete ALL Tables. Remember, you need to restore data into the SAME database. So your database should be empty with no tables and no data.

STEP 3:

Now telnet into your web site as you did during database backup process above.

Run this command at command prompt - (single line)

mysql -u mysite_User -ptest123 mysite_database
< /home/path/to/restore_folder_name/backup.sql

Press ENTER.

* Website - mysite.com
* Database name - mysite_database
* Database Username - mysite_User
* Password - test123

If everything is OK, you will go to the command prompt again. Check your phpmyadmin interface. All data will be restored into the database again.

Note: There is no space between -p and your password.

Tip: Copy the above command on a notepad and modify it with your details. Then copy and paste at command prompt..

Do a test practice on a test database first. Create a test database and import some data and try following above instructions

 

Add comment


Security code
Refresh

Subscribe Rss & Follow on Twitter

rss subscribe email subscribe twitter follow

Latest Resources

RS-Flashion: Flash Slideshow Joomla Module
RS-Flashion: Flash Slideshow Joomla Module
RSFlashion is a flash slideshow module works natively in Joomla 1.5.x environment. This is a ...

RS-Catchy: jQuery Slideshow Joomla Module
RS-Catchy: jQuery Slideshow Joomla Module
RSCatchy is a jQuery based image slideshow module for Joomla 1.5. It rotates and displays an ...

EMI SlideNews: SlideDeck Content Slider for Joomla
EMI SlideNews: SlideDeck Content Slider for Joomla
EMI SlideNews is a powerful content slider module with SlideDeck for Joomla 1.5 is free to use. ...

Hello Sky Free Joomla Template
Hello Sky Free Joomla Template
Hello Sky is a Stylish template for Joomla! 1.5 from 99theme was taken to the claims of the W3C ...

New Blog Free Joomla Template
New Blog Free Joomla Template
New Blog is a Stylish template for Joomla! 1.5 from 99theme was taken to the claims of the W3C ...

like Mac Free Joomla Template
like Mac Free Joomla Template
Stylish Apple MAc design for business and private for Joomla! 1.5 from 99theme is another successful ...

Managing News: Free News Aggregation Engine
Managing News: Free News Aggregation Engine
Managing News is a robust news and data aggregation engine with pluggable visualization and workflow ...

Zerox Dark WordPress Theme
Zerox Dark WordPress Theme
Zerox Dark WordPress Theme with Magazine Style auto thumbnail post and have Seo Optimize. ...