Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Overview of the ON-Bar Backup and Restore System > Performing an External Backup and Restore > Preparing for an External Backup >

Blocking and Unblocking Extended Parallel Server

This section shows the syntax of the block and unblock commands on Extended Parallel Server.

Blocking Coservers or the Database Server

Use the onutil EBR BLOCK command to block the database server or coservers. The EBR, BLOCK, and SESSION keywords can be uppercase or lowercase. Before you begin an external backup, block the database server or coserver. You can leave the coservers blocked for as long as you decide.

Read syntax diagramSkip visual syntax diagram              .-,-----------.
              V             |
>>-EBR BLOCK----+---------+-+--+-----------------------+-------><
                '-cogroup-'    '-SESSION--session_name-'
 

Element Purpose Key Considerations
BLOCK Forces a checkpoint that flushes the buffers to disk and blocks the database server or specified coservers from any transactions While a coserver or database server is blocked, users can access it in read-only mode.
cogroup Specifies the set of coservers to block

You can block one or more listed coservers or cogroups, or cogroup_all. If you specify coserver names, use the format: dbservername.coserverid. If you specify a cogroup range identifier, use the format: dbservername.%r(first.last).

If no cogroup or coserver name is specified, all coservers on the database server are blocked.
EBR Specifies an external backup or restore command None.
SESSION session_name Assigns a session name to the onutil EBR BLOCK command

Use the session name to monitor the external backup status.

If no session name is specified, onutil generates a session name of the following format: ebr_connection-coserver-id.client-sql-session-id.ebr-command-number.

When a coserver is blocked, all the data on disk is synchronized and users can access that coserver in read-only mode. When you block a coserver, the entire coserver is blocked. You can block a list of coservers, cogroups, or the entire database server. You can assign a session name to the blocking operation.

To block the entire database server (all the coservers in cogroup_all), use either of the following commands:

onutil ebr block;

or

onutil ebr block cogroup_all;

When the block command completes, the default session ID is printed to standard output and a message is written to online.log.

After you complete the external backup, unblock the database server. For the syntax diagram, see Unblocking Coservers or the Database Server.

Blocking a Cogroup and Specifying a Session Name

Specifying a session name is useful for monitoring external backup sessions. To block the coservers defined in cogroup data_cogroup and to name the Backup Scheduler for that cogroup as block_data_cogroup, use the following command:

onutil ebr block data_cogroup session block_data_cogroup;

For information on how to create cogroups, see the onutil section of the IBM Informix: Administrator's Reference. For information on how to monitor this session, see Monitoring an External Backup.

Blocking Coservers

To block specific coservers, either specify them by name or use the cogroup range identifier with the onutil command. For example, xps.%r(1.4) expands to coservers xps.1, xps.2, xps.3, and xps.4. The following example blocks coservers xps.1 and xps.2.

onutil ebr block xps.1, xps.2;

For information on how to specify coserver names and cogroup range identifiers, see the onutil section of the IBM Informix: Administrator's Reference.

Unblocking Coservers or the Database Server

After you complete the external backup, use the onutil EBR UNBLOCK command to unblock and allow write access for data transactions. The EBR, UNBLOCK, SESSION, ABORT, and COMMIT keywords can be uppercase or lowercase.

Read syntax diagramSkip visual syntax diagram>>-EBR UNBLOCK--+-----------------------+--+-ABORT--+----------->
                +-SESSION--session_name-+  '-COMMIT-'
                | .-,-------.           |
                | V         |           |
                '---cogroup-+-----------'
 
   .-,--------------.
   V                |
>----+------------+-+------------------------------------------><
     '-space_list-'
 
Element Purpose Key Considerations
ABORT Unblocks the specified coservers but does not mark the dbspaces as backed up Use the ABORT option when the external backup failed or when you do not want to update the backup status. The dbspaces are not restorable.
cogroup Specifies a list of one or more cogroup names to unblock the coservers

You can specify cogroup_all, cogroup names, coserver names, or a cogroup range identifier.

All coservers in the specified cogroups that are currently blocked are unblocked. If you do not specify a cogroup name, all the coservers in the database server are unblocked. If a specific coserver is not blocked, an error is reported.
COMMIT Marks the listed dbspaces or dbslices as successfully backed up while the set of coservers were blocked

Enables newly added logical logs and dbspace mirrors. If no logged updates have occurred since the last backup, marks the dbspace for skipping log replay. To verify, issue onstat -d.

If you do not specify any dbspaces or dbslices after the COMMIT keyword, it commits the dbspaces and dbslices on the coservers that were blocked.
EBR Specifies an external backup or restore None.
SESSION session_name Specifies a session name that can be either a name that you specified or onutil automatically created in the block command The session name must be one that was used in a previous block command. All coservers that were part of that session are now unblocked.
space_list Specifies the dbspaces or dbslices that are successfully backed up Separate the dbspace or dbslice names with commas.
UNBLOCK Unblocks the coservers or database server, allowing data transactions and normal database server operations to resume Ends the external backup.

To unblock a list of coservers or cogroups, or the entire database server, you can specify a session name. The list of coservers in the onutil EBR UNBLOCK command does not have to match the list of coservers in the onutil EBR BLOCK command.

To mark selected or all dbspaces and dbslices as backed up on each blocked coserver, use the COMMIT option. Use the ABORT option when you do not want to mark any dbspaces as backed up.

Tip:
Be sure not to unblock coservers that another user has blocked. (For information, see Monitoring an External Backup.)

Unblocking All Coservers and Marking Dbspaces as Backed Up

To unblock the entire database server (all the coservers in cogroup_all), use either of the following commands. The COMMIT option marks all dbspaces on each coserver as having a level-0 backup.

onutil ebr unblock commit;

or

onutil ebr unblock cogroup_all commit;

Unblocking a Cogroup and Marking Selected Dbspaces as Backed Up

The following example unblocks the coservers in cogroup data_group and marks selected dbspaces or dbslices as backed up. The COMMIT option marks dbspaces rootdbs.1, rootdbs.2, and rootdbs.3 as backed up.

onutil ebr unblock data_group commit rootdbs.%r(1..3);

Unblocking a Specific Session and Not Marking Dbspaces as Backed Up

Use the ABORT option to cancel a failed external backup and unblock the set of coservers. You cannot externally restore these dbspaces because the backups are incomplete.

If you use the ABORT option, the skip logical replay feature does not work, even if that dbspace was completely backed up. In this case, use the COMMIT option to commit those dbspaces that were backed up successfully and use the ABORT option for the remaining dbspaces.

The following example unblocks the coservers identified in session block_data_cogroup and does not mark any dbspaces as backed up. You must have named the session in the previous block command. The ABORT option means that no dbspaces are marked as backed up.

onutil ebr unblock session block_data_cogroup abort;
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]