Backup Informix-Online Database Three Method (Reposted)

xiaoxiao2021-03-06  91

1. Use the ONTAPE tool to make data backup 1. The function of the onTape tool has the following features: backup and restore online data, backup, and recovery logical logs, changing database log status, etc. (this article focuses on data backup function). 2. Syntax backup syntax for the ONTAPE backup data is: ontape -s -l backup level (0, 1, 2) When online or still mode, the INFORMIX user or user with DBA privilege can be executed by executing the above command. Back up. Take 0, level 1, and 2 backup according to the backup scheme. The 0-level backup is a complete backup of all the data of the entire database; 1-level backup is only backed up for data modified after the 0-level backup; the 2-level backup is just a backup of data modified after Level 1 backup. 3. Using the ONTAPE tool for data backup Need notice issues 1) Before performing the TapeDev, Tapeblk, TapeSize parameters in the onconfig file before performing the ONTAPE backup. 2) In order to shorten the data recovery time, it should be 0-stage as the main, try to reduce 1 and 2 backups. For important department data such as banks, a 0-level backup should be performed. 3) If you need to restore the data backup of the ONTAPE backup to another server, the number and size of the DBSpace disk space allocated by the operating system, the onconfig configuration file and the non-closing, otherwise the data cannot be restored normally. . 4) Must ensure enough logical log files available. If the remaining logical log space is less than 50% of a single logical log, INFORMIX-ONLINE will refuse to perform backup operations. You must back up the used logical logs before you can perform data backup. 5) Keep the onconfig file copy. After the 0-level backup, the ONCONFIG file should be backed up because the onconfig file information is required when restoring the 0-level backup. If the Online configuration is modified, the data recovery will fail, if this level 0 backup must be restored, the configuration must be restored. 6) Backup can be performed in an Online online or still mode, and the ONLINE operation cannot be changed during the backup process, otherwise the backup will be interrupted. 7) Do not use the background manner to perform the backup command (under UNIX), because the backup uses interactive mode. 2. Data backup using the dbExport command 1.DBEXPORT Command Introduction The dbExport command writes the data to a file or backup media in the ASCII code format (such as tape). DBEXPORT The file includes database mode files and data files. 2. DBEXPORT command syntax DBEXPORT [-X] [-c] [-q] [-d] [-ss] [{-t -b-t [-f]}] The meaning of the parameters in the above command is as follows : <> The content included in <> is the option, and the content in [] is optional. -c: Indicates that all information is output if there is no error. -q: Do not display error messages, warnings, and generated SQL data definition statements on standard output devices. -d: Only the BLOB descriptor is output, and BLOB data is not output. -ss: Output information specific to the server-specific information specific to the table, such as: the initial extent and additional extent size, locked mode, table residing DBSpace and other information. -o: Specify the disk directory of the data output file. -t: Specifies the backup media name of the data output file. -b: Specify the backup dielectric block size. -s: Specify the maximum storage amount of the backup medium. -f: Used to specify the mode file name stored on the backup medium. Database: Specifies the database name of the backup.

Using DBEXPORT functions and requires issues 1) Execute the dbExport command must be an Informix user or a user with DBA access; 2) Data that is backed up with DBEXPORT must be restored with dbImport command; 3) Users can change Dbimport generation by editing mode files Database, such as changing database names or related table information; 4) DBEXPORT Takes up a database with exclusive mode, other users cannot query and modify the database during the backup; 5) Mode files do not retain database logs Document, users must select a log mode (ANSI, BUFFERED, NobuffRed type) when using the dbimport command; 6) The user can use the dbExport / dbimport command to mutual data in Informix-Online and Informix-SE Conversion; you can also convert data between INFORMIX-ONLINE, this conversion does not have special requirements for the structure of the database server and the ONLINE; 7) Use the dbExport / dbimport command to back up / recover data, can be eliminated The role of allocation spatial shredding, improve the overall operational efficiency of the database. 3. Use the onunload command to make a data backup 1.onloyad command Introduction The onunload command is units, using binary form to remove data, and backup efficiency is higher than DBEXPORT. 2. The meaning of the syntax onunload [-l] [-t] [-b] [-l] [-t] [-b] [-l] [-t] [-b] [-l] [-t] [-b] [-l] [-t] [-b] [-l] [-t] [o] [o] The content is optional -l: Indicates ONUNLOAD to read from configuration parameters TapeDev, TapeBLK, and TapeSize. -T: Specify backup device name -B: Specify the block size of the backup device-S : Specify the storage capacity of the backup device Database: Specify the database Owner to back up: Specify the list of the list: Specify the table to be removed Use Problem to pay attention to INUNLOAD 1) ONUNLOAD backup The data must be restored with the online command; 2) ONUNLOAD / ONLOAD does not implement data transfer between different versions of online; Can load the ONUNLOAD data to the database or table; 5) The user must have DBA access, in order to execute the onunload command; 6) ONUNLOAD does not retain the access privileges defined on the initial table; 7) ONUNLOAD does not retain the initial table Synonyms defined. The above three data backup methods have the same characteristics, the ONTAPE backup is high before and after the online parameter configuration, but the data backup and recovery operation is simple, the backup and recovery speed is faster; ONUNLOAD backups are backed by the two-way form. Higher, as long as the computer disk page is consistent, the computer disk page is consistent; different versions, data conversion between different INFORMIX products can be implemented, and the data transfer is flexible and convenient. To ensure that data is securely recover, data backup should at least two ways.

转载请注明原文地址:https://www.9cbs.com/read-122825.html

New Post(0)