DB2 online backup

Source: Internet
Author: User
Tags db2 connect db2 connect to

DB2 online backup is one of the most commonly used functions.

1. run the following command to check the Unix/Linux parameters: db2 get db cfg for xcldb | grep "USEREXIT" db2 get db cfg for xcldb | grep "LOGRETAIN" db2 get db cfg for xcldb | grep "TRACKMOD" command for viewing in Windows: db2 get db cfg for xcldb | find/I "userexit" db2 get db cfg for xcldb | find/I "logretain" db2 get db cfg for xcldb | find/I "trackmod"

2. configure parameters to change the database to archive log mode. The default mode is cyclic log mode. Online backup is not supported. db2 update db cfg for xcldb using userexit on // Enable User exit db2 update db cfg for xcldb using logretain on // enable archiving log db2 update db cfg for xcldb using trackmod on // enable incremental Backup

3. The database changes to the Backup pending status. You need to back up db2 backup db xcldb to/db2bak offline.

4. Test the connection and check whether the connection is successful. db2 connect to xcldb db2 connect reset

5. manually archive the file to check whether the generated log file exists. 5.1 find the directory where the log file is located. It is the value corresponding to the Path to log files parameter. db2 get db cfg for xcldb 5.2 manual archiving db2 archive log for db xcldb 5.3 go to the log directory to check whether files generate ls-lrt

6. online (online) backup: supports the following methods: Back up databases only, excluding logs -- compress: compressing backup sets db2 backup db xcldb online to c: \ db2bak compress -- back up databases, and the backup contains the log db2 backup db xcldb online to c: \ db2bak include logs -- incremental backup db2 backup db xcldb online incremental to c: \ db2bak include logs -- Differential (Delta) backup db2 backup db xcldb online incremental delta to c: \ db2bak include logs

7. view the backup record db2 list history backup all for xcldb

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.