0% found this document useful (0 votes)
121 views17 pages

Backup, Recovery and Update SIMRS Khanza

This document discusses database backup strategies and methods for MySQL databases. It provides information on: - Reasons to backup databases including hardware failures, user errors, and application issues. - Methods for backing up databases including using mysqldump utilities to backup entire databases, individual tables, or all tables. Making copies of the MySQL data directory is also discussed. - Best practices for backups such as performing them regularly but not during peak usage hours and storing backups both on the database server and another location.

Uploaded by

Ars Afriansyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views17 pages

Backup, Recovery and Update SIMRS Khanza

This document discusses database backup strategies and methods for MySQL databases. It provides information on: - Reasons to backup databases including hardware failures, user errors, and application issues. - Methods for backing up databases including using mysqldump utilities to backup entire databases, individual tables, or all tables. Making copies of the MySQL data directory is also discussed. - Best practices for backups such as performing them regularly but not during peak usage hours and storing backups both on the database server and another location.

Uploaded by

Ars Afriansyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Dhia Shahab, S.

Kom
RS Islam Bontang
Hardware Failure
System crash
Disk failure
User / Application Failure
Accidental DROP TABLE or malformed DELETE
FROM statements
Careless when importing data from text
Database content
Log files
Configuration files
On a regular basis
Not during high usage peaks (off hours)
On the database server
At least on a separate file system/volume or hard
disk Drive
Copied to another server
On or off site
Cloud storage
Backed up to tape/disk
Stored on or off site
Using the mysqldump Utility
Using Copies of the MySQL Data Directory
Backup All Databases
C:\xampp\mysql\bin>mysqldump -u root -p --all-databases
> backupalldata.sql
Backup Single Database
C:\xampp\mysql\bin>mysqldump -u root -p sik >
backupdata.sql
Backup Tables
C:\xampp\mysql\bin>mysqldump -u root -p sik
jns_perawatan > backuptable.sql
C:\xampp>mysql_stop.bat
C:\xampp\mysql>xcopy data databackup /y /e /h /k
C:\xampp>mysql_start.bat

/opt/lampp/ctlscript.sh stop mysql


/opt/lampp/bin/mysqldump -uroot -p sik | gzip >
/tmp/sik_`date +%Y%m%d`.sql.gz
/opt/lampp/ctlscript.sh start mysql
Restore All Databases
C:\xampp\mysql\bin>mysql -u root -p < backupalldata.sql
Restore Single Database
C:\xampp\mysql\bin>mysql -u root -p sik < backupdata.sql
Restore Table
C:\xampp\mysql\bin>mysql -u root -p sik < backuptable.sql
Adapted from W. Curtis Preston - Backup & Recovery (O'Reilly 2009)
New Features
SIMRS SEP Integration
New reports
etc
Bug Fixes
Database schema / content
SIMRS Client App
Webapps files
Database schema / content
SIMRS Client App
Webapps files
Compare Databases Schema Using
mysqldbcompare
Download from dev.mysql.com/downloads/utilities/
Review result file
Execute sql using HeidiSQL / phpmyadmin
Download HeidiSQL from www.heidisql.com
Phpmyadmin included in XAMPP
mysqldbcompare --server1=root@localhost
sik:sikreff --run-all-test --skip-data-check --
difftype=sql > dbchanges.txt

You might also like