Cara Backup dan Restore DB2 – OS yang sama

Berikut ini adalah cara Backup dan Restore database DB2 dengan OS yang sama.

Backup :

1.db2 deactivate database <nama_db>
2.db2 force applications all
3.db2 backup database btn to <lokasi backup>  ex: d:\btn\backup, /home/db2inst1/backupdb/
Restore :

1. copy image backup file (ex:BTN.0.DB2.NODE0000.CATN0000.20120224085107.001) ke suatu folder [ex: c:\backup, /home/db2inst1/backupdb/]

2.db2 deactivate database <nama_db>
3.db2 force applications all
4. db2 restore database [nama_database] from [folder_file_backup] on [folder_db2_data]
into [nama_database] redirect without prompting

[nama_database] => nama database, ex: btn
[folder_file_backup] => folder di step 2, ex: c:\backup
[folder_db2_data] => folder letak data2 table db2 disimpan, secara default C:\
jika terdapat c:\DB2\NODE0000, maka isi C:\
atau(di linux)

db2 force applications all
db2 restore db btn_wb from /home/db2inst1/backupdb/ into btn_wb redirect
5. db2 restore database btn_wb continue


About rile

java programmer android programmer laravel user jhipster user

Posted on September 20, 2012, in DB2. Bookmark the permalink. Leave a comment.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: