If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-23-08, 02:52
manikandank_1984 manikandank_1984 is offline
Registered User
 
Join Date: Oct 2008
Posts: 65
backup

Hi All,

I am working in db2.can you give me the command for online and off line backup in db2.Andalso what is the command for restore the database command.Please give me the example is easy to understand.

Regards,
K.Manikandan
Reply With Quote
  #2 (permalink)  
Old 10-23-08, 03:21
aflorin27 aflorin27 is offline
Registered User
 
Join Date: Apr 2008
Location: Iasi, Romania
Posts: 317
I think that IBM documentation is always a good start:
http://publib.boulder.ibm.com/infoce...c/c0005945.htm
Reply With Quote
  #3 (permalink)  
Old 10-23-08, 03:24
manikandank_1984 manikandank_1984 is offline
Registered User
 
Join Date: Oct 2008
Posts: 65
backup

please,send me the commands
Reply With Quote
  #4 (permalink)  
Old 10-23-08, 03:34
aflorin27 aflorin27 is offline
Registered User
 
Join Date: Apr 2008
Location: Iasi, Romania
Posts: 317
Reply With Quote
  #5 (permalink)  
Old 10-23-08, 06:29
madhu_kaza madhu_kaza is offline
Registered User
 
Join Date: Apr 2008
Posts: 39
For either backup or restore, offline is the default option

BACKUP: basic command is as follows
----------
backup database <database name> to <target dir> (offline backup)
For Online backup:
backup database <database name> online <target dir>
Note: For enabling online backups, archival logging must be enabled. i.e do
update dbm cfg using logarchmeth1 TSM

RESTORE: basic command
-----------
RESTORE database <database name> FROM <source_dir>

source_dir: Is the directory where your backup image is located. If there are more than one backup images in this source directory, use timestamp of when the backup is taken as follows

RESTORE database <database name> FROM <source_dir> taken at <timestamp>

Online RESTORE command is as follows:
RESTORE database <database name> online FROM <source_dir> taken at <timestamp>


Thanks,
Madhavi
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On