Difference between revisions of "Backup isi database MySQL"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 2: | Line 2: | ||
/usr/bin/mysqldump -u usernamemysql -ppasswordmysql namadb -c | /usr/bin/mysqldump -u usernamemysql -ppasswordmysql namadb -c | ||
+ | /usr/bin/mysqldump -u usernamemysql -ppasswordmysql namadb -c > isidatabase.sql | ||
jika kita menginginkan agar file yang di hasilkan langsung di gz, kita dapat menggunakan perintah | jika kita menginginkan agar file yang di hasilkan langsung di gz, kita dapat menggunakan perintah |
Revision as of 05:16, 28 May 2020
/usr/bin/mysqldump -u usernamemysql -ppasswordmysql namadb -c /usr/bin/mysqldump -u usernamemysql -ppasswordmysql namadb -c > isidatabase.sql
jika kita menginginkan agar file yang di hasilkan langsung di gz, kita dapat menggunakan perintah
/usr/bin/mysqldump -u usernamemysql -ppasswordmysql namadb -c | /bin/gzip -9 > isidatabse.sql.gz
Database akan tersimpan di file
isidatabase.sql.gz
Restore Database
gunzip isidatabase.sql.gz mysql -u usernamemysql -ppasswordmysql namedb < isidatabase.sql
Referensi
- http://subair.wordpress.com/2010/03/28/coba-coba-materi-backup-database-mysql-di-ubuntu-server-manual-dan-otomatis/
- http://ngadimin.org/2009/03/24/backup-mysql-di-ubuntu-atau-di-debian/
- http://machine-cycle.blogspot.com/2008/04/backup-mysql-databases.html