backup
SSH into your server if you are working remotely. Create an empty database
mysql -u username -p -e 'CREATE DATABASE database
Now use the following command from your ssh session
mysql -u username -p database < path/to/backup.sql
Backing-up your sql databases can be done effectively with the mysqldump facility. You will need to login as the MySQL server root administrator. The following command will backup ALL your databases.
mysqldump -u myusername -pmypassword -A > backup.sql
To dump a single database
mysqldump -u myusername -pmypassword databasename > backup.sql
Having been notified by go-daddy that all my vhost servers were going to need to be rebuilt ( what a major PAIN!), I decided the time had come to move to a dedicated server. Part of this process was to create a back-up archive of the important parts of the server. To archive all my web data I simply create a tar archive of my vhosts directory.
