backup database mysql
Mengecek dulu isi database yang sudah terdaftar
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 782 to server version: 5.0.22
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> show database;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| postfix |
| test |
+——————–+
4 rows in set (0.00 sec)
mysql>
mysql> exit
Bye
Selanjutnya keluar dari mysql dan lakukan command dibawah ini untuk melakukan backup database
#mysqldump -u root -p postfix > /home/backupdb-27082015/db-27082015.sql
Enter password:
#
selesai sudah, maka db-27082015.sql disimpan dalam folder /home/backupdb-27082015/