How do I backup a database via SSH? Print

  • 3

First, you'll need to log into your account via a secure shell client like Putty or SecureCRT. Once there, you'll need to enter the following command: /usr/bin/mysqldump $databasename -u $user -p$password > /path/to/file.sql You'll need to substitute the correct information for the $variables in the line above. For instance, let's say that your account username is 'jack' and you are looking to back up a database called 'jack_phpbb', which is accessed by the user jack_forums and a password of blahblah. This is what the line would look like: /usr/bin/mysqldump jack_phpbb -u jack_forums -pblahblah > /home/jack/file.dump If you don't know the database username or password, you'll need to check the Mysql screen in Cpanel to get that information. Please note that there is purposely no space between the -p and the password when you enter this line. That is the way the line is supposed to be entered.

Was this answer helpful?

« Back

Powered by WHMCompleteSolution