Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   The ontape Backup and Restore System (IDS) > Backing Up with ontape > Creating a Backup >

Performing a Backup

Before you begin a backup, perform the following steps:

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.

Read syntax diagramSkip visual syntax diagramCreating a Backup:
 
|--+-----+-- -s--+------------+--+-----------+--+-----+---------|
   '- -v-'       '- -L--+-0-+-'  '- -t STDIO-'  '- -F-'
                        +-1-+
                        '-2-'
 
Element Purpose Key Considerations

-F

Directs ontape to perform a fake backup.

A fake backup is only applicable during a backup to standard output.

A fake backup is useful for cloning the data in a server. For example, to populate the secondary server in an High-Availability Data Replication pair.

-L Directs ontape to create a backup of the level specified. If you are backing up to tape, use the -L option to specify the backup level as part of the command, you can avoid being prompted for it.

If you are backing up to standard output, and do not specify a backup level, ontape performs and level-0 backup.

-s Directs ontape to create a backup. If you are backing up to tape, ontape prompts you to supply the backup level (0, 1, or 2) that you want to create if you do not supply a value using the -L option.
-t STDIO Directs ontape to back up to standard output. The -t STDIO option overrides the value of the TAPEDEV configuration parameter for the current backup.

-v

Directs ontape to write informational message to stderr during a backup to standard output.

Verbose mode is useful for monitoring the progress of a backup to standard output.

The ontape utility backs up the storage spaces in the following order: root dbspaces, blobspaces, sbspaces, and dbspaces.

Backing Up to Tapes

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.

Backing Up to Standard Output

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.

Backup Examples

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.

Figure 24. Example of a Simple Backup Created with ontape
  

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.

Backing Up Raw Tables

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 ]