RASPBERRY PI : Backup dan Restore Table mysql

14 Oct

=================================================================================
RASPBERRY PI : Backup dan Restore Table mysql
=================================================================================
A1. backup database
pi@raspberrypi ~ $ mysqldump -u root -p akses_masuk > backup_db_akses_masuk.sql
Enter password:

A2. backup table
pi@raspberrypi ~ $ pi@raspberrypi ~ $ mysqldump -u root -p akses_masuk user  > table_user2.sql
Enter password:

pi@raspberrypi ~ $ mysqldump -u root -p akses_masuk user_log  > table_user_log2.sql
Enter password:

B. RESTORE
pi@raspberrypi ~ $ mysql -u root -p
Enter password: xxxxxxxx
mysql> CREATE DATABASE akses_masuk;
mysql> exit
pi@raspberrypi ~ $ mysql -u root -p akses_masuk < table_user.sql
Enter password:
pi@raspberrypi ~ $ mysql -u root -p akses_masuk < table_user_log.sql
Enter password:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: