Reply to comment

How to Backup MySQL on a Website

Usually, a web host will give you FTP access to a directory and a web interface. A button in the web interface will produce a .ZIP file with the database contents, and you can download it via FTP.

If you have shell access, and you run a Unix at home, and develop your own website, you can use this script. It dumps the remote database, and then loads it into a local copy of your database.

#! /bin/bash

echo
echo Dumping db to db.mysql.
echo Type your password.
ssh launion@webhost.net mysqldump -u uname '-p--remotepw---' database_name  > db.mysql
echo Loading
mysql -u root '-p----password----' database_name < db.mysql

It's really just two lines of typing, but having it scripted is nice.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul> <p> <br> <div> <pre> <code> <img><h1><h2><h3><h4> <blockquote>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

.