Selection of three backup methods for INFORMIX-ONLINE database

Source: Internet
Author: User
Article title: the choice of three backup methods for INFORMIX-ONLINE database. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
INFORMIXONLINE databases are widely used because of their high performance, high reliability, and support for data integrity definition and check. After the database is used, the security and reliability of data backup become a common concern. Based on my years of study and experience, I will summarize and compare the three data backup methods commonly used in the INFORMIXONLINE database.
  
   I. use the ontape tool to back up data
1. functions of the ontape tool
The ontape tool provides the following functions: backing up and recovering ONLINE data, backing up and restoring logical logs, and changing the database log status. This section focuses on the data backup function.
  
2. execute the ontape data backup syntax
Ontape backup syntax:
Ontape s L backup level (0, 1, 2)
When ONLINE is in ONLINE or static mode, informix users or users with DBA permissions can back up data by executing the preceding command. Backup levels 0, 1, and 2 according to the backup plan. Level 0 backup backs up all the data in the entire database. Level 1 backup backs up only the data modified after level 0 backup, level 2 backup only backs up the data modified after Level 1 backup.
  
3. Notes
(1) before performing an ontape backup, set the TAPEDEV, TAPEBLK, and TAPESIZE parameters in the ONCONFIG file correctly.
(2) in order to shorten the data recovery time, priority should be given to level 0 and backup level 1 and Level 2 should be minimized. Data of important departments such as banks should be backed up at Level 0 every day.
(3) If you need to restore the data backed up by ontape to another server, the quantity and size of the disk space of the two server models, operating systems, ONCONFIG configuration files, and non-temporary dbspace must be consistent; otherwise, the data cannot be restored normally.
(4) ensure that sufficient logical log files are available. If the remaining logical log space is less than 50% of the size of a single logical log, INFORMIXONLINE rejects the backup operation. you must back up the used logical log before backing up data.
(5) Keep a copy of the ONCONFIG file. After Level 0 backup, the ONCONFIG file should be backed up, because the ONCONFIG file information needs to be read when the level 0 backup is restored. if the ONLINE configuration is modified, data recovery will fail, if this level 0 backup is restored, the current configuration must be restored.
(6) backup can be performed ONLINE or in static mode. the ONLINE operation mode cannot be changed during the backup process. Otherwise, the backup will be interrupted.
(7) do not run the backup command in the background (under UNIX &), because the backup is performed in interactive mode.
  
   2. use the dbexport command to back up data
1. dbexport command introduction
The dbexport command writes data to a file or backup media (such as a tape) in an ASCII format ). Dbexport files include database mode files and data files.
2. dbexport command syntax
Dbexport [X] [c] [q] [d] [ss] [{o | T
   B S [F ]}]
The preceding parameters indicate the following meanings:
<> The content in [] is required.
C indicates that if there is no error, all information is output.
Q does not display error messages, warnings, and generated SQL data definition statements on the standard output device.
D. only the blob descriptor is output, and no blob data is output.
The ss outputs server-specific information for creating databases and tables in the mode file, for example: the size of the initial extent and the attached extent, the locking method, and the dbspace where the table resides.
O specifies the disk directory of the data output file.
T specifies the backup media name of the data output file.
B specifies the size of the backup media block.
S specifies the maximum storage capacity of the backup media.
F is used to specify the mode file name stored on the backup media.
Database specifies the name of the backup database.
3. dbexport functions and issues needing attention during use
(1) the dbexport command must be an informix user or a user with DBA access permissions.
(2) data backed up using dbexport must be restored using the dbimport command.
(3) you can edit the mode file to change the database generated by dbimport, such as changing the database name or related table information.
(4) dbexport occupies the database in exclusive mode. during The backup, other users cannot query, modify, or insert the database.
(5) mode files do not retain the database log files. when you use the dbimport command to create a database, you must select a log method (ANSI, buffered, nobuffered) for the new database ).
(6) you can use the dbexport/dbimport command to convert the data under INFORMIXONLINE and INFORMIXSE, or convert the data between different versions of INFORMIXONLINE. This type of conversion has no special requirements on the database server structure and ONLINE configuration.
(7) using the dbexport/dbimport command to back up/restore data can eliminate space fragments allocated to data and improve the overall operational efficiency of the database.
  
   3. use the onunload command to back up data
1. onunload command introduction
The onunload command, in the unit of pages, uses binary form to unload data, which is more efficient than dbexport.
2. onunload command syntax
Onunload [l] [t ] [B ]
[S ] [: [Owner>.]


















]The preceding parameters indicate the following meanings:<> The content in [] is required.L indicates that onunload reads the tape device, block size, and backup device capacity values from the configuration parameters TAPEDEV, TAPEBLK, and TAPESIZE respectively.T specifies the name of the backup device.B specifies the block size of the backup device.S specifies the storage capacity of the backup device.Database specifies the database to be backed up.Owner specifies the owner of the table.Table specifies the table to be detached.  3. notes for using onunload(1) the onunload backup data must be restored using the onload command.(2) onunload/onload cannot transfer data between different versions of ONLINE.(3) onunload/onload is the binary data stored in units of disk page size. the computer that unload and receives data must have the same disk page size.(4) only the data unloaded by onunload can be loaded into the ONLINE-managed database or table.(5) You must have the DBA access permission to execute the onunload command.(6) onunload does not retain the access privileges defined in the initial table.(7) onunload does not retain the initial table  

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.