How to correctly master the backup of online

Source: Internet
Author: User
Tags informix

1. Using the Ontape command

Online Dynamic Server 7.1 provides a database administrator with an online incremental backup tool that enables database administrators to use Ontape for data backup and logical log backups. also provides a onarchive with interactive interface and menu-driven database Backup tool. OnLine Dynamic Server 7.1 provides an incremental backup of the data, which is divided into three levels, 0 levels (level 0), 1 levels (Level 1), and 2 levels (Level 2).

Level 0: Back up the entire database system

Level 1: Back up data that has changed since the level 0 backup

Level 2: Back up data that has changed since the Level 1 backup

For example, yesterday and today all do level 2 backup, then today's backup must contain the data backed up yesterday. At the same time, the database administrator retains a maximum of three data backup disks, that is, a level 0 backup band, a 1-level backup band, and a 2-level backup belt. A complete system backup should also include a logical log backup band.

Database backup content and purpose:

A Data backup: Back up the data state at some point in the database and use it to restore the system when it is out of the system.

b Logical log Backup: After the logical log file is full, it must be backed up before it can be emptied, continue to use, and cause the system to crash if all the logical log files are full. In addition, the logical log records changes to the database after the last data backup, so the logical log is also used to recover the system when there is an unexpected system.

1.1 Data backup

Online Dynamic Server 7.1 's command-line data backup method using the Ontape command, the parameter option for the data backup is-s,$ ontape-s–l number

At this point the database server will prompt you to do what level of data backup, you only need to enter number:0, 1 or 2 on the keyboard, you can return.

1.2 Logical log file backups

A Scheduled backup logical Log

Periodically make logical log file backups, the system backs up the fully-written logical log files to tape, and then empty and release the files. Do scheduled backups must be done before all the logical log files are full, so if you are using a scheduled backup, observe the usage of the logical log. Sparked, if you often have long things happen, you should avoid the use of scheduled backups, using continuous backup is more secure.

Command format: ontape-a

B Continuous Backup logical Log

A continuous backup is filled with a logical log file, one is backed up, and then the log file is freed, so to do a continuous backup, you must ensure that there is a tape in the tape drive. A continuous backup takes up one screen or terminal display information. When the tape is full, the system prompts for the replacement of the tape.

Command format: ontape–c

Note: Informix recommends using continuous backup, but continuous backup will always occupy the tape drive, if the system has two tape drives, can be used as physical log backup and logical log backup, if the system has only one tape drive, and data backup conflict, the need to replace the tape in a timely manner.

1.3 Recovering data backups

Online Dynamic Server 7.1 Data recovery can be done in the offline state or in the online state. When there is an error in the system, or if you want to restore the system to a point in time, you must use the data backup belt and logical log backup to restore the system. The data backup restores the system to the Point-in-time data state of the data backup, and the logical log backup restores the system to the data state after the data backup point.

Command format: ontape–r

The logical log after the most recent 0, 1, 2-level data backup and data backup can be recovered, depending on the system prompts.

1.4 Data backup Plan

With a good backup and recovery tool, it is important for database administrators to use this tool well. The key to maintaining the latest time backups with a minimum amount of tape and the shortest backup time is the planning of data backups.

For example, such a data backup planning, the first day of the month for 0-level data backup, the first day of the week to make a 1-level data backup, a daily level of 2 data backup, when a day to do multiple data backup, only to do a lower level of data backup.

1.5 Attention issues

(1) Make the correct settings for the Tapedev, TAPEBLK, tapesize parameters in the Onconfig file before performing the Ontape backup.

(2) in order to shorten the data recovery time, should be carried out at level 0 to minimize the level 1 and 2 backup. Data on important departments such as banks should be backed up at level 0 a day.

(3) If you need to restore the Ontape backup data to another server, the number and size of the two server models, operating systems, onconfig profiles, and unallocated dbspace disk space must be the same, otherwise the data will not recover properly.

(4) You must ensure that there are enough logical log files available. If the remaining logical log space is less than the 50%,informix-online of a single logical log, the backup operation is rejected. Before you can make a data backup, you must back up the logical logs that you have used.

(5) Keep a copy of the Onconfig file. After a level 0 backup, you should back up the Onconfig file, because you need to read Onconfig file information when you restore level 0 backup, if the online configuration is modified, data recovery will fail, and if you restore this level 0 backup, you must restore the configuration at that time.

(6) Backup can be online or static mode, in the backup process cannot change the way online, otherwise the backup will be interrupted.

(7) Do not use the background to perform backup commands (&& under Unix) because backups are performed interactively.

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.