mysqldump: command to backup a database on another remote server
August 12th, 2010 | by admin |
The mysqldump program is often used to getting a data dump of a local database for backup reasons or just for moving a database from one server to another. To make this even easier, mysqldump can accept a remote host as an arguement. This means that if you are logged into server A you can get a backup of server B immediatly without having to login to server B and then transfer the file manually vis FTP or SCP etc. Just use this command:
mysqldump -h000.00.000.000 -uYOURUSERNAME -pYOURPASSWORD DATABASE_NAME > backup.12.08.10.sql
- -h parameter is where you put the host, for example the IP address of the server that has the MySQL database living on it.
- -u parameter preceeds your MySQL username
- -p parameter preceeds your MySQL password
- > directs the output of the command to a specified file which will be created if it doesn’t exist
Home
HYGEN Web Design
