SSH Commands

wooden

For the basics in linux shell

SSH Commands Guide List | Suggest A Guide
HostGeekz Hosting Guides | cPanel | Cheap Domains | Web Hosting Talk

Backing up Database (Incomplete)

There are two easy ways:

  • use mysqldump
  • copy the data files from the mysql data directory

Mysqldump:

Using similar parameters for repairing a database:

mysqldump

Add -B for the database
Add -u to login as a user and -p if a password is required
If you want to backup all databases, use -A instead of -B (A meaning all).

Running this command will "dump" the SQL from the database. We want to harvest this and put it in a file. As described earlier in symbols we can use the > symbol to store it in a file:

/pathtomysql/bin/mysqldump -B mytestdatabase -u myusernamehere -p > mytestdatabase_backup.sql

After running that it will ask for the password, when correct it will back up everything into the sql file. The sql file will stored at whatever the

MYSQL data files:

xx


© Copyright, Simplec Services - Australia, 2017

Visit HostGeekz.com For More!
Cheap .Com Domains from $8.50