Before you begin a backup, perform the following steps:
If you set TAPEDEV to STDIO, ensure that there is enough memory for the backup data.
Do not store more than one backup on the same tape; begin every backup with a different tape. (Often, a backup spans more than one tape.)
To create a backup, use the -s option of the ontape command.
Creating a Backup: |--+-----+-- -s--+------------+--+-----------+--+-----+---------| '- -v-' '- -L--+-0-+-' '- -t STDIO-' '- -F-' +-1-+ '-2-'
The ontape utility backs up the storage spaces in the following order: root dbspaces, blobspaces, sbspaces, and dbspaces.
A backup can require multiple tapes. After a tape fills, ontape rewinds the tape, displays the tape number for labelling, and prompts the operator to mount the next tape when you need another one. Follow the prompts for labelling and mounting new tapes. A message informs you when the backup is complete.
When you back up to standard output, ontape does not prompt for user-interaction. Error and information messages are written to stderr instead of being directed to standard output.
The TAPESIZE configuration parameter is not used because the capacity of standard output is assumed to be unlimited. The TAPEBLK configuration parameter, however, is valid because it defines the size of the transport buffer between the backend server and the ontape client. You can optimize throughput by setting TAPEBLK to an appropriate value.
You can simultaneously back up and restore a database server to clone it or set up High-Availability Data Replication. For more information, se Simultaneous Backup and Restore Using Standard I/O.
Execute the following command to start a backup to tape without specifying a level:
ontape -s
You can use the -L option to specify the level of the backup as part of the command, as the following example shows:
ontape -s -L 0
When you do not specify the backup level on the command line, ontape prompts you to enter it. Figure 24 illustrates a simple ontape backup session.
ontape -s Please enter the level of archive to be performed (0, 1, or 2) 0 Please mount tape 1 on /dev/rst0 and press Return to continue ... 16:23:13 Checkpoint Completed: duration was 2 seconds 16:23:13 Level 0 Archive started on rootdbs 16:23:30 Archive on rootdbs Completed. 16:23:31 Checkpoint Completed: duration was 0 seconds Please label this tape as number 1 in the arc tape sequence. This tape contains the following logical logs: 3 Program over.
The following example shows how to create a level-0 archive of all storage spaces to standard output, which is diverted to a file named level_0_archive in the directory /home:
ontape -s -L 0 >/home/level_0_archive
The following example creates a level-1 archive to standard output, which is diverted to a pipe:
ontape -v -s -L 1|compress -c >/home/compressed/level_1_archive
The compress system utility reads from the pipe as input, compresses the data, and writes the data to the file level_1_archive in the /home/compressed directory. The ontape information messages are sent to stderr.
You can use ontape to back up a raw table, however, raw tables are not logged. Therefore, when you restore a raw table, any changes that occurred since the last backup cannot be restored. It is recommended that you use raw tables only for initial loading of data and subsequently alter raw tables to standard tables before performing transactions. For more information, see the IBM Informix: Dynamic Server Administrator's Guide.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]