0% found this document useful (0 votes)
316 views

IBM Backup Guide

Uploaded by

oracledba_net
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
316 views

IBM Backup Guide

Uploaded by

oracledba_net
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 364

IBM Informix Backup and Restore Guide

Informix Extended Parallel Server, Version 8.31 Informix Dynamic Server, Version 9.3

August 2001 Part No. 000-8326

Copyright International Business Machines Corporation 2001. All rights reserved. Trademarks
AIX; DB2; DB2 Universal Database; Distributed Relational Database Architecture; NUMA-Q; OS/2, OS/390, and OS/400; IBM Informix; C-ISAM; Foundation.2000TM; IBM Informix 4GL; IBM Informix DataBlade Module; Client SDKTM; CloudscapeTM; CloudsyncTM; IBM Informix Connect; IBM Informix Driver for JDBC; Dynamic ConnectTM; IBM Informix Dynamic Scalable ArchitectureTM (DSA); IBM Informix Dynamic ServerTM; IBM Informix Enterprise Gateway Manager (Enterprise Gateway Manager); IBM Informix Extended Parallel

ServerTM; i. Financial ServicesTM; J/FoundationTM; MaxConnectTM; Object TranslatorTM; Red Brick Decision ServerTM; IBM Informix SE; IBM Informix SQL; InformiXMLTM; RedBack; SystemBuilderTM; U2TM; UniData; UniVerse; wintegrate are trademarks or registered trademarks of International Business Machines Corporation. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Windows, Windows NT, and Excel are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open

Company Limited. Other company, product, and service names used in this publication may be trademarks or service marks of others. Documentation Team: Karen Goldman Smith, Jennifer Leland, Karin Moore

ii IBM Informix Backup and Restore Guide

Table of Contents

Table of Contents

Introduction
In This Introduction . . . . . . . . . . . . . . . About This Manual . . . . . . . . . . . . . . . . Types of Users . . . . . . . . . . . . . . . . Software Dependencies . . . . . . . . . . . . . Assumptions About Your Locale. . . . . . . . . . Demonstration Database . . . . . . . . . . . . New Features in Dynamic Server, Version 9.3 . . . . . . Database Server Usability and Performance Enhancements Features from Dynamic Server 9.21 . . . . . . . . . Organizational Changes to This Manual Since Version 9.2 . New Features in Extended Parallel Server . . . . . . . . Documentation Conventions . . . . . . . . . . . . Typographical Conventions . . . . . . . . . . . Icon Conventions . . . . . . . . . . . . . . . Command-Line Conventions . . . . . . . . . . . Additional Documentation . . . . . . . . . . . . . Related Reading . . . . . . . . . . . . . . . . . Compliance with Industry Standards . . . . . . . . . Informix Welcomes Your Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 3 4 4 5 6 6 7 7 8 9 9 10 11 14 16 17 17

Section I
Chapter 1

Introducing Backup and Restore


Introducing Backup and Restore
In This Chapter . . . . . . . . . . . . . . . . What Is a Recovery System? . . . . . . . . . . . What Is a Backup? . . . . . . . . . . . . . What Is a Logical-Log Backup? . . . . . . . . . What Is a Restore? . . . . . . . . . . . . . Comparing ON-Bar and ontape . . . . . . . . . . Planning a Recovery Strategy . . . . . . . . . . . What Types of Data Loss Can Occur? . . . . . . . How Severe is the Failure? . . . . . . . . . . How Do You Use Your Data? . . . . . . . . . Scheduling Backups . . . . . . . . . . . . . Planning a Backup System for a Production Database Server Evaluating Hardware and Memory Resources. . . . Evaluating Backup and Restore Time . . . . . . . Evaluating Logging and Transaction Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 1-4 1-4 1-5 1-8 1-12 1-14 1-14 1-15 1-16 1-17 1-18 1-18 1-18 1-19

Section II
Chapter 2

The ON-Bar Backup and Restore System


The ON-Bar Backup and Restore System
In This Chapter . . . . . . . . . . . . . . . . Where to Find Information on ON-Bar and ISM . . . . ON-Bar for Dynamic Server . . . . . . . . . . . ON-Bar for Extended Parallel Server . . . . . . . . Database Server and Storage-Manager Communication Backup Scheduler . . . . . . . . . . . . . ON-Bar Utilities . . . . . . . . . . . . . . . Informix Storage Manager . . . . . . . . . . Third-Party Storage Managers . . . . . . . . . The XBSA Interface . . . . . . . . . . . . . The ON-Bar Tables . . . . . . . . . . . . . The Emergency Boot Files . . . . . . . . . . . The ON-Bar Activity Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 2-4 2-6 2-9 2-9 2-10 2-12 2-13 2-13 2-14 2-15 2-15 2-17

iv

IBM Informix Backup and Restore Guide

Chapter 3

Conguring the Storage Manager and ON-Bar


In This Chapter . . . . . . . . . . . . . . . . . Conguring a Storage Manager . . . . . . . . . . . Installing and Conguring a Third-Party Storage Manager . Conguring ISM . . . . . . . . . . . . . . . Updating the sm_versions File . . . . . . . . . . Conguring Multiple Storage Managers on Coserver Nodes Conguring ON-Bar . . . . . . . . . . . . . . . Creating the bargroup Group . . . . . . . . . . . Updating the onbar Script . . . . . . . . . . . . Setting ISM Environment Variables and ONCONFIG Parameters . . . . . . . . . Specifying the Location of the XBSA Library . . . . . . Using ON-Bar Conguration Parameters . . . . . . . . Using ON-Bar Conguration Parameters on Dynamic Server Using ON-Bar Conguration Parameters on Extended Parallel Server . . . . . . . . . Before You Make a Test Backup . . . . . . . . . . . . Choosing Storage Managers and Storage Devices . . . . . Features That ISM Supports . . . . . . . . . . . Features That ISM Does Not Support . . . . . . . . Storage Device Requirements . . . . . . . . . . . Considerations for Extended Parallel Server . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 3-3 3-3 3-4 3-5 3-6 3-7 3-7 3-7 3-8 3-9 3-10 3-10 3-12 3-19 3-20 3-20 3-21 3-22 3-23

Chapter 4

Backing Up with ON-Bar


In This Chapter . . . . . . . . . . . . . . . . . Syntax of ON-Bar Commands . . . . . . . . . . . . Preparing for a Backup . . . . . . . . . . . . . . What Data Does ON-Bar Back Up? . . . . . . . . . Which Administrative Files to Back Up? . . . . . . . Installing and Conguring a Storage Manager . . . . . What Is a Whole-System Backup? . . . . . . . . . What Is a Standard Backup? . . . . . . . . . . . What Is a Physical Backup?. . . . . . . . . . . . Choosing a Backup Level . . . . . . . . . . . . Collecting Information About Your System Before a Backup Backing Up Storage Spaces and Logical Logs . . . . . . . Backup Syntax . . . . . . . . . . . . . . . . Backing Up After Changing the Physical Schema . . . . Using ISM During a Backup . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 4-4 4-5 4-5 4-6 4-7 4-7 4-7 4-7 4-8 4-9 4-10 4-11 4-14 4-15 v

Table of Contents

Using Informix Server Administrator to Back Up and Verify . ON-Bar Backup Examples. . . . . . . . . . . . . Backing Up Table Types . . . . . . . . . . . . . Backing Up Logical Logs . . . . . . . . . . . . . . Backing Up Logical Logs on Dynamic Server . . . . . . Backing Up Logical Logs on Extended Parallel Server . . . Monitoring Logical-Log Backups . . . . . . . . . . Salvaging Logical-Log Files . . . . . . . . . . . . Skipping Logical Replay . . . . . . . . . . . . . Restoring Nonlogging Databases and Tables . . . . . . Understanding ON-Bar Backup Processes . . . . . . . . Backup Sequence on Dynamic Server . . . . . . . . . Backup Sequence on Extended Parallel Server. . . . . .

. . . . . . . . . . . . .

4-16 4-16 4-22 4-22 4-23 4-25 4-28 4-29 4-29 4-30 4-31 4-31 4-33

Chapter 5

Verifying Backups
In This Chapter . . . . . . . . . . . . . . . . . Verifying Backups with archecker . . . . . . . . . . Using archecker to Verify Backups . . . . . . . . . Preparing to Verify Backups . . . . . . . . . . . Syntax . . . . . . . . . . . . . . . . . . Estimating the Amount of Temporary Space for archecker Verication Examples . . . . . . . . . . . . . Interpreting Verication Messages . . . . . . . . . What To Do If Backup Verication Fails . . . . . . . Procedures for Fixing Backup Verication Problems. . . . . . . . . . . . . . . . . . . . . . . 5-3 5-3 5-4 5-6 5-7 5-8 5-10 5-11 5-12 5-13

Chapter 6

Restoring Data with ON-Bar


In This Chapter . . . . . . . . . . . What Types of Restores Does ON-Bar Perform What Is a Warm Restore? . . . . . . What Is a Cold Restore? . . . . . . What Is a Mixed Restore? . . . . . . What Is a Parallel Restore? . . . . . What Is a Whole-System Restore? . . . What Is a Point-in-Time Restore? . . . What Is an Imported Restore? . . . . What Is a Restartable Restore? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 6-3 6-3 6-4 6-5 6-5 6-5 6-6 6-6 6-7

vi

IBM Informix Backup and Restore Guide

Using the Pre-Recovery Checklist . . . . . . . . . . . Monitoring Restores . . . . . . . . . . . . . . Ensuring That Storage Devices Are Available . . . . . Restoring Save Sets with ISM . . . . . . . . . . . Performing a Complete Restore . . . . . . . . . . . Performing a Physical-Only or Logical-Only Restore . . . . Using Informix Server Administrator to Restore Data . . Examples of ON-Bar Restore Commands . . . . . . . Transferring Data with the Imported Restore . . . . . . . Importing a Restore . . . . . . . . . . . . . . Initializing High-Availability Data Replication with ON-Bar Restoring Table Types . . . . . . . . . . . . . . . Using Restartable Restore to Recover Data . . . . . . . . Restartable Restore Example . . . . . . . . . . . Restarting a Restore . . . . . . . . . . . . . . Resolving a Failed Restore . . . . . . . . . . . . Understanding ON-Bar Restore Processes . . . . . . . . Warm-Restore Sequence on Dynamic Server . . . . . . Cold-Restore Sequence on Dynamic Server . . . . . . Warm-Restore Sequence on Extended Parallel Server . . . Cold-Restore Sequence on Extended Parallel Server . . .

. . . . . . . . . . . . . . . . . . . . .

6-8 6-9 6-9 6-10 6-10 6-13 6-14 6-14 6-26 6-28 6-29 6-32 6-33 6-33 6-34 6-37 6-40 6-40 6-42 6-44 6-46

Chapter 7

Performing an External Backup and Restore


In This Chapter . . . . . . . . . . . . . . . Recovering Data Using an External Backup and Restore . What Is Backed Up in an External Backup? . . . . . . Rules for an External Backup . . . . . . . . . Performing an External Backup . . . . . . . . Preparing for an External Backup . . . . . . . . . Blocking and Unblocking Dynamic Server . . . . Blocking and Unblocking Extended Parallel Server . Monitoring an External Backup . . . . . . . . Tracking an External Backup . . . . . . . . . What Is Restored in an External Restore? . . . . . . Using External Restore Commands . . . . . . . Rules for an External Restore . . . . . . . . . Performing an External Restore . . . . . . . . Initializing HDR with an External Backup and Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 7-3 7-5 7-6 7-7 7-9 7-9 7-10 7-15 7-15 7-16 7-17 7-18 7-19 7-22

Table of Contents vii

Chapter 8

Using ONBar Utilities


In This Chapter . . . . . . . . . . . . . . . . . . Customizing ON-Bar and Storage-Manager Commands . . . Printing the Backup Boot Files . . . . . . . . . . . Migrating Backed-Up Logical Logs to Tape . . . . . . . Using start_worker.sh to Start onbar_worker Processes Manually Expiring and Synchronizing the Backup Catalogs . . . . . . Choosing an Expiration Policy . . . . . . . . . . . Using the onsmsync Utility . . . . . . . . . . . . Starting and Stopping ON-Bar Sessions . . . . . . . . . Using the onbar_w Utility. . . . . . . . . . . . . Monitoring the Backup Scheduler Status . . . . . . . . . Using the onstat -g bus Option . . . . . . . . . . . Using the onstat -g bus_sm Option . . . . . . . . . . . . . . . . . . . . . . 8-3 8-3 8-4 8-6 8-7 8-8 8-9 8-10 8-14 8-15 8-17 8-17 8-18

Chapter 9

Setting ON-Bar Conguration Parameters


In This Chapter . . . . . . . . . . . . . . . . Setting archecker Conguration Parameters in AC_CONFIG AC_CONFIG File . . . . . . . . . . . . . AC_MSGPATH . . . . . . . . . . . . . . AC_STORAGE . . . . . . . . . . . . . . AC_VERBOSE . . . . . . . . . . . . . . Setting ON-Bar Parameters in ONCONFIG . . . . . . ALARMPROGRAM . . . . . . . . . . . . BAR_ACT_LOG . . . . . . . . . . . . . . BAR_BOOT_DIR . . . . . . . . . . . . . BAR_BSALIB_PATH . . . . . . . . . . . . BAR_DBS_COSVR . . . . . . . . . . . . . BAR_HISTORY . . . . . . . . . . . . . . BAR_IDLE_TIMEOUT . . . . . . . . . . . . BAR_LOG_COSVR . . . . . . . . . . . . . BAR_MAX_BACKUP . . . . . . . . . . . . BAR_NB_XPORT_COUNT . . . . . . . . . . BAR_PROGRESS_FREQ . . . . . . . . . . . BAR_RETRY . . . . . . . . . . . . . . . BAR_SM. . . . . . . . . . . . . . . . . BAR_SM_NAME . . . . . . . . . . . . . . BAR_WORKER_COSVR . . . . . . . . . . . BAR_WORKER_MAX . . . . . . . . . . . . BAR_XFER_BUF_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 9-4 9-4 9-5 9-5 9-6 9-7 9-7 9-8 9-9 9-10 9-11 9-12 9-13 9-13 9-14 9-15 9-16 9-17 9-19 9-19 9-20 9-21 9-22

viii IBM Informix Backup and Restore Guide

BAR_XFER_BUFSIZE. . . . . . . . . . . . . . . BAR_XPORT_COUNT . . . . . . . . . . . . . . ISM_DATA_POOL. . . . . . . . . . . . . . . . ISM_LOG_POOL . . . . . . . . . . . . . . . . LOG_BACKUP_MODE . . . . . . . . . . . . . . LTAPEDEV . . . . . . . . . . . . . . . . . . RESTARTABLE_RESTORE . . . . . . . . . . . . . Files That ON-Bar and ISM Use . . . . . . . . . . . .

9-23 9-24 9-24 9-25 9-25 9-26 9-27 9-28

Chapter 10

ON-Bar Catalog Tables


In This Chapter . . . . . . . . . . . . . . . . . . The bar_action Table . . . . . . . . . . . . . . . . The bar_instance Table . . . . . . . . . . . . . . . . The bar_object Table . . . . . . . . . . . . . . . . The bar_server Table . . . . . . . . . . . . . . . . The bar_version Table . . . . . . . . . . . . . . . . ON-Bar Catalog Map . . . . . . . . . . . . . . . . Backup Scheduler SMI Tables . . . . . . . . . . . . . sysbuobject . . . . . . . . . . . . . . . . . . sysbuobjses . . . . . . . . . . . . . . . . . . sysbusession . . . . . . . . . . . . . . . . . . sysbusm . . . . . . . . . . . . . . . . . . . sysbusmdbspace . . . . . . . . . . . . . . . . sysbusmlog . . . . . . . . . . . . . . . . . . sysbusmworker. . . . . . . . . . . . . . . . . sysbuworker . . . . . . . . . . . . . . . . . . 10-3 10-3 10-5 10-7 10-8 10-9 10-9 10-11 10-12 10-13 10-14 10-14 10-15 10-15 10-16 10-16

Chapter 11

ON-Bar Messages and Return Codes


In This Chapter . . . About ON-Bar Messages Message Format . Message Numbers . ON-Bar Usage Messages ON-Bar Return Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3 11-3 11-3 11-4 11-5 11-9

Table of Contents ix

Section III
Chapter 12

The ontape Backup and Restore System


Conguring ontape
In This Chapter . . . . . . . . . . . . . . . Setting the ontape Conguration Parameters . . . . Setting the Tape-Device Parameters . . . . . . Specifying the Tape-Block-Size Parameters . . . . Specifying the Tape-Size Parameters . . . . . . Checking and Changing ontape Conguration Parameters Who Can Change ontape Parameters? . . . . . When Can You Change ontape Parameters? . . . Changing ontape Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3 . 12-3 . 12-4 . 12-7 . 12-8 . 12-8 . 12-8 . 12-9 . 12-10

Chapter 13

Backing Up with ontape


In This Chapter . . . . . . . . . . . . . . Syntax of ontape . . . . . . . . . . . . . Starting ontape . . . . . . . . . . . . Using ontape Exit Codes . . . . . . . . . Changing Database Logging Status . . . . . . . Creating a Backup . . . . . . . . . . . . . Choosing a Backup Level . . . . . . . . . Backing Up After Changing the Physical Schema. Preparing for a Backup . . . . . . . . . . Performing a Backup . . . . . . . . . . When the Logical-Log Files Fill During a Backup. When a Backup Terminates Prematurely. . . . Monitoring Backup History Using oncheck. . . Backing Up Logical-Log Files with ontape . . . . Before You Back Up the Logical-Log Files . . . When Must You Back Up Logical-Log Files? . . Starting an Automatic Logical-Log Backup . . . Starting a Continuous Logical-Log File Backup . Ending a Continuous Logical-Log Backup . . . What Device Must Logical-Log Backups Use? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3 13-3 13-4 13-4 13-5 13-6 13-6 13-7 13-7 13-10 13-12 13-13 13-13 13-14 13-14 13-15 13-16 13-16 13-17 13-18

IBM Informix Backup and Restore Guide

Chapter 14

Restoring with ontape


In This Chapter . . . . . . . . . . . . . . . Choosing the Type of Physical Restore . . . . . . . A Full-System Restore . . . . . . . . . . . Restoring Selected Dbspaces, Blobspaces, and Sbspaces Choosing a Cold, Warm, or Mixed Restore . . . . . . A Cold Restore . . . . . . . . . . . . . . A Warm Restore . . . . . . . . . . . . . A Mixed Restore . . . . . . . . . . . . . Performing a Restore . . . . . . . . . . . . . Restoring the Whole System . . . . . . . . . . . Gathering the Appropriate Tapes. . . . . . . . Deciding on a Complete Cold or a Mixed Restore . . Verifying Your Database Server Conguration . . . Performing a Cold Restore . . . . . . . . . . Restoring Selected Storage Spaces . . . . . . . . . Gathering the Appropriate Tapes. . . . . . . . Ensuring That Needed Device Are Available. . . . Backing Up Logical-Log Files . . . . . . . . . Performing a Warm Restore . . . . . . . . . Restoring Raw Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3 14-3 14-3 14-4 14-4 14-4 14-5 14-5 14-6 14-7 14-7 14-8 14-8 14-9 14-13 14-13 14-14 14-14 14-14 14-15

Appendix A Appendix B

Migration GLS Support Index

Table of Contents xi

Introduction

Introduction

In This Introduction

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

3 3 3 4 4 5 6 6 7 7 8 9 9 10 10 10 11 13 14 16 17 17

About This Manual . . . . . . . Types of Users . . . . . . . Software Dependencies . . . . Assumptions About Your Locale . Demonstration Database . . .

New Features in Dynamic Server, Version 9.3 . . . . . . Database Server Usability and Performance Enhancements Features from Dynamic Server 9.21 . . . . . . . . . Organizational Changes to This Manual Since Version 9.2 . New Features in Extended Parallel Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Documentation Conventions . . . . . . . Typographical Conventions . . . . . . Icon Conventions . . . . . . . . . . Comment Icons . . . . . . . . . Feature, Product, and Platform Icons . . Command-Line Conventions . . . . . . How to Read a Command-Line Diagram Additional Documentation . Related Reading . . . . . . . . . . . . . . . . . . . . . . . . . . .

Compliance with Industry Standards Informix Welcomes Your Comments .

IBM Informix Backup and Restore Guide

In This Introduction
This introduction provides an overview of the information in this manual and describes the conventions it uses.

About This Manual


This manual describes how to use the ON-Bar and ontape utilities to back up and restore database server data. These utilities enable you to recover your databases after data is lost or becomes corrupt due to hardware or software failure or accident.
ON-Bar requires Informix Storage Manager, Version 2.2, or a third-party

storage manager to manage the storage devices. The backup and restore processes, the ON-Bar commands, and the ON-Bar conguration parameters are different for Informix Dynamic Server and Informix Extended Parallel Server. The ontape utility does not require a storage manager and works on Dynamic Server only.

Types of Users
This manual is written for the following users:
s s s s

Database administrators System administrators Backup operators Technical support personnel

Introduction 3

Software Dependencies

This manual is written with the assumption that you have the following background:
s

Some experience with storage managers, which are applications that manage the storage devices and media that contain backups A working knowledge of your computer, your operating system, and the utilities that your operating system provides Some experience working with relational databases or exposure to database concepts Some experience with database server administration, operatingsystem administration, or network administration

If you have limited experience with relational databases, SQL, or your operating system, refer to the Getting Started manual for your database server for a list of supplementary titles.

Software Dependencies
This manual is written with the assumption that you are using one of the following database servers:
s s

Informix Dynamic Server, Version 9.3 Informix Extended Parallel Server, Version 8.31

ON-Bar works differently on Dynamic Server and on Extended Parallel

Server.

Assumptions About Your Locale


Informix products can support many languages, cultures, and code sets. All the information related to character set, collation, and representation of numeric data, currency, date, and time is brought together in a single environment, called a Global Language Support (GLS) locale. The examples in this manual are written with the assumption that you are using the default locale, en_us.8859-1. This locale supports U.S. English format conventions for date, time, and currency. In addition, this locale supports the ISO 8859-1 code set, which includes the ASCII code set plus many 8-bit characters such as , , and .
4 IBM Informix Backup and Restore Guide

Demonstration Database

If you plan to use nondefault characters in your data or your SQL identiers, or if you want to conform to the nondefault collation rules of character data, you need to specify the appropriate nondefault locale. For instructions on how to specify a nondefault locale, additional syntax, and other considerations related to GLS locales, see the Informix Guide to GLS Functionality.

Demonstration Database
The DB-Access utility, which Informix provides with its database server products, includes one or more of the following demonstration databases:
s

The stores_demo database illustrates a relational schema with information about a ctitious wholesale sporting-goods distributor. Many examples in Informix manuals are based on the stores_demo database. The sales_demo database illustrates a dimensional schema for datawarehousing applications. For conceptual information about dimensional data modeling, see the Informix Guide to Database Design and Implementation. The superstores_demo database illustrates an object-relational schema. The superstores_demo database contains examples of extended data types, type and table inheritance, and user-dened routines.

XPS

IDS

For information about how to create and populate the demonstration databases, see the DB-Access Users Manual. For descriptions of the databases and their contents, see the Informix Guide to SQL: Reference. The scripts that you use to install the demonstration databases reside in the $INFORMIXDIR/bin directory on UNIX and in the %INFORMIXDIR%\bin directory on Windows.

Introduction 5

New Features in Dynamic Server, Version 9.3

New Features in Dynamic Server, Version 9.3


The following tables provide information about the new features for Informix Dynamic Server, Version 9.3, that this manual covers. To go to the desired page, click a blue hyperlink. For a description of all new features, see the Getting Started manual.

Database Server Usability and Performance Enhancements


Version 9.3 includes new features that make the database server easier to install, use, and manage.
New Features A modiable shell script, ex_alarm.sh, to handle event alarms Dynamic addition of logical logs The ON-Bar option in Informix Server Administrator Reference Performing a Continuous Backup of Logical Logs on page 4-24 Ensuring That You Have Enough Logical-Log Space on page 4-9 ISA online help

IBM Informix Backup and Restore Guide

Features from Dynamic Server 9.21

Features from Dynamic Server 9.21


These features were introduced in Informix Dynamic Server, Version 9.21.
Features Backup and restore of nonlogging (RAW) tables using ON-Bar or ontape Reference Backing Up Table Types on page 4-22 and page 13-12 Restoring Table Types on page 6-32 and page 14-15 onbar -b -l command to back up logical logs The log_full.sh and log_full.bat scripts have been updated with the new parameters for continuous log backups. The onbar-l syntax for backing up logical logs will not be supported in the future. Backing Up Logical Logs on page 4-22

Organizational Changes to This Manual Since Version 9.2


The Backup and Restore Guide has been reorganized as follows:
s

Chapter 1 discusses backup and restore concepts and compares ON-Bar with ontape. Chapter 2 through Chapter 11 cover ON-Bar. Chapter 12 through Chapter 14 cover ontape. Chapter 7 contains new information on using external backup and restore to initialize High-Availability Data Replication.

s s s

Introduction 7

New Features in Extended Parallel Server

New Features in Extended Parallel Server


Extended Parallel Server, Version 8.3x, supports the following new features:
s s s s s s s s s s s

Object expiration and synchronization (onsmsync utility) Progress feedback Overriding internal checks during a restore (onbar -r -O) New user install script Mixed restore Revised ON-Bar messages in nderr Physical backup (onbar -b -p) New syntax for logical-log backup (onbar -b -l) New system-monitoring-interface (SMI) tables for Backup Scheduler New options for the onbar_w utility External backup and restore (new in Version 8.31.UD1) For details, see Chapter 7, Performing an External Backup and Restore.

IBM Informix Backup and Restore Guide

Documentation Conventions

Documentation Conventions
This section describes the conventions that this manual uses. These conventions make it easier to gather information from this and other volumes in the documentation set.

Typographical Conventions
This manual uses the following conventions to introduce new terms, illustrate screen displays, describe command syntax, and so forth.
Convention KEYWORD italics italics
italics

Meaning All primary elements in a programming language statement (keywords) appear in uppercase letters in a serif font. Within text, new terms and emphasized words appear in italics. Within syntax and code examples, variable values that you are to specify appear in italics. Names of program entities (such as classes, events, and tables), environment variables, le and pathnames, and interface elements (such as icons, menu items, and buttons) appear in boldface. Information that the product displays and information that you enter appear in a monospace typeface. Keys that you are to press appear in uppercase letters in a sans serif font. This symbol indicates the end of product- or platform-specic information. This symbol indicates a menu item. For example, Choose ToolsOptions means choose the Options item from the Tools menu.

boldface boldface

monospace monospace KEYSTROKE

Tip: When you are instructed to enter characters or to execute a command, immediately press RETURN after the entry. When you are instructed to type the text or to press other keys, no RETURN is required.

Introduction 9

Icon Conventions

Icon Conventions
Throughout the documentation, you will nd text that is identied by several different types of icons. This section describes these icons.

Comment Icons
Comment icons identify three types of information, as the following table describes. This information always appears in italics.
Icon Label Description Identies paragraphs that contain vital instructions, cautions, or critical information Identies paragraphs that contain signicant information about the feature or operation that is being described Identies paragraphs that offer additional details or shortcuts for the functionality that is being described

Warning:

Important:

Tip:

Feature, Product, and Platform Icons


Feature, product, and platform icons identify paragraphs that contain feature-specic, product-specic, or platform-specic information.
Icon
GLS

Description Identies information that relates to the Informix Global Language Support (GLS) feature Identies information or syntax that is specic to Informix Dynamic Server Identies information that is specic to the UNIX operating system (1 of 2)

IDS

UNIX

10

IBM Informix Backup and Restore Guide

Command-Line Conventions

Icon
Windows

Description Identies information that applies to all Windows environments Identies information that is specic to the Windows NT and Windows 2000 environments Identies information or syntax that is specic to Informix Extended Parallel Server (2 of 2)

WIN NT/2000

XPS

These icons can apply to an entire section or to one or more paragraphs within a section. If an icon appears next to a section heading, the information that applies ends at the next heading at the same or higher level. A symbol indicates the end of information that appears in one or more paragraphs within a section.

Command-Line Conventions
This section denes and illustrates the format of commands that are available in Informix products. These commands have their own conventions, which might include alternative forms of a command, required and optional parts of the command, and so forth. Each diagram displays the sequences of required and optional elements that are valid in a command. A diagram begins at the upper-left corner with a command. It ends at the upper-right corner with a vertical line. Between these points, you can trace any path that does not stop or back up. Each path describes a valid form of the command. You must supply a value for words that are in italics.

Introduction 11

Command-Line Conventions

You might encounter one or more of the following elements on a commandline path.
Element command Description This required element is usually the product name or other short word that invokes the product or calls the compiler or preprocessor script for a compiled Informix product. It might appear alone or precede one or more options. You must spell a command exactly as shown and use lowercase letters. A word in italics represents a value that you must supply, such as a database, le, or program name. A table following the diagram explains the value. A ag is usually an abbreviation for a function, menu, or option name, or for a compiler or preprocessor argument. You must enter a ag exactly as shown, including the preceding hyphen. A lename extension, such as .sql or .cob, might follow a variable that represents a lename. Type this extension exactly as shown, immediately after the name of the le. The extension might be optional in certain products. Punctuation and mathematical notations are literal symbols that you must enter exactly as shown. Single quotes are literal symbols that you must enter as shown. A reference in a box represents a subdiagram. Imagine that the subdiagram is spliced into the main diagram at this point. When a page number is not specied, the subdiagram appears on the same page. A shaded option is the default action. Syntax within a pair of arrows indicates a subdiagram. The vertical line terminates the command. (1 of 2)

variable

-ag

.ext

(.,;+*-/)

' '

Privileges p. 5-17 Privileges

ALL

12

IBM Informix Backup and Restore Guide

Command-Line Conventions

Element
-f OFF ON

Description A branch below the main path indicates an optional path. (Any term on the main path is required, unless a branch can circumvent it.) A loop indicates a path that you can repeat. Punctuation along the top of the loop indicates the separator symbol for list items. A gate ( 3 ) on a path indicates that you can only use that path the indicated number of times, even if it is part of a larger loop. You can specify size no more than three times within this statement segment. (2 of 2)

,
variable

,
3 size

How to Read a Command-Line Diagram


Figure 1 shows a command-line diagram that uses some of the elements that are listed in the previous table.
Figure 1 Example of a Command-Line Diagram
setenv INFORMIXC compiler pathname

To construct a command correctly, start at the top left with the command. Follow the diagram to the right, including the elements that you want. The elements in the diagram are case sensitive. Figure 1 illustrates the following steps:
1. 2. 3.

Type setenv. Type INFORMIXC. Supply either a compiler name or a pathname. After you choose compiler or pathname, you come to the terminator. Your command is complete.

4.

Press RETURN to execute the command.


Introduction 13

Additional Documentation

Additional Documentation
Informix Dynamic Server documentation is provided in a variety of formats:
s

Online manuals. The Informix OnLine Documentation Web site at http://www.informix.com/answers contains manuals that Informix provides for your use. This Web site enables you to print chapters or entire books. Online help. Informix provides online help with each graphical user interface (GUI) that displays information about those interfaces and the functions that they perform. Use the help facilities that each GUI provides to display the online help. This facility can provide context-sensitive help, an error message reference, language syntax, and more. To order a printed manual, call 1800-331-1763 or send email to [email protected]. Provide the following information when you place your order:

The documentation that you need The quantity that you need Your name, address, and telephone number

Documentation notes. Documentation notes, which contain additions and corrections to the manuals, are also located at the OnLine Documentation site at http://www.informix.com/answers. Examine these les before you begin using your database server. Release notes. Release notes contain vital information about application and performance issues. These les are located at http://www.informix.com/informix/services/techinfo. This site is a password controlled site. Examine these les before you begin using your database server. Documentation notes, release notes, and machine notes are also located in the directory where the product is installed. The following table describes these les.

14

IBM Informix Backup and Restore Guide

Additional Documentation

UNIX

On UNIX platforms, the following online les appear in the $INFORMIXDIR/release/en_us/0333 directory.
Online File onbar_docnotes_9.30.html or ONBARDOC.html (for 8.31) Purpose The documentation notes le for your version of this manual describes topics that are not covered in the manual or that were modied since publication. The release notes le describes feature differences from earlier versions of Informix products and how these differences might affect current products. This le also contains information about any known problems and their workarounds. The machine notes le describes any special actions that you must take to congure and use Informix products on your computer. Machine notes are named for the product described.

release_notes_9.30.html or SERVERS_8.3

machine_notes_9.30.txt or XPS_8.3

Introduction 15

Related Reading

Windows

The following items appear in the Informix folder. To display this folder, choose StartProgramsInformix Dynamic Server 9.30 Documentation Notes or Release Notes from the task bar.
Program Group Item Documentation Notes Description This item includes additions or corrections to manuals with information about features that might not be covered in the manuals or that have been modied since publication. This item describes feature differences from earlier versions of Informix products and how these differences might affect current products. This le also contains information about any known problems and their workarounds.

Release Notes

Machine notes do not apply to Windows platforms.


s

Error message les. Informix software products provide ASCII les that contain Informix error messages and their corrective actions. For a detailed description of these error messages, refer to Informix Error Messages in Answers OnLine. To read the error messages on UNIX, use the following command.
Command nderr Description Displays error messages online

UNIX

WIN NT

To read error messages and corrective actions on Windows NT, use the Informix Find Error utility. To display this utility, choose StartProgramsInformix from the task bar.

Related Reading
For a list of publications that provide an introduction to database servers and operating-system platforms, refer to your Getting Started manual.

16

IBM Informix Backup and Restore Guide

Compliance with Industry Standards

Compliance with Industry Standards


The American National Standards Institute (ANSI) has established a set of industry standards for SQL. Informix SQL-based products are fully compliant with SQL-92 Entry Level (published as ANSI X3.135-1992), which is identical to ISO 9075:1992. In addition, many features of Informix database servers comply with the SQL-92 Intermediate and Full Level and X/Open SQL CAE (common applications environment) standards.

Informix Welcomes Your Comments


We want to know about any corrections or clarications that you would nd useful in our manuals that would help us with future versions. Include the following information:
s s s

The name and version of the manual that you are using Any comments that you have about the manual Your name, address, and phone number

Send electronic mail to us at the following address: [email protected] This address is reserved for reporting errors and omissions in our documentation. For immediate help with a technical problem, contact Informix Customer Services. We appreciate your suggestions.

Introduction 17

Introducing Backup and Restore


Chapter 1 Introducing Backup and Restore

Section I

Chapter

Introducing Backup and Restore


In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 1-4 1-4 1-5 1-6 1-6 1-6 1-6 1-8 1-8 1-10 1-12 1-14 1-14 1-15 1-16 1-17 1-18 1-18 1-18 1-19

What Is a Recovery System?. . . . . . . . . . . . . . What Is a Backup? . . . . . . . . . . . . . . . . What Is a Logical-Log Backup? . . . . . . . . . . . When You Do Not Use Logging . . . . . . . . . . What Are Manual and Continuous Logical-Log Backups?. What Is a Log Salvage? . . . . . . . . . . . . . Why You Need to Save Logical-Log Backups . . . . . What Is a Restore? . . . . . . . . . . . . . . . . What Are Warm, Cold, and Mixed Restores? . . . . . What Are Physical and Logical Restores? . . . . . . Comparing ON-Bar and ontape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Planning a Recovery Strategy . . . . What Types of Data Loss Can Occur? How Severe is the Failure? . . . . How Do You Use Your Data? . . . Scheduling Backups . . . . . .

Planning a Backup System for a Production Database Server Evaluating Hardware and Memory Resources . . . . Evaluating Backup and Restore Time . . . . . . . Evaluating Logging and Transaction Activity . . . .

1-2

IBM Informix Backup and Restore Guide

In This Chapter
Informix provides two utilities for backing up and restoring database server data.
Utility ON-Bar ontape Storage Manager Informix Storage Manager (ISM) None Where Discussed Chapter 2 through Chapter 11 Chapter 12 through Chapter 14

This chapter explains basic backup and restore concepts for Informix database servers and covers the following topics:
s s s

Comparing ON-Bar and ontape Planning a recovery strategy Planning a backup system for a production database server

Introducing Backup and Restore 1-3

What Is a Recovery System?

What Is a Recovery System?


A recovery system enables you to back up your database server data and subsequently restore it if your current data becomes corrupt or inaccessible. The causes of data corruption or loss can range from a program error to a disk failure to a disaster that damages the entire facility. A recovery system enables you to recover data that you already lost due to such mishaps.

What Is a Backup?
A backup is a copy of one or more dbspaces (also called storage spaces) and logical logs that the database server maintains. On Dynamic Server, you can also back up blobspaces and sbspaces. On Extended Parallel Server, you can also back up dbslices. For a description of storage spaces, see your Administrators Guide. The backup copy is usually written to a secondary storage medium such as disk, magnetic tape, or optical disk. Informix recommends that you store the media ofine and keep a copy off-site if possible. Important: Database backups do not replace ordinary operating-system backups, which back up les other than Informix database les. Figure 1-1 illustrates the basic concept of a database backup.
Database server data Figure 1-1 A Backup of Database Server Data

Backup media

You do not always have to back up all the storage spaces. If some tables change daily but others rarely change, it is inefcient to back up the storage spaces that contain the unchanged tables every time that you back up the database server. You need to plan your backup schedule carefully to avoid long delays for backing up or restoring data.

1-4

IBM Informix Backup and Restore Guide

What Is a Logical-Log Backup?

To provide a more exible backup environment, ON-Bar and ontape support the following three backup levels:
s

Level 0 backs up all used pages that contain data for the specied storage spaces. You need all these pages to restore the database to the state that it was in at the time that you made the backup.

Level 1 backs up only data that has changed since the last level-0 backup of the specied storage spaces. All changed table and index pages are backed up, including those with deleted data. The data that is copied to the backup reects the state of the changed data at the time that the level-1 backup began.

Level 2 backs up only data that has changed since the last level-1 backup of the specied storage spaces. A level-2 backup contains a copy of every table and index page in a storage space that has changed since the last level-1 backup.

Important: If disks and other media are completely destroyed and need to be replaced, you need at least a level-0 backup of all storage spaces and relevant logical logs to restore data completely on the replacement hardware. For details, see Chapter 4, Backing Up with ON-Bar, and Backing Up with ontape on page 13-1.

What Is a Logical-Log Backup?


A logical-log backup is a copy to disk or tape of all full logical-log les. The logical-log les store a record of database server activity that occurs between backups. To free full logical-log les, back them up. The database server reuses the freed logical-log les for recording new transactions. For a complete description of the logical log, see your Administrators Guide.

Introducing Backup and Restore 1-5

What Is a Logical-Log Backup?

When You Do Not Use Logging


Even if you do not specify logging for databases or tables, you need to back up the logical logs because they contain administrative information such as checkpoint records and additions and deletions of chunks. When you back up these logical-log les, you can do warm restores even when you do not use logging for any of your databases.

What Are Manual and Continuous Logical-Log Backups?


A manual logical-log backup backs up all the full logical-log les and stops at the current logical-log le. If you turn on continuous logical-log backup, the database server backs up each logical log automatically when it becomes full. If you turn off continuous logical-log backup, the logical-log les continue to ll. If all logical logs are lled, the database server hangs until the logs are backed up.

What Is a Log Salvage?


When the database server is ofine (Dynamic Server) or in microkernel mode (Extended Parallel Server), you can perform a special kind of logical-log backup, called a log salvage. In a log salvage, the database server accesses the log les directly from disk. The log salvage backs up any logical logs that have not yet been backed up and are not corrupted or destroyed. The log salvage enables you to recover all of your data up to the last available and uncorrupted logical-log le and the last complete transaction.

Why You Need to Save Logical-Log Backups


Perform frequent logical-log backups for the following reasons:
s s s

To free full logical-log les To minimize data loss if a disk that contains logical logs fails To ensure that restores contain consistent and the latest transactions

1-6

IBM Informix Backup and Restore Guide

What Is a Logical-Log Backup?

Save the logical-log backups from the last two level-0 backups so that you can use them to complete a restore. If a level-0 backup is inaccessible or unusable, you can restore data from an older backup, if you have one. If any of the logical-log backups are also inaccessible or unusable, however, you cannot roll forward the transactions from those logical-log les or from any subsequent logical-log les. Warning: You will lose transactions in logical-log les that are not backed up or salvaged. To illustrate, as Figure 1-2 shows, suppose you perform a level-0 backup on Monday at 10:00 P.M. and then back up the logical logs on Tuesday at midnight. On Wednesday at 11:00 A.M., you suffer a mishap that destroys your databases. You would be unable to restore the transactions that occurred between midnight on Tuesday and 11:00 A.M. on Wednesday unless you had continuous logical-log backup set up. If the disks that contain the storage spaces with the logical logs are damaged, the transactions after midnight on Tuesday might be lost. To restore these transactions from the last logical-log backup, try to salvage the logical logs before you repair or replace the bad disk and then perform a cold restore.
Logical-log backup Level-0 backup Failure Figure 1-2 Storage Space and Logical-Log Backups

Transactions Monday 10 P.M. Tuesday midnight Wednesday 11 A.M. Time

Logical-log les

Storage-manager logicallog backup media

For more information, see Backing Up Logical Logs on page 4-22 and Backing Up Logical-Log Files with ontape on page 13-14.

Introducing Backup and Restore 1-7

What Is a Restore?

What Is a Restore?
A restore re-creates database server data from backed-up storage spaces and logical-log les. A restore re-creates database server data that has become inaccessible because of any of the following conditions:
s s s s

You need to replace a failed disk that contains database server data. A logic error in a program has corrupted a database. You need to move your database server data to a new computer. A user accidentally corrupted or destroyed data.

To restore data up to the time of the failure, you must have at least one level-0 backup of each of your storage spaces from before the failure and the logicallog les that contain all transactions since these backups.

What Are Warm, Cold, and Mixed Restores?


When you restore data, you must decide whether to do so while the database server is in quiescent, online, ofine (Dynamic Server), or microkernel mode (Extended Parallel Server). The types of restores are as follows:
s

If you restore noncritical data while the database server is online or quiescent, that process is called a warm restore. When Dynamic Server is ofine or Extended Parallel Server is in microkernel mode, you can perform a cold restore. A mixed restore is a cold restore of some storage spaces followed by a warm restore of the remaining storage spaces.

1-8

IBM Informix Backup and Restore Guide

What Is a Restore?

Warm Restore
As Figure 1-3 shows, a warm restore restores noncritical storage spaces. A warm restore consists of one or more physical restores, a logical-log backup, and a logical restore.
Backup media Figure 1-3 Warm Restore

Critical dbspaces

Dbspace 1

Dbspace 2

Logical-log backup media

Transactions

Introducing Backup and Restore 1-9

What Is a Restore?

Cold Restore
As Figure 1-4 shows, a cold restore salvages the logical logs, and restores the critical dbspaces (root dbspace and the dbspaces that contain the physical log and logical-log les), other storage spaces, and the logical logs.
Backup media Figure 1-4 Cold Restore

Critical dbspaces

Dbspace 1

Dbspace 2

Logical-log backup media Transactions

What Are Physical and Logical Restores?


ON-Bar and ontape restore database server data in two phases:
s

The rst phase is the physical restore, which restores data from backups of all or selected storage spaces. The second phase is the logical restore, which restores transactions from the logical-log backups. The database server automatically knows which logical logs to restore.

1-10

IBM Informix Backup and Restore Guide

What Is a Restore?

Physical Restore
During a physical restore, ON-Bar or ontape restores the data from the most recent level-0, level-1, and level-2 backups. When you suffer a disk failure, you can restore to a new disk only those storage spaces with chunks that resided on the failed disk. Figure 1-5 illustrates a physical restore.
Figure 1-5 Physical Restore

Backup media

Root dbspace

Dbspace 1

Dbspace 2

Logical Restore
As Figure 1-6 shows, the database server replays the logical logs to reapply any database transactions that occurred after the last backup. The logical restore applies only to the physically-restored storage spaces.
Root dbspace Logical-log backup media Transactions INSERT... SELECT SELECT SELECT Dbspace 1 Figure 1-6 Logical Restore

Dbspace 2

For more information, see Chapter 6, Restoring Data with ON-Bar and Chapter 14, Restoring with ontape.

Introducing Backup and Restore 1-11

Comparing ON-Bar and ontape

Comparing ON-Bar and ontape


Figure 1-7 compares ON-Bar and ontape. If you are switching to ON-Bar and ISM from ontape, note that ON-Bar works differently.
Figure 1-7 Differences Between ON-Bar and ontape Can the utility... Use a storage manager to track backups and storage media? Back up all database server data? Back up selected storage spaces? Back up logical-log les? Perform continuous logical-log backups? Back up while the database server is online? Back up while the database server is in quiescent mode? Restore all database server data? Restore selected storage spaces? Back up and restore storage spaces serially? ON-Bar yes yes yes yes yes yes yes yes yes yes ontape no yes no yes yes yes yes yes yes yes yes yes no no no no no (1 of 2)

Perform cold restores with the database server ofine or in micro- yes kernel mode? Initialize high-availability data replication? Restore data to a specic point in time? Perform separate physical and logical restores? Back up and restore different storage spaces in parallel? Use multiple tape drives concurrently for backups and restores? Restart a restore? yes yes yes yes yes yes

1-12

IBM Informix Backup and Restore Guide

Comparing ON-Bar and ontape

Can the utility... Perform imported restores? Perform external backups and restores? Change logging mode for databases?

ON-Bar yes yes no

ontape no no yes (2 of 2)

The ontape utility does not use the sysutils database or the emergency boot les. The ontape utility supports remote backup devices on other hosts but ISM does not. ISM supports different sets of tape drives on various hardware platforms. The ontape utility supports two simultaneous sessions, one for physical backup or restore, and one for log backup. Each ISM instance has a limit of four simultaneous sessions. You can use ON-Bar with third-party storage managers to obtain more sophisticated device support and storage management. The ontape utility allows you to change the logging mode of a database. If you use ON-Bar, use ondblog to change the logging mode of a database. Warning: The backup tapes that ontape and ON-Bar produce are not compatible! You cannot create a backup with ontape and restore it with ON-Bar, or vice versa.

Introducing Backup and Restore 1-13

Planning a Recovery Strategy

Planning a Recovery Strategy


Before you use ON-Bar or ontape, plan your recovery goals.

What Types of Data Loss Can Occur?


The rst step is to determine how much data loss, if any, is acceptable. The following types of data loss can occur:
s

Deletion of the following:


rows, columns, tables, or databases chunks, storage spaces, or logical logs

s s

Data corruption or incorrect data created Hardware failure (such as a disk that contains chunk les fails or a backup tape that wears out) Database server failure Natural disaster

s s

1-14

IBM Informix Backup and Restore Guide

How Severe is the Failure?

How Severe is the Failure?


After you determine your recovery goals, create your recovery plan. Develop a recovery plan for multiple levels of failure, as Figure 1-8 shows.
Figure 1-8 Sample Recovery Plans Failure Severity Small Medium Data Loss Noncritical data is lost. The data that is lost is critical for your business but does not reside in a critical dbspace. Critical dbspaces are lost. Suggested Recovery Plan Restore of the data can wait until a nonpeak time. Use a warm restore. Perform a warm restore of this data as soon as possible.

Large

Use a mixed restore to restore the critical data right away and a warm restore to restore noncritical data during off-peak hours. Perform a cold or mixed restore as soon as possible.

Disaster

All data is lost.

Introducing Backup and Restore 1-15

How Do You Use Your Data?

How Do You Use Your Data?


After you develop your recovery plan, create a backup plan. How you use the data also determines how you plan your backup schedule, as follows:
s

Data usage How do users use the data?

Critical dbspaces (root dbspace and dbspaces that contain the physical log and at least one logical-log le) Critical business application data Long-term data storage for legal or record-keeping reasons Data sharing among groups Test data

Transaction Time How much transaction time can be lost? Also, how long might it take to re-enter lost transactions manually? For example, can you afford to re-enter all transactions that occurred over the past three hours?

Quantity and Distribution How much data can you afford to lose? For example, you lost one fourth of your customer proles, or you lost the Midwest regional sales gures but the West Coast gures are intact.

Ask the following questions to assist in deciding how often and when you want to back up the data:
s

Does your business have down time where the system can be restored? If your system is 24x7 (no down time), is there a nonpeak time where a restore could occur? If a restore must occur during a peak period, how critical is the time? Which data can you restore with the database server online (warm restore)? Which data must be restored ofine (cold restore)? How many storage devices are available to back up and restore the data?

s s

1-16

IBM Informix Backup and Restore Guide

Scheduling Backups

Scheduling Backups
Figure 1-9 shows a sample backup plan for a small or medium-sized system. Tailor your backup plan to the requirements of your system. The more often the data changes and the more important it is, the more frequently you need to back it up. For more information, see Choosing a Backup Level on page 4-8.
Figure 1-9 Sample Backup Plan Backup Level Complete (level-0) backup Incremental (level-1) backup Incremental (level-2) backup Level-0 backup of storage spaces that are updated frequently Backup Schedule Saturday at 6 P.M. Tuesday and Thursday at 6 P.M. Daily at 6 P.M. Hourly

Important: Perform a level-0 backup after you change the physical schema, such as adding a chunk to a storage space. (See Collecting Information About Your System Before a Backup on page 4-9.)

Introducing Backup and Restore 1-17

Planning a Backup System for a Production Database Server

Planning a Backup System for a Production Database Server


To plan for adequate backup protection for your data, analyze your database server conguration and activity and the types of backup media available at your installation. Also, consider your budget for storage media, disks, computers and controllers, and the size of your network.

Evaluating Hardware and Memory Resources


Evaluate the following database server and hardware conguration elements to determine which storage manager and storage devices to use:
s s

The number of I/O virtual processors The amount of memory available and the distribution of processor activity

Evaluating Backup and Restore Time


How long your backup or restore takes depends on your database server conguration and the database size:
s

The speed of disks or tape devices The faster the storage devices, the faster the backup or restore time. The number of incremental backups that you want to restore if a disk or system failure requires you to rebuild the database Incremental backups use less storage space than full backups and also reduce restore time.

The size and number of storage spaces in the database Backups: Many small storage spaces take slightly longer to back up than a few large storage spaces of the same total size. Restores: A restore usually takes as long to recover the largest storage space and the logical logs.

1-18

IBM Informix Backup and Restore Guide

Evaluating Logging and Transaction Activity

Whether storage spaces are mirrored If storage spaces are mirrored, you reduce the chance of having to restore damaged or corrupted data. You can restore the mirror at nonpeak time with the database server online.

The length of time users are interrupted during backups and restores If you perform backups and warm restores while the database server is online, users can continue their work but might notice a slower response. If you perform backups and warm restores with the database server in quiescent mode, users must exit the database server. If you perform a cold restore with the database server ofine, the database server is unavailable to users, so the faster the restore, the better. An external backup and restore eliminates system downtime.

The backup schedule Not all storage spaces need to be included in each backup or restore session. Schedule backups so that you can back up more often the storage spaces that change rapidly than those that seldom or never change. Be sure to back up each storage space at level-0 at least once.

The layout of the tables across the dbspaces and the layout of dbspaces across the disks When you design your database server schema, organize the data so that you can restore important information quickly. For example, you should isolate critical and frequently used data in a small set of storage spaces on the fastest disks. You also can fragment large tables across dbspaces to balance I/O and maximize throughput across multiple disks. For more information, see your Performance Guide.

Evaluating Logging and Transaction Activity


The following database server usage requirements also affect your decisions about the storage manager and storage devices:
s s

The amount and rate of transaction activity that you expect The number and size of logical logs If you need to restore data from a database server with very little transaction activity, dene many small logical logs. You are less likely to lose data because of infrequent logical-log backups.

Introducing Backup and Restore 1-19

Evaluating Logging and Transaction Activity

How fast the logical-log les ll Back up log les before they ll so that the database server does not hang

Database and table logging modes When you use many nonlogging databases or tables, logical-log backups might become less frequent.

1-20

IBM Informix Backup and Restore Guide

The ON-Bar Backup and Restore System


Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 The ON-Bar Backup and Restore System Configuring the Storage Manager and ON-Bar Backing Up with ON-Bar Verifying Backups Restoring Data with ON-Bar Performing an External Backup and Restore Using ONBar Utilities Setting ON-Bar Configuration Parameters ON-Bar Catalog Tables ON-Bar Messages and Return Codes

Section II

Chapter

The ON-Bar Backup and Restore System


In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 2-4 2-6 2-9 2-9 2-10 2-12 2-13 2-13 2-14 2-15 2-15 2-15 2-16 2-17 2-17 2-17

Where to Find Information on ON-Bar and ISM . ON-Bar for Dynamic Server . . . . . . . .

ON-Bar for Extended Parallel Server . . . . . . . . . Database Server and Storage-Manager Communication . Backup Scheduler . . . . . . . . . . . . . . ON-Bar Utilities . . . . . . . . . . . . . . . Informix Storage Manager . . . . . . . . . . Third-Party Storage Managers . . . . . . . . The XBSA Interface . . . . . . . . . . . . The ON-Bar Tables . . . . . . . . . . . . The Emergency Boot Files . . . . . . . . . . Emergency Boot File on Dynamic Server. . . . Emergency Boot Files on Extended Parallel Server The ON-Bar Activity Log . . . . . . . . . . Specifying the Location of the Activity Log . . . Monitoring the Progress of a Backup or Restore .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter introduces the components of ON-Bar and describes how it works. The following topics are covered:
s s s s

Where to nd information on ON-Bar and ISM


ON-Bar for Dynamic Server ON-Bar for Extended Parallel Server ON-Bar utilities

Figure 2-1 shows which database server versions support ON-Bar and Informix Storage Manager (ISM), Version 2.2.
Figure 2-1 On-Bar and ISM Support Database Server Dynamic Server Dynamic Server INFORMIX-Universal Server Dynamic Server Dynamic Server INFORMIX-OnLine XPS Dynamic Server with AD and XP Options Extended Parallel Server Version Version 7.24 Version 7.3x Version 9.1x Version 9.2x Version 9.3 Version 8.11 Version 8.2x Version 8.3x ON-Bar Support ISM Support 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

The ON-Bar Backup and Restore System 2-3

Where to Find Information on ON-Bar and ISM

Where to Find Information on ON-Bar and ISM


The task-documentation matrix in Figure 2-2 provides a quick reference to locating ON-Bar commands and ISM information.
Figure 2-2 ON-Bar and ISM Task-Documentation Matrix If You Want To: Learn backup and restore concepts Congure and use ON-Bar and ISM or another storage manager Use the onbar script to customize ON-Bar and ISM operations Use ON-Bar and ISM conguration parameters See a list of the les that ON-Bar and ISM use Set up ISM to use certain storage devices for backup and restore operations Manage backup media and storage devices for ON-Bar Track the location of all backup data Move backup data through a managed life cycle Back up storage spaces and logical logs:
s s s s s

Chapter or Manual Chapter 1 Chapter 3 of this manual Informix Storage Manager Administrators Guide Third-party storage-manager manual Chapter 3 (setup) Chapter 8 (customization) Chapter 9 of this manual Informix Storage Manager Administrators Guide Informix Storage Manager Administrators Guide or third-party storage-manager manual

onbar -b -L [0|1|2] (standard backup) onbar -b -O (override error checking) onbar -b -w (whole-system backup, IDS) onbar -b -F (fake backup, IDS) onbar -b -p (physical backup, XPS)

Backing Up Storage Spaces and Logical Logs on page 4-10

(1 of 3)

2-4

IBM Informix Backup and Restore Guide

Where to Find Information on ON-Bar and ISM

If You Want To: Back up logical logs only:


s s s s

Chapter or Manual Backing Up Logical Logs on page 4-22

onbar -b -l onbar -b -l -s (log salvage) onbar -b -l -c (backup includes current log, IDS) onbar -b -l -C (continuous log backup, IDS) Chapter 5

Verify backups before you use the data in a restore:


s s

onbar -v (verify backup) onbar -b -v (backup and verify, XPS) Chapter 6

Perform warm or cold restores:


s s s s s s s s

onbar -r (parallel restore) onbar -r -p (physical restore) onbar -r -l (logical restore) onbar -r -O (override error checking) onbar -r -t (point-in-time restore) onbar -r -n (point-in-log restore, IDS) onbar -r -w (whole-system restore, IDS) onbar -RESTART (restartable restore, IDS) Chapter 7

Perform external backups and restores:


s s s

onmode -c block|unblock (external backup, IDS) onutil ebr block|unblock (external backup, XPS) onbar -r -e (external restore) Chapter 8 Chapter 8 Chapter 8 Chapter 10 Informix Error Messages in Answers OnLine or nderr (2 of 3) The ON-Bar Backup and Restore System 2-5

Use the onsmsync utility to expire old backup objects Use the onbar_w utility or start_worker script to start onbar-worker processes manually (XPS) Monitor Backup Scheduler status (XPS) Refer to the tables in the sysutils database and the Backup Scheduler tables in the sysmaster database Find corrective actions to ON-Bar error messages

ON-Bar for Dynamic Server

If You Want To: Find ON-Bar return codes Use GLS with ON-Bar Create and delete storage spaces and chunks Manage database-logging status, logical-log les, and the physical log Perform fast recovery Locate complete information on all database server conguration parameters Use the ondblog utility to change the logging mode Use the onlog utility to display logical-log records

Chapter or Manual Chapter 11 Appendix B Administrators Guide for your database server

Administrators Reference

(3 of 3)

IDS

ON-Bar for Dynamic Server


Figure 2-3 on page 2-8 shows the following components of ON-Bar for Dynamic Server:
s

Storage spaces (dbspaces, blobspaces, and sbspaces) and logical logs to be backed up or restored The ON-Bar catalog tables in the sysutils database The onbar script (onbar.sh on UNIX or onbar.bat on Windows) The onbar-driver (onbar_d) The XBSA shared library for the storage manager on your system Use either ISM or a storage manager that a third-party vendor provides.

s s s s

s s s

Backup data on storage media The ON-Bar activity log The ON-Bar emergency boot le

2-6

IBM Informix Backup and Restore Guide

ON-Bar for Dynamic Server

ON-Bar communicates with both the database server and the storage

manager. Use the onbar command to start a backup or restore. For a backup session, ON-Bar requests the contents of storage spaces and logical logs from the database server and passes them to the storage manager. The storage manager stores the data on storage media. For a restore session, ON-Bar requests the backed up data from the storage manager and restores it on the database server. If you specify a parallel backup or restore, the onbar-driver (onbar_d) creates child onbar_d processes that perform backup and restore operations. Each child processes one space, then returns. ON-Bar processes log les serially. If you specify a serial backup or restore, the onbar-driver performs the operation one object at a time.

The ON-Bar Backup and Restore System 2-7

ON-Bar for Dynamic Server

The onbar_d processes write status and error messages to the ON-Bar activity log and write information to the emergency boot le that is used in a cold restore. For more details, see Backup Sequence on Dynamic Server on page 4-31.
Figure 2-3 ON-Bar Components for Dynamic Server

Storage spaces and logical logs

IDS

sysutils database onbar_d

onbar commands XBSA

Activity log

Storage manager

Emergency boot le

Backup media

2-8

IBM Informix Backup and Restore Guide

ON-Bar for Extended Parallel Server

XPS

ON-Bar for Extended Parallel Server


Figure 2-4 on page 2-11 shows the following components of ON-Bar for Extended Parallel Server:
s

Storage spaces (dbspaces and dbslices) and logical logs to be backed up or restored The ON-Bar catalog tables in the sysutils database The onbar script and onbar-driver (onbar_d), onbar-worker (onbar_w), and onbar-merger (onbar_m) The XBSA shared library for each storage manager on your system Use either ISM or a storage manager that a third-party vendor provides.

s s

s s s

Backup data on storage media The ON-Bar activity log The ON-Bar emergency boot les

Database Server and Storage-Manager Communication


For a backup session, ON-Bar requests the contents of storage spaces and logical logs from the database server and passes them to the storage manager. The storage manager stores the data on storage media. For a restore session, ON-Bar requests the backed-up data from the storage manager and restores it on the database server. The onbar_d, onbar_w, and onbar_m processes write status and error messages to the ON-Bar activity log. The onbar_w and onbar_m processes write information to the emergency boot les that are used in a cold restore.

The ON-Bar Backup and Restore System 2-9

Backup Scheduler

Backup Scheduler
The onbar-driver (onbar_d) communicates backup or restore requests to the Backup Scheduler on Extended Parallel Server. The Backup Scheduler tracks all active and scheduled backup and restore activities for all the coservers. The Backup Scheduler creates one or more sessions, each of which contains a list of objects to back up or restore. It starts onbar-worker processes to back up or restore the objects and coordinates the session activity. A session is a single backup or restore request. For details, see Backup Sequence on Extended Parallel Server on page 4-33.

2-10

IBM Informix Backup and Restore Guide

Backup Scheduler

Figure 2-4 ON-Bar Components for Extended Parallel Server

onbar commands Storage spaces and logical logs onbar_d onbar_m

sysutils database XPS

Activity log onbar_w

XBSA

Storage manager

Emergency boot le

Backup media

The ON-Bar Backup and Restore System 2-11

ON-Bar Utilities

ON-Bar Utilities
ON-Bar includes the following utilities. You can call onbar from the command line, a script, a scheduler such as cron (UNIX), or a storage-

manager process.
Utility onbar Description Is an editable shell script on UNIX and a batch le (onbar.bat) in Windows that starts the onbar-driver. Use the onbar script or batch le to check the storage-manager version and customize backup and restore operations. When you use the onbar command, it calls the onbar_d utility that starts the onbar-driver. The onbar-driver starts and controls backup and restore activities. The onbar_d utility transfers data between Dynamic Server and the storage manager. onbar_w Transfers data between an Extended Parallel Server coserver and the storage manager until the backup or restore request is fullled. Collects and processes the backup emergency boot les from each coserver and creates the restore boot le. Starts onbar-worker processes manually. Cleans up old backup history in the sysutils database and emergency boot les. Changes the database-logging mode.

IDS

XPS

onbar_d

onbar_m

start_worker.sh onsmsync ondblog

2-12

IBM Informix Backup and Restore Guide

Informix Storage Manager

Informix Storage Manager


ON-Bar is packaged with ISM. However, you can purchase a third-party

storage manager if you prefer. You must use a storage manager to perform backups and restores with ON-Bar. The storage manager is an application that manages the storage devices and media that contain backups. The storage manager handles all media labeling, mount requests, and storage volumes. The ISM server resides on the same computer as ON-Bar and the Informix database server; your storage devices are attached to this computer as well. ISM can store data on simple tape drives, optical disk devices, and le systems. ISM also performs the following functions:
s s s s s s

Congures up to four storage devices Adds, changes, and deletes administrative users Labels and mounts storage volumes on your storage devices Manages storage volumes Compresses and decompresses data Encrypts and decrypts data

For more information, see Installing and Conguring a Third-Party Storage Manager on page 3-3, Choosing Storage Managers and Storage Devices on page 3-20, Chapter 9, Setting ON-Bar Conguration Parameters, and the Informix Storage Manager Administrators Guide.

Third-Party Storage Managers


Some third-party storage managers can manage stackers, robots, and jukeboxes as well as simple tape and disk devices. These storage managers might perform these additional functions:
s s

Schedule backups Support networked and distributed backups and restores

Important: For information on the third-party storage managers that ON-Bar supports, consult your Informix sales representative or the Informix Web site at http://www.informix.com. Make sure that the storage manager has passed the Informix validation process. The validation process is specic to the backup and restore product version, the operating-system version, and the Informix database server version.
The ON-Bar Backup and Restore System 2-13

The XBSA Interface

The XBSA Interface


ON-Bar and the storage manager communicate through the X/Open Backup Services Application Programmers Interface (XBSA), which enables the

storage manager to manage media for the database server. By using an opensystem interface to the storage manager, ON-Bar can work with a variety of storage managers that also use XBSA. Each storage manager develops and distributes a unique version of the XBSA shared library. You must use the version of the XBSA shared library provided with the storage manager. For example, if you use ISM, use the XBSA shared library provided with ISM. ON-Bar and the XBSA shared library must be compiled the same (32-bit or 64-bit).
ON-Bar uses XBSA to exchange the following types of information with a

storage manager:
s

Control data. ON-Bar exchanges control data with a storage manager to verify that ON-Bar and XBSA are compatible, to ensure that objects are restored to the proper instance of the database server and in the proper order, and to track the history of backup objects. Backup or restore data. During backups and restores, ON-Bar and the storage manager use XBSA to exchange data from specied storage spaces or logical-log les.

ON-Bar uses XBSA transactions to ensure data consistency. All operations

included in a transaction are treated as a unit. All operations within a transaction must succeed for objects transferred to the storage manager to be restorable.

2-14

IBM Informix Backup and Restore Guide

The ON-Bar Tables

The ON-Bar Tables


ON-Bar uses the following catalog tables in the sysutils database to track

backup and restore operations:


s s

The bar_server table tracks instances of the database server. The bar_object table tracks backup objects. A backup object is a backup of a dbspace, blobspace, sbspace, or logical-log le. The bar_action table tracks all backup and restore attempts against each backup object, except some log salvage and cold restore events. The bar_instance table describes each object that is backed up during a successful backup attempt.

For a description of the content of these tables, see Chapter 10, ON-Bar Catalog Tables.

The Emergency Boot Files


The ON-Bar emergency boot les reside in the $INFORMIXDIR/etc directory on UNIX and in the %INFORMIXDIR%\etc directory on Windows. The emergency boot les contain the information that you need to perform a cold restore and are updated after every backup.
ON-Bar must be able to restore objects from a storage manager even when the

tables in the sysutils database are not available. During a cold restore, the database server is not available to access sysutils, so ON-Bar obtains the information it needs for the cold restore from the emergency boot le.
IDS

Emergency Boot File on Dynamic Server


ON-Bar uses one emergency boot le on Dynamic Server. The lename for

the emergency boot le is ixbar.servernum, where servernum is the value of the SERVERNUM conguration parameter.

The ON-Bar Backup and Restore System 2-15

The Emergency Boot Files

XPS

Emergency Boot Files on Extended Parallel Server


Figure 2-5 lists the types of emergency boot les that Extended Parallel Server uses. Each node with a storage manager contains one backup boot le and one restore boot le. Multiple coservers on a node share a backup boot le and a restore boot le. The database server has one merge boot le. Use the BAR_BOOT_DIR conguration parameter to specify the location of the emergency boot les. For more information, see BAR_BOOT_DIR on page 9-9. If you do not specify BAR_BOOT_DIR, the database server stores the boot les in $INFORMIXDIR/etc.
Figure 2-5 Emergency Boot Files

Boot File Type Backup Restore

Boot Filename Bixbar_hostname.servernum Rixbar_hostname.servernum

Description This le contains backup information and is updated after every backup. The onbar-merger process re-creates the restore boot les, which the onbar-worker processes use during a cold restore. The onbar-merger process re-creates the merge boot le during a cold restore. The merge boot le is temporary and is removed when the onbar_d process that created it exits.

Merge

Mixbar_hostname.servernum

During the cold-restore process, ON-Bar follows these steps to create a restore boot le and restore data. To create the emergency boot les in a cold restore
1. 2. 3.

It merges the backup boot les from all coservers and creates a merge boot le for the restore. It distributes the merge boot le to each coserver, renaming it as the restore boot le and overwriting the old restore boot les. It uses the information in the restore boot le instead of the information in the sysutils database to determine which backup copy of each storage space and log to use.

2-16

IBM Informix Backup and Restore Guide

The ON-Bar Activity Log

The ON-Bar Activity Log


ON-Bar writes informational, progress, warning, and error messages to the ON-Bar activity log. The activity log also records which storage spaces and

logical logs were backed up or restored, the progress of the operation, and approximately how long it took. Use the information in the activity log to determine whether a backup or restore operation succeeded. For a list of ON-Bar informational, warning, and error messages, use the nderr or Find Error utility or view Informix Error Messages in Answers OnLine.

Specifying the Location of the Activity Log


The default location and name of the ON-Bar activity log on UNIX is /tmp/bar_act.log and on Windows is %INFORMIXDIR% \bar_act.log. For information on how to change the location of the ON-Bar activity log, see BAR_ACT_LOG on page 9-8.

Monitoring the Progress of a Backup or Restore


If your backup or restore operations take a long time to complete, knowing the progress is especially useful. Use the BAR_PROGRESS_FREQ conguration parameter to specify, in minutes, the frequency of the progress messages written to the ON-Bar activity log. For information on how to change the frequency of the progress messages, see BAR_PROGRESS_FREQ on page 9-16.

The ON-Bar Backup and Restore System 2-17

Chapter

Conguring the Storage Manager and ON-Bar


In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 3-3 3-3 3-4 3-5 3-6 3-7 3-7 3-7 3-8 3-9 3-10 3-10 3-12 3-12 3-12 3-13 3-15 3-19 3-20 3-20 3-21 3-22 3-23

Conguring a Storage Manager . . . . . . . . . . . Installing and Conguring a Third-Party Storage Manager. Conguring ISM . . . . . . . . . . . . . . . Updating the sm_versions File . . . . . . . . . . Conguring Multiple Storage Managers on Coserver Nodes

Conguring ON-Bar . . . . . . . . . . . . . . . . . Creating the bargroup Group . . . . . . . . . . . . . Updating the onbar Script . . . . . . . . . . . . . . Setting ISM Environment Variables and ONCONFIG Parameters Specifying the Location of the XBSA Library. . . . . . . . Using ON-Bar Conguration Parameters . . . . . . . . . Using ON-Bar Conguration Parameters on Dynamic Server . Using ON-Bar Conguration Parameters on Extended Parallel Server . . . . . . . . . . . . Conguring Multiple Storage Managers . . . . . . . Global Conguration Parameters . . . . . . . . . Storage-Manager Specic Conguration Parameters . . Examples of ON-Bar and Storage-Manager Congurations Before You Make a Test Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . .

Choosing Storage Managers and Storage Devices Features That ISM Supports . . . . . . Features That ISM Does Not Support . . . Storage Device Requirements . . . . . . Considerations for Extended Parallel Server .

3-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter provides the information that you need to plan and set up ON-Bar with a storage manager:
s s s s

Installing and conguring the storage manager Conguring ON-Bar Before you make a test backup Choosing storage managers and storage devices

Conguring a Storage Manager


This section discusses installing and conguring a storage manager.

Installing and Conguring a Third-Party Storage Manager


Storage managers have slightly different installation and conguration requirements. Make sure that you follow the manufacturers instructions carefully. If you have difculty with the storage-manager installation and conguration, please contact the manufacturer directly. For the list of certied storage managers for your ON-Bar version, consult your Informix sales representative. Important: Some storage managers let you specify the kind of data to back up to specic storage devices. Congure the storage manager to back up logical logs to one device and storage spaces to a different device for more efcient backups and restores.

Configuring the Storage Manager and ON-Bar 3-3

Conguring ISM

To congure a third-party storage manager


1. 2.

Set ON-Bar conguration parameters and environment variables. Congure the storage manager so that ON-Bar can communicate correctly with it. For information, see your storage-manager documentation. Congure your storage devices. To congure your storage devices, follow instructions in your storage-manager documentation. The storage manager must know the device names of the storage devices that it should use.

3.

4. 5. 6. 7.

Label your storage volumes. Mount the storage volumes on the storage devices. Update the storage-manager denition in the sm_versions le. For more information, see Updating the sm_versions File on page 3-5. Verify that the BAR_BSALIB_PATH conguration parameter points to the correct XBSA shared library for your storage manager. For more information, see Specifying the Location of the XBSA Library on page 3-9.

After you congure the storage manager and storage devices and label volumes for your database server and logical-log backups, you are ready to initiate a backup or restore operation with ON-Bar.

Conguring ISM
For instructions on how to set up ISM to work with ON-Bar, see the Informix Storage Manager Administrators Guide. The ISM server is installed with the Informix database server on UNIX, Windows NT, or Windows 2000. Several database server instances can share one ISM instance. Warning: Install one copy of ISM on each computer to prevent possible conicts with the XBSA shared library. Do not run ISM and Legato NetWorker on the same computer because they conict with each other.

3-4

IBM Informix Backup and Restore Guide

Updating the sm_versions File

Updating the sm_versions File


The storage manager must have an entry in the sm_versions le. If you are using ISM, put ism in the sm_name eld of sm_versions. To nd out which code name to use in sm_versions for third-party storage managers, see the storage-manager documentation. The storage-manager denition in the sm_versions le uses this format:
1|XBSA_ver|sm_name|sm_ver

XBSA_ver is the release version of the XBSA shared library for the storage

manager, sm_name is the name of the storage manager, and sm_ver is the storage-manager version. No eld can be longer than 18 characters. The following example shows the ISM denition in the sm_versions le:
1|1.0.1|ism| ISM.2.20.UC1.114|

Before ON-Bar starts a backup or restore process, it calls the currently installed version of the storage-manager-specic XBSA shared library to get its version number. If this version is compatible with the current version of ON-Bar and is dened in the sm_versions le, ON-Bar begins the requested operation. To update the storage-manager denition in sm_versions
1.

Copy the sm_versions.std template to a new le, sm_versions in the $INFORMIXDIR/etc directory on UNIX or the %INFORMIXDIR%\etc directory on Windows. If you are using ISM, issue the ism_startup -init command to automatically update sm_versions with the correct version number and storage-manager name or manually edit sm_versions. If you are installing an ISM patch, you must manually edit sm_versions.

2.

Warning: The ism_startup -init command erases records of previous backups.


3.

If you are using a third-party storage manager, the vendor supplies the denition for the sm_versions le. Create your own sm_versions le with the correct data for the storage manager using the format in sm_versions.std as a template.

Configuring the Storage Manager and ON-Bar 3-5

Conguring Multiple Storage Managers on Coserver Nodes

XPS

4.

If all coservers share the sm_versions le in the etc subdirectory, the sm_versions le should have an entry for each storage-manager brand. If the etc subdirectory is not shared between coserver nodes, specify one line in the sm_versions le for the storage manager in use on that coserver node.

5.

Stop any ON-Bar processes (onbar_d, onbar_w, or onbar_m) that are currently running and restart them for the changes to take effect.

XPS

Conguring Multiple Storage Managers on Coserver Nodes


Extended Parallel Server allows multiple storage-manager instances, but only one instance per node. You can congure and use different storagemanager brands for different purposes. For best performance, run onbarworker processes on all nodes that have storage devices. For example, you have two storage devices, a tape drive and a jukebox, and want to connect them on different nodes. When an onbar-worker is on each node, the data moves faster because it does not have to travel over the network. For complex examples, see Using ON-Bar Conguration Parameters on Extended Parallel Server on page 3-12. For information on how to update the sm_versions le when using multiple storage managers, see step 4 in To update the storage-manager denition in sm_versions on page 3-5. Some third-party storage managers have a client/server architecture. For these storage managers, one instance per node means one storage-manager client. Important: Each hardware MPP node that contains a coserver that runs onbar-worker processes must have a local copy of the storage-manager version of the XBSA shared library.

3-6

IBM Informix Backup and Restore Guide

Conguring ON-Bar

Validating Your Storage Manager


When you convert or revert an Informix database server, the storage manager that you used on the old version might not be validated for the version that you are migrating to. Verify that the storage-manager vendor has successfully completed the Informix validation process for database server version and platform. If not, you need to install a validated storage manager before you perform backups with ON-Bar.

Conguring ON-Bar
ON-Bar is installed with your Informix database server software. To use ON-Bar with installed storage managers, you set specic parameters in the ONCONFIG le. The following section describes the required ON-Bar cong-

uration parameters.
IDS XPS

Use the oncong.std le as a template. Use the oncong.std le as a template for single coservers. Use the oncong.xps le as a template for multiple coservers.

UNIX

Creating the bargroup Group


If you want users other than informix or root to execute ON-Bar commands, you can create a bargroup group. Members of bargroup can execute ON-Bar commands. The bargroup group on UNIX is similar to the Informix-Admin group on Windows. For instructions on how to create a group, see your UNIX documentation.

Updating the onbar Script


When the installation program installs the database server les, including the ON-Bar les, the onbar script is distributed as a shell script so that users can add any preprocessing or postprocessing steps to the script.

Configuring the Storage Manager and ON-Bar 3-7

Setting ISM Environment Variables and ONCONFIG Parameters

To prevent the loss of user changes in the existing onbar script, the onbar script is distributed as a le named onbar.sh (UNIX) or onbar.bat (Windows). When the install program installs the database server les over an existing installation, it checks whether any difference exists between the new onbar script and the old onbar script.
s

If the two scripts are the same, the installation program renames the onbar.sh or onbar.bat le to onbar, the new onbar script overwrites the old onbar script, and no user data is lost. If a difference exists between the new onbar script and the old onbar script, the installation program renames the onbar.sh or onbar.bat le to onbar, renames the old onbar script to the form onbar.date, and issues a message to the user that the existing onbar script was renamed.

If you see a message that the old onbar script has been renamed by appending a date, look at the new onbar script (lename onbar) and integrate the contents of the old onbar script into the new onbar script. For example, if onbar has been renamed to onbar.2000.12.15, integrate the contents of onbar.2000.12.15 into onbar. For information on using the onbar script, see Customizing ON-Bar and Storage-Manager Commands on page 8-3. For information on installing the database server, see your Installation Guide.

Setting ISM Environment Variables and ONCONFIG Parameters


When you use ISM, you need to set certain environment variables. For information, see the Informix Storage Manager Administrators Guide.
IDS

You can set these environment variables in the onbar script or in your environment. You can set these environment variables in your environment if you start onbar -w by hand or before you start the database server, or set them in start_worker.sh.

XPS

3-8

IBM Informix Backup and Restore Guide

Specifying the Location of the XBSA Library

If you use ISM, you can specify the volume pool names for storage spaces and logical logs in the ISM_DATA_POOL and ISM_LOG_POOL parameters in the ONCONFIG le. If you do not set these parameters, they default to the volume pool names ISMData and ISMLogs, respectively.

Specifying the Location of the XBSA Library


UNIX

By default, ON-Bar looks for the XBSA shared library in $INFORMIXDIR/lib/libbsa.s[ol] on UNIX. To specify a different name or location of the XBSA shared library, use the BAR_BSALIB_PATH conguration parameter. You can also make /usr/lib/ibsad001.s[ol] a symbolic link to the correct library. For example, if you are using ISM, you can do either of the following:
s s

link /usr/lib/ibsad001.so to $INFORMIXDIR/lib/libbsa.so set BAR_BSALIB_PATH to $INFORMIXDIR/lib/libbsa.so

Windows

On Windows, because no default XBSA shared library name exists, you must specify its name and location in the BAR_BSALIB_PATH conguration parameter. If you are using ISM, set BAR_BSALIB_PATH to %ISMDIR%\bin\libbsa.dll. If you are using a third-party storage manager, ON-Bar must use the version of the XBSA library that the storage-manager manufacturer provides. For more information, see BAR_BSALIB_PATH on page 9-10 and your release notes.

XPS

The XBSA library must be present on each coserver node where you are running onbar-worker processes. Each onbar_worker needs to dynamically link to the functions in the XBSA library. The XBSA library must be either on a local disk or NFS-mounted disk. To nd out whether onbar_workers can share libraries and whether the sharing can be done through NFS, check your storage-manager documentation.

Configuring the Storage Manager and ON-Bar 3-9

Using ON-Bar Conguration Parameters

You can specify BAR_BSALIB_PATH in the global section of the ONCONFIG le if you congure:
s s

The XBSA shared library to have the same path on all nodes Storage managers from more than one vendor if each shared XBSA library has the same path on each node, which is not NFS-mounted If each XBSA library uses a different path, you must specify BAR_BSALIB_PATH in each storage-manager-specic section of the ONCONFIG le.

Using ON-Bar Conguration Parameters


Before you begin your rst backup, review the default ON-Bar parameters in the ONCONFIG le and adjust the values as needed. For more information, see Before You Make a Test Backup on page 3-19. For the complete list of database server conguration parameters and their default values, see the Administrators Reference.

IDS

Using ON-Bar Conguration Parameters on Dynamic Server


ON-Bar on Dynamic Server uses the following conguration parameters.

Conguration Parameter ALARMPROGRAM

Reference page 9-7

Purpose Species a script that handles alarms For ON-Bar, set this script to log_full.sh to automatically back up log les when they become full.

BAR_ACT_LOG BAR_BSALIB_PATH

page 9-8 page 9-10

Species the location and name for the ON-Bar activity log le. Species the path of the storage-manager library on UNIX or a dll on Windows To determine if BAR_BSALIB_PATH is supported on your platform, check your release notes.

BAR_HISTORY

page 9-12

Species whether the sysutils database maintains the backup history (1 of 2)

3-10

IBM Informix Backup and Restore Guide

Using ON-Bar Conguration Parameters on Dynamic Server

Conguration Parameter BAR_MAX_BACKUP BAR_NB_XPORT_COUNT BAR_PROGRESS_FREQ BAR_RETRY

Reference page 9-14 page 9-15 page 9-16 page 9-17

Purpose Species the maximum number of processes per onbar command Species the number of shared-memory data buffers for each onbar_d worker or child process Species in minutes how frequently the backup or restore progress messages display in the activity log Species how many times ON-Bar should retry a backup, logical-log backup, or restore operation if the rst attempt fails Species the size in pages of the buffers that the database server uses to exchange data with each onbar_d worker or child process Species the volume pool that you use for backing up storage spaces (ISM) Species the volume pool that you use for backing up logical logs (ISM) For ontape, species the tape device where logical logs are backed up For ON-Bar, species whether to back up logs.

BAR_XFER_BUF_SIZE

page 9-22

ISM_DATA_POOL ISM_LOG_POOL LTAPEDEV

page 9-24 page 9-25 page 9-26

RESTARTABLE_RESTORE

page 9-27

Turns restartable restore on or off (2 of 2)

Configuring the Storage Manager and ON-Bar 3-11

Using ON-Bar Conguration Parameters on Extended Parallel Server

XPS

Using ON-Bar Conguration Parameters on Extended Parallel Server


The ONCONFIG le contains a section for global parameters and individual sections for each storage-manager instance. You might need to specify multiple instances of storage managers to back up and restore data to all the coservers in Extended Parallel Server.

Conguring Multiple Storage Managers


In Extended Parallel Server, you can use more than one storage-manager product, as follows:
s s

Different versions of a particular storage manager Storage managers from different vendors

If you use the oncong.std template to congure a single coserver with one storage manager, copy the section Storage-Manager instances from oncong.xps into your ONCONFIG le. Use the oncong.xps template to congure multiple storage managers. Warning: Be careful not to get the shared libraries for the two products or versions mixed up.

Global Conguration Parameters


The global section includes parameters that apply to all storage managers. You can include ON-Bar parameters in the global section if they are the same for all storage-manager instances. Put these parameters in the storage-manager section between the BAR_SM and END pair if they are different for each storage-manager instance.

3-12

IBM Informix Backup and Restore Guide

Using ON-Bar Conguration Parameters on Extended Parallel Server

Storage-Manager Specic Conguration Parameters


You must dene each storage-manager client that you install and congure in the storage-manager section, as illustrated in Dening a Storage Manager on a Five-Coserver System on page 3-16.
Can Be StorageManager Specic Always StorageManager Specic

Conguration Parameter BAR_ACT_LOG BAR_BOOT_DIR BAR_BSALIB_PATH

Reference page 9-8 page 9-9 page 9-10

Purpose Species the location and name for the ON-Bar activity log le. Species the directory for the emergency boot les Species the path of the storagemanager library To determine if BAR_BSALIB_PATH is supported on your platform, check your release notes. Specify BAR_BSALIB_PATH in the storage-manager section if the libraries are not in the same location on all nodes.

Always Global

BAR_DBS_COSVR

page 9-11

Species coservers that send backup and restore data to the storage manager Species whether the sysutils database maintains a backup history Species the maximum number of minutes that an onbar-worker process is idle before it is shut down Species coservers that send log backup data to the storage manager

BAR_HISTORY

page 9-12

BAR_IDLE_TIMEOUT

page 9-13

BAR_LOG_COSVR

page 9-13

(1 of 3) Configuring the Storage Manager and ON-Bar 3-13

Using ON-Bar Conguration Parameters on Extended Parallel Server

Conguration Parameter BAR_PROGRESS_FREQ

Reference page 9-16

Purpose Species in minutes how frequently the backup or restore progress messages display in the activity log Species how many times ON-Bar should retry a backup, logical-log backup, or restore operation if the rst attempt fails Species the storage-manager number Is required; starts the storagemanager section.

Can Be StorageManager Specic

Always StorageManager Specic

Always Global

BAR_RETRY

page 9-17

BAR_SM

page 9-19

BAR_SM_NAME BAR_WORKER_COSVR

page 9-19 page 9-20

Species the storage-manager name Lists the coservers that can access the storage manager This parameter is required.

BAR_WORKER_MAX

page 9-21

Species the maximum number of onbar-worker processes that the Backup Scheduler can start for this storage-manager instance You can start additional onbarworker processes manually.

BAR_XFER_BUFSIZE

page 9-23

Species the size in pages of the buffers used between XPS and each onbar-worker process Species the number of sharedmemory data buffers for each onbar-worker process

BAR_XPORT_COUNT

page 9-24

(2 of 3)

3-14

IBM Informix Backup and Restore Guide

Using ON-Bar Conguration Parameters on Extended Parallel Server

Conguration Parameter ISM_DATA_POOL ISM_LOG_POOL LOG_BACKUP_MODE

Reference page 9-24 page 9-25 page 9-25

Purpose Species the volume pool that you use for backing up storage spaces Species the volume pool that you use for backing up logical logs Species whether to back up full logical-log les automatically or manually

Can Be StorageManager Specic

Always StorageManager Specic

Always Global

(3 of 3)

Examples of ON-Bar and Storage-Manager Congurations


This section shows sample storage-manager congurations for Extended Parallel Server. For more information about each conguration parameter, refer to Chapter 9, Setting ON-Bar Conguration Parameters.

Creating a Storage-Manager Denition


The following conguration example is for a storage manager that can run on coservers 1, 2, 3, 4, and 7. In this conguration, you have to start onbar-worker processes manually on coservers 1, 2, 3, 4, and 7, because BAR_WORKER_MAX is not set. All storage spaces and logical logs are backed up to this storage-manager instance.
# Backup/Restore Variables BAR_ACT_LOG /tmp/bar_act.log # Path of activity log BAR_RETRY 2 # Number of times to retry failures BAR_XPORT_COUNT 10 # Number of transport buffers per worker BAR_XFER_BUFSIZE 8 # Size of each transport buffer in pages LOG_BACKUP_MODE CONT # Backup as soon as logical log fills BAR_IDLE_TIMEOUT 5 # How long onbar-workers wait BAR_BSALIB_PATH /usr/lib/ibsad001.so # XBSA shared lib path # Storage-Manager Section BAR_SM 1 BAR_WORKER_COSVR 1-4,7 END

Configuring the Storage Manager and ON-Bar 3-15

Using ON-Bar Conguration Parameters on Extended Parallel Server

Dening a Storage Manager on a Five-Coserver System


The following example is a simple storage-manager denition that automatically starts a single onbar-worker process on coserver 1. Data on coservers 1 through 5 is backed up or restored to the storage manager on coserver 1. If you omit the BAR_WORKER_MAX parameter, you must start onbar-worker processes manually. For more information, see Using start_worker.sh to Start onbar_worker Processes Manually on page 8-7.
# Storage Manager instances BAR_SM 1 # Storage manager ID BAR_SM_NAME A # Storage manager name BAR_WORKER_COSVR 1 # Storage mgr is on coserver 1 BAR_DBS_COSVR 1-5 # Route dbspaces to this storage mgr BAR_LOG_COSVR 1-5 # Route logs to this storage mgr BAR_WORKER_MAX 1 # Number of onbar-workers END

Dening the Number of onbar-worker Processes on Two Storage Managers


The following example denes different storage managers on two coservers. Because the global BAR_WORKER_MAX value is 3, the Backup Scheduler will start up to 3 onbar-worker processes on coserver 2 for storage-manager BAKER. For storage-manager ABEL, the local BAR_WORKER_MAX value overrides the global setting, so the Backup Scheduler will start only one onbar-worker process.
# Global section BAR_WORKER_MAX 3 # Global value for no. of onbar-workers

# Storage Manager ABEL BAR_SM 1 BAR_WORKER_MAX 1 # only one onbar-worker defined BAR_DBS_COSVR 1 BAR_LOG_COSVR 1 BAR_WORKER_COSVR 1 END # Storage Manager BAKER BAR_SM 2 BAR_DBS_COSVR 2 BAR_LOG_COSVR 2 BAR_WORKER_COSVR 2 END

3-16

IBM Informix Backup and Restore Guide

Using ON-Bar Conguration Parameters on Extended Parallel Server

Important: Do not switch the BAR_SM identication numbers between different storage managers when you recongure the storage managers, or else ON-Bar cannot nd the backup objects. For example, do not reassign BAR_SM 1 to storage-manager BAKER and BAR_SM 2 to storage-manager ABEL.

Dening Three Storage Managers and Storage Devices


The conguration in Figure 3-1 on page 3-18 shows how you might set up three storage managers and three backup devices:
s

A, a silo with two drives and two connections, one to coserver 1 and the other to coserver 3 B, a tape autochanger connected to coserver 4 C, a simple tape drive connected to coserver 2

s s

Configuring the Storage Manager and ON-Bar 3-17

Using ON-Bar Conguration Parameters on Extended Parallel Server

Storage-manager ABEL can back up and restore storage spaces on coservers 1 and 3. Storage-manager BAKER can back up and restore storage spaces on coservers 4 and 2. Storage-manager CHARLY can back up and restore logs on all four coservers.
Figure 3-1 Storage-Manager Conguration

Coserver 1

Coserver 2

Coserver 3

Coserver 4

Storage-manager CHARLY

Storage-manager ABEL

Storage-manager BAKER

Backup device C

Backup device A

Backup device B

Storage manager can back up and restore logs on these coservers. Storage manager can back up and restore storage spaces on these coservers. XBSA shared library for storage manager is available on this coserver.

3-18

IBM Informix Backup and Restore Guide

Before You Make a Test Backup

The ONCONFIG denitions for storage-managers ABEL, BAKER, and CHARLY appear in the following example:
# Storage manager section for storage manager A BAR_SM 1 BAR_SM_NAME ABEL BAR_WORKER_COSVR 1,3 BAR_DBS_COSVR 1,3 BAR_LOG_COSVR 0 BAR_WORKER_MAX 2 END # Storage manager section for storage manager B BAR_SM 2 BAR_SM_NAME BAKER BAR_WORKER_COSVR 4 BAR_DBS_COSVR 2,4 BAR_LOG_COSVR 0 BAR_WORKER_MAX 1 END # Storage manager section for storage manager C BAR_SM 3 BAR_SM_NAME CHARLY BAR_WORKER_COSVR 2 BAR_DBS_COSVR 0 BAR_LOG_COSVR 1 - 4 BAR_WORKER_MAX 1 END

Before You Make a Test Backup


Check the items in the following list to make sure that ON-Bar and your storage manager are set up correctly:
s

The storage manager is installed and congured to manage specic storage devices. Make sure that the BAR_BSALIB_PATH conguration parameter species correctly the XBSA shared library or it is not set and the library is in the default location. Make sure that the BAR_BSALIB_PATH conguration parameter species correctly the XBSA shared library. The sm_versions le contains a row that identies the version number of the storage-manager-specic XBSA shared library. The BAR_WORKER_MAX parameter is set to a number greater than 0 in the storage-manager-specic section of the ONCONFIG le.
Configuring the Storage Manager and ON-Bar 3-19

UNIX

WIN NT/2000

XPS

Choosing Storage Managers and Storage Devices

After you verify that ON-Bar and your storage manager are set up correctly, run ON-Bar on your test database to make sure that you can back up and restore data. For more information, follow the instructions in Chapter 4, Backing Up with ON-Bar.

Choosing Storage Managers and Storage Devices


The storage manager manages the storage devices to which the backed-up data is written. ISM is included with your database server. For information on how to use ISM, refer to the Informix Storage Manager Administrators Guide. If you choose a different storage manager, consider whether it has the features that you need to back up your storage spaces and logical logs. When you choose storage devices, make sure that they are compatible with the storage manager that you choose. The storage devices should have the speed and capacity that your backups require. The storage manager should be easy to use and work on your operating system.

Features That ISM Supports


ISM fullls the following storage-manager requirements:
s

ISM allows you to back up logical logs and storage spaces to different

devices and to specify whether to use encryption or compression for data.


s

ISM can write the output of parallel backups to a single device, medium, or volume. Some backup devices can write data faster than the disks used to hold storage spaces can be read. ISM can automatically switch from one tape device to another when

the volume in the rst device lls.


s

ISM allows migration of data from one backup medium to another.

For speed, you can back up logical logs or storage spaces to disk, but you must move them later to tape or other removable media or your disk will become full.

3-20

IBM Informix Backup and Restore Guide

Features That ISM Does Not Support

ISM allows you to clone copies of backup data for on-site and off-site

storage.
s

ISM uses automatic expiration of data. Once all data on a backup media expires, you can reuse the media.

Features That ISM Does Not Support


ISM does not support the following features. Third-party storage managers might support these features.
s

Distributing a single data stream across multiple devices simultaneously, which improves throughput if you have several slow devices Using different encryption or compression methods for specied storage spaces or databases Scheduling backups Support for devices such as tape libraries, jukeboxes, silos, tape autochangers, and stackers Remote host operations You can install some storage managers on a different host from the database server. However, ISM must be installed on the same host as the database server.

s s

Configuring the Storage Manager and ON-Bar 3-21

Storage Device Requirements

Storage Device Requirements


Ask the following interrelated questions to determine what storage devices you need. For example, the speed and type of storage devices partly determine the number of storage devices that you need.
s

What kind of storage devices do you need? The transaction volume and the size of your database are major factors in determining the kind of storage devices that you need.
ISM supports simple tape devices such as QIC, 4mm, 8mm, DLT, optical devices, and disk backups. If ISM cannot manage the storage

devices that you need, you need to purchase a different storage manager. For more information, see the Informix Storage Manager Administrators Guide.
s

What is the availability requirement for each device? Is it important for your storage devices to allow random as well as sequential access? If so, you cannot use tape storage devices.

How many storage devices do you need?


ISM supports up to four devices per host. The number of storage devices that you need depends on the kind of storage devices you have, how much transaction activity occurs on the database server, how fast throughput is, how much time you can allow for backups, and other similar factors.

XPS

How many and what type of storage-manager instances should you congure? You can have one storage manager on each coserver node.

3-22

IBM Informix Backup and Restore Guide

Considerations for Extended Parallel Server

XPS

Considerations for Extended Parallel Server


Because backing up data on multiple coservers is much more complex, some Extended Parallel Server users use third-party storage managers. The following usage requirements also affect your decisions about the storage manager and storage devices:
s

The number of hardware nodes, the number of coservers on those nodes, and how the coservers are distributed across the nodes Balance these factors against the number of storage devices and storage-manager instances. The architecture of some platforms limits where you can attach devices, but the number of coservers increases processing requirements. The storage-manager sections of the ONCONFIG le should reect these considerations. Although some nodes in a massively parallel processing (MPP) system might not be running coservers, they might be able to run part of the storage manager.

The kind of high-speed interconnect on the MPP system Because disks are slower than the high-speed interconnect, they could create a bottleneck in the interconnect. Distributing devices across multiple nodes might reduce the amount of trafc across the interconnect and allow more parallelism.

If you isolate tables or databases in a single storage space or in a dbslice across coservers, you can restore single tables or databases. Whether it is possible to restore data from external sources Although Decision Support System (DSS) databases might not be mirrored, they might be easier to re-create from the original external source than to restore from backups if they are corrupted or damaged. For Online Transaction Processing (OLTP) systems, regenerating data from external sources is rarely possible.

Configuring the Storage Manager and ON-Bar 3-23

Considerations for Extended Parallel Server

The size of each logical-log stream, how the transaction activity is distributed across logical-log streams, and when it occurs If you are running an OLTP system with many transactions evenly distributed across coservers, your storage manager and storagedevice requirements are different from a DSS, which usually generates few transactions. In addition, if logstreams are the same size on each coserver but activity is not evenly distributed, space and resources are wasted. You should adjust them for efciency.

3-24

IBM Informix Backup and Restore Guide

Chapter

Backing Up with ON-Bar

4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 4-4 4-5 4-5 4-6 4-7 4-7 4-7 4-7 4-8 4-8 4-8 4-8 4-9 4-9 4-9 4-10 4-10 4-11 4-14 4-14 4-15 4-15 4-16 4-16 4-16 4-17 4-17

In This Chapter .

. .

. .

. .

. .

. .

. .

. .

. .

. .

. .

Syntax of ON-Bar Commands .

Preparing for a Backup . . . . . . . . . . . . . . What Data Does ON-Bar Back Up? . . . . . . . . . Which Administrative Files to Back Up? . . . . . . . Installing and Conguring a Storage Manager . . . . . What Is a Whole-System Backup? . . . . . . . . . What Is a Standard Backup? . . . . . . . . . . . What Is a Physical Backup? . . . . . . . . . . . Choosing a Backup Level . . . . . . . . . . . . Level-0 Backups . . . . . . . . . . . . . . Level-1 Backups . . . . . . . . . . . . . . Level-2 Backups . . . . . . . . . . . . . . Collecting Information About Your System Before a Backup Ensuring That You Have Enough Logical-Log Space . Copying Database Server Conguration Information . Verifying Database Integrity . . . . . . . . . .

Backing Up Storage Spaces and Logical Logs . . . . . . . . . . Backup Syntax . . . . . . . . . . . . . . . . . . . Backing Up After Changing the Physical Schema . . . . . . . When to Back Up the Root Dbspace and Modied Storage Spaces When to Back Up the Modied Storage Spaces Only . . . . Using ISM During a Backup . . . . . . . . . . . . . . Using Informix Server Administrator to Back Up and Verify . . . ON-Bar Backup Examples . . . . . . . . . . . . . . . Performing a Level-0 Backup of All Storage Spaces . . . . . Performing a Level-0 Backup of Specied Storage Spaces . . . Performing an Incremental Backup . . . . . . . . . .

Backing Up a List of Storage Spaces Specied in a File . Backing Up Specic Tables . . . . . . . . . . Retrying Skipped Storage Spaces During a Backup . . Performing a Whole-System Backup . . . . . . . Backing Up Smart Large Objects in Sbspaces . . . . Using Fake Backups in a Data Warehouse . . . . . Backing Up Blobspaces in a Logging Database . . . . Backing Up Logical Logs When Blobspaces Are Ofine. Assigning a Name to a Backup Session . . . . . . Performing a Physical Backup . . . . . . . . . Backing Up a Dbslice . . . . . . . . . . . . Backing Up Table Types . . . . . . . . . . . . . Backing Up Logical Logs . . . . . . . . . . . . . . Backing Up Logical Logs on Dynamic Server . . . . . Performing a Continuous Backup of Logical Logs . . Performing a Manual Backup of Logical Logs . . . . Using ALARMPROGRAM to Set the Log Backup Mode Backing Up Logical Logs on Extended Parallel Server . . Performing a Manual Backup of Logical Logs . . . . Starting Continuous Logical-Log Backups . . . . . Preventing Logical-Log Backups in a Test System . . . Monitoring Logical-Log Backups . . . . . . . . . . Salvaging Logical-Log Files. . . . . . . . . . . . Skipping Logical Replay . . . . . . . . . . . . . Restoring Nonlogging Databases and Tables . . . . . . Understanding ON-Bar Backup Processes . . . . Backup Sequence on Dynamic Server . . . . Backup Sequence on Extended Parallel Server . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . .

4-17 4-18 4-18 4-19 4-19 4-19 4-20 4-20 4-21 4-21 4-21 4-22 4-22 4-23 4-24 4-25 4-25 4-25 4-27 4-27 4-28 4-28 4-29 4-29 4-30 4-31 4-31 4-33

4-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter explains how to use the onbar utility to back up and verify storage spaces (dbspaces, blobspaces, and sbspaces) and logical-log les. The onbar utility is a wrapper to onbar_d, the ON-Bar driver. Use any of the following methods to execute ON-Bar backup and restore commands:
s

Issue ON-Bar commands. To execute ON-Bar commands, you must be user informix or root or a member of the bargroup group on UNIX or a member of the Informix-Admin group or user informix in Windows. (For more information, see Creating the bargroup Group on page 3-7.)

Include ON-Bar and ISM commands in a shell or batch script. For information, see Customizing ON-Bar and Storage-Manager Commands on page 8-3.

s s

Call ON-Bar from a job-scheduling program. Set event alarms that trigger a logical-log backup. For information, see Backing Up Logical Logs on Dynamic Server on page 4-23 and Backing Up Logical Logs on Extended Parallel Server on page 4-25.

Backing Up with ON-Bar 4-3

Syntax of ON-Bar Commands

Syntax of ON-Bar Commands


You can use ON-Bar to back up and restore storage spaces and logical logs, to verify a backup, and to start or stop ON-Bar sessions.

onbar

Backing Up Storage Spaces p. 4-10 Backing Up Logical-Log Files p. 4-22 Verifying Backups with archecker (-v) p. 5-7 Performing a Restore p. 6-10 Performing an External Restore p. 7-19 Starting and Stopping ON-Bar Sessions p. 8-14

IDS

XPS

4-4

IBM Informix Backup and Restore Guide

Preparing for a Backup

Preparing for a Backup


This section explains the preliminary steps that you must take before you back up storage spaces and logical logs.

What Data Does ON-Bar Back Up?


ON-Bar backs up the following types of data. ON-Bar backs up the critical

dbspaces rst, then the remaining storage spaces, and nally the logical logs. (The critical dbspaces are the rootdbs and the dbspaces that contain the logical logs and physical log.) ON-Bar can back up and restore the largest storage space that your database server supports.
Data Type Dbspaces that contain tables or indexes Blobspaces (IDS) ISM catalog Logical-log les Sbspaces (IDS) Description See Backing Up Storage Spaces and Logical Logs on page 4-10. ON-Bar also backs up the reserved pages in the root dbspace. See Backing Up Blobspaces in a Logging Database on page 4-20. If you use ISM, the ISM catalog is in $INFORMIXDIR/ism on UNIX and %ISMDIR% on Windows. See Backing Up Logical Logs on page 4-22. See Backing Up Smart Large Objects in Sbspaces on page 4-19.

Backing Up with ON-Bar 4-5

Which Administrative Files to Back Up?

Which Administrative Files to Back Up?


ON-Bar backups safeguard your data. They do not replace normal operating-

system backups of important conguration les. Important: For use in an emergency, you should have a backup copy of the current version of the following administrative les. You will need to restore these les if you need to replace disks or if you restore to a second computer system (imported restore). The following table lists the administrative les that you should back up.
Administrative Files ONCONFIG le Emergency boot les sm_versions le The sqlhosts le (UNIX) The oncfg_servername.servernum le in the etc subdirectory The oncfg_servername.servernum.coserverid le from each coserver Storage-manager conguration and data les Simple-large-object data in blobspaces that are stored on disks or optical platters The xcfg_servername.servernum le in the etc subdirectory Externally stored data such as external tables that a DataBlade maintains

IDS

XPS

Although ON-Bar does not back up the following items, ON-Bar automatically re-creates them during a restore. You do not need to make backup copies of these les:
s

The dbspace pages that are allocated to the database server but that are not yet allocated to a tblspace extent Mirror chunks, if the corresponding primary chunks are accessible Temporary dbspaces
ON-Bar does not back up or restore the data in temporary dbspaces.

s s

Upon restore, the database server re-creates empty temporary dbspaces.


4-6 IBM Informix Backup and Restore Guide

Installing and Conguring a Storage Manager

Installing and Conguring a Storage Manager


Before you can create a backup with ON-Bar, you must congure your storage manager and start it. For information about conguring ISM, see the Informix Storage Manager Administrators Guide. For information about conguring third-party storage managers, see Chapter 3, Conguring the Storage Manager and ON-Bar,and your storage-manager manuals. Make sure your storage manager is ready to receive data before you begin a backup or restore. To improve performance, Informix recommends that you reserve separate storage devices for storage-space and logical-log backups. Label and mount all volumes in the storage device. The backup or restore might pause until you mount the requested tape or optical disk.

IDS

What Is a Whole-System Backup?


A whole-system backup (onbar -b -w) is a serial backup of all storage spaces and logical logs based on a single checkpoint. That time is stored with the backup information. The advantage of using a whole-system backup is that you can restore the storage spaces with or without the logical logs. Because the data in all storage spaces is consistent in a whole-system backup, you do not need to restore the logical logs to make the data consistent. For an example, see Performing a Whole-System Backup on page 4-19.

What Is a Standard Backup?


A standard backup (onbar -b) is a parallel backup of selected or all storage spaces and the logical logs. In a standard backup, the database server performs a checkpoint for each storage space as it is backed up. Therefore, you must restore the logical logs from a standard backup to make the data consistent. For an example, see Performing a Level-0 Backup of All Storage Spaces on page 4-16.

XPS

What Is a Physical Backup?


A physical backup (onbar -b -p) backs up just the storage spaces. You can back up specic or all storage spaces.

Backing Up with ON-Bar 4-7

Choosing a Backup Level

Choosing a Backup Level


ON-Bar supports level-0, level-1, and level-2 backups.

Tip: It is good practice to create a backup schedule that keeps level-1 and level-2 backups small and to schedule frequent level-0 backups. With such a backup schedule, you avoid having to restore large level-1 and level-2 backups or many logical-log backups.

Level-0 Backups
Level-0 backups can be time consuming because ON-Bar writes all the disk pages to backup media. Level-1 and level-2 backups might take almost as much time as a level-0 backup because the database server must scan all the data to determine what has changed since the last backup. It takes less time to restore data from level-0, level-1, and level-2 backups than from level-0 backups and a long series of logical-log backups.

Level-1 Backups
A level-1 backup takes less space and might take less time than a level-0 backup because only data that changed since the last level-0 backup is copied to the storage manager. If you request an incremental backup where no previous incremental backup exists, ON-Bar automatically performs the lower-level backup. For example, if you request a level-1 backup but no level-0 backup exists for one of the dbspaces, ON-Bar automatically performs a level-0 backup of that dbspace and a level-1 backup of the other storage spaces.
IDS

If you request a whole-system level-1 backup and no level-0 backup exists, ON-Bar performs a whole-system level-0 backup. If you request a wholesystem level-2 backup but the level-1 backup does not exist, ON-Bar performs a whole-system level-1 backup.

Level-2 Backups
A level-2 backup takes less space and might take less time than a level-1 backup because only data that changed since the last level-1 backup is copied to the storage manager.

4-8

IBM Informix Backup and Restore Guide

Collecting Information About Your System Before a Backup

Collecting Information About Your System Before a Backup


To ensure that you can restore the data, perform the following tasks:
s

Print or keep a copy of essential database server conguration information. Verify data consistency. Keep track of the number of rows in each table (optional).

s s

After you complete the backup, verify it with the archecker utility. For more information, see Chapter 5, Verifying Backups.

Ensuring That You Have Enough Logical-Log Space


ON-Bar checks for available logical-log space at the beginning of a backup. If the logs are nearly full, ON-Bar backs up and frees the logs before attempting to back up the storage spaces. If the logs contain ample space, ON-Bar backs

up the storage spaces, then the logical logs. Monitor the logs so that you can back them up before they ll. If insufcient space exists in the logical log, the database server will hang. If the database server hangs, add more logical-log les and retry the ON-Bar command.
XPS

Extended Parallel Server keeps one logical log reserved for backups. That way, enough log space exists for you to back up the logical logs to free enough log space to back up storage spaces.

Copying Database Server Conguration Information


Copy the following database server conguration les. For more information, see Which Administrative Files to Back Up? on page 4-6.
s s s s s

The sqlhosts le (UNIX only) The oncfg les The emergency boot les The ONCONFIG le sm_versions le The xcfg le for the database server

XPS

Backing Up with ON-Bar 4-9

Backing Up Storage Spaces and Logical Logs

Verifying Database Integrity


To ensure the integrity of your backups, periodically verify that all database server data is consistent before you create a level-0 backup. You do not need to check for consistency before every level-0 backup. Informix recommends that you do not discard a backup that is known to be consistent until the next time that you verify the consistency of your databases. For information on using the oncheck or onutil CHECK commands, see the Administrators Reference.

Backing Up Storage Spaces and Logical Logs


You can back up storage spaces and logical logs only when the database server is in online, quiescent, or fast-recovery mode. However, you can salvage logical logs with the database server ofine. The storage-space chunks can be stored on raw disk space, in cooked les, or on an NTFS le system (Windows). Only online storage spaces are backed up. Use the onstat -d utility to determine which storage spaces are online. After you begin the backup, monitor its progress in the ON-Bar activity log and database server message log. Important: You must back up each storage space at least once. ON-Bar cannot restore storage spaces that it has never backed up.

4-10

IBM Informix Backup and Restore Guide

Backup Syntax

Backup Syntax

Backing Up Storage Spaces and Logical Logs

Back to Syntax of ON-Bar Commands p. 4-4

-b - L level
XPS XPS

IDS -O

- f lename
dbspace_list IDS

- q session -p

-w

IDS

-F

Backing Up with ON-Bar 4-11

Backup Syntax

Element -b

Purpose Species a backup Backs up the storage spaces, logical logs, including the current logical log, and the ISM catalog, if it exists.

Key Considerations You must specify the -b parameter rst. Important: During a backup, if ON-Bar encounters a down dbspace, it skips it and later returns an error.

dbspace_list

Names storage spaces to be backed up On XPS, if you enter a dbslice name, it backs up all the dbspaces in that dbslice.

If you do not enter dbspace_list or -f lename, ON-Bar backs up all online storage spaces on the database server. If you enter more than one storage-space name, use a space to separate the names.

-f lename

Backs up the storage spaces that are listed in the text le whose pathname lename provides Use this option to avoid entering a long list of storage spaces every time that you back up.

The lename can be any valid UNIX or Windows lename, including simple (listle_1), relative (../backup_lists/listle_2 or ..\backup_lists\listle2), and absolute (/usr/informix/backup_lists/listle3 or c:\informix\backup_lists\listle3) lenames. For the format of this le, see Figure 4-1 on page 4-18. The le can list multiple storage spaces per line.

-F

Performs a fake backup (IDS)

You can execute this option whether or not a storagemanager application is running. ON-Bar ignores dbspace_list if you specify it. Use fake backups to change database logging modes; to allow the user to use new logs, chunks, or mirrors without performing a backup; or in special situations when you, the administrator, judge that a backup is not needed. No backup actually occurs, so no restore is possible from a fake backup. Informix recommends that you use fake backups sparingly, if at all. If you request an incremental backup and ON-Bar nds that no previous level backup has been performed for a particular storage space, ON-Bar backs up that storage space at the previous level. For example, if you request a level-1 backup, and ON-Bar nds no level-0 backup, it makes a level-0 backup instead. For more information, see Performing an Incremental Backup on page 4-17. (1 of 2)

-L level

Species the level of backup to perform on storage spaces:


s

0 for a complete backup (The default.) 1 for changes since the last level-0 backup 2 for changes since the last level-1 backup

4-12

IBM Informix Backup and Restore Guide

Backup Syntax

Element -O

Purpose Overrides normal backup restrictions

Key Considerations Use this option to back up logical logs when blobspaces are ofine. If a log backup occurs when blobspaces are ofine, return code 178 displays in the ON-Bar activity log.

-p

Performs a physical backup (XPS) Allows you to assign a name to the backup session (XPS)

Backs up storage spaces and the ISM catalog. (If you omit the -p option, ON-Bar also backs up the logical logs.) <DBSERVERNAME><random_number> is the default session name. The session name must be unique and can be up to 127 characters. This name appears in the output from the onstat utility so that you can follow the progress of the backup. For more information, see Monitoring the Backup Scheduler Status on page 8-17.

-q session

-w

Performs a whole-system backup (IDS)

Backs up all storage spaces, critical dbspaces, and logical logs serially. If you do not save the logical logs, you must use the -w option. (2 of 2)

Backing Up with ON-Bar 4-13

Backing Up After Changing the Physical Schema

Backing Up After Changing the Physical Schema


This section describes what to back up after you change the physical schema.

When to Back Up the Root Dbspace and Modied Storage Spaces


You must perform a level-0 backup of the root dbspace and the modied storage spaces to ensure that you can restore the data after you:
s s s s s s

Add or drop mirroring. Move, drop, or resize a logical-log le. Change the size or location of the physical log. Change your storage-manager conguration. Add, move, or drop a dbspace. Add, move, or drop a chunk to any type of storage space. Add, move, or drop a blobspace or sbspace. Add or drop a dbslice or logslice.

IDS XPS

s s

For example, if you add a new dbspace dbs1, you see a warning in the message log that asks you to perform a level-0 backup of the root dbspace and the new dbspace. If you attempt an incremental backup of the root dbspace or the new dbspace instead, ON-Bar automatically performs a level-0 backup of the new dbspace.
XPS

For Extended Parallel Server, back up the root dbspace and the new or modied dbspace on the coserver where the change occurred. Tip: Although you no longer need to backup immediately after adding a log le, your next backup should be level-0 because the data structures have changed. Warning: If you create a new storage space with the same name as a deleted storage space, perform a level-0 backup twice:
1. 2.

Back up the root dbspace after you drop the storage space and before you create the new storage space with the same name. After you create the new storage space, back up the root dbspace and the new storage space.

4-14

IBM Informix Backup and Restore Guide

Using ISM During a Backup

When to Back Up the Modied Storage Spaces Only


You must perform a level-0 backup of the modied storage spaces to ensure that you can restore the data when you:
s s

Convert a nonlogging database to a logging database. Convert a raw, static, or operational table to standard. This backup ensures that the unlogged data is restorable before you switch to a logging table type.

Using ISM During a Backup


Use the ism_watch command to monitor backups and restores sent to the ISM server. During a backup, the ISM server automatically routes storage-space data to volumes in the ISMData volume pool and logical-log les to volumes in the ISMLogs volume pool. Always keep the volumes from the ISMLogs pool mounted to ensure that a storage device is always available to accept logical-log data. If the volume is not mounted, the backup will pause. For more information on using devices and ISM commands, see the Informix Storage Manager Administrators Guide. During the backup operation, ISM creates save sets of the backed up data and enters information about the backed up data in the ISM catalog. You also can use this command to back up the ISM catalog:
ism_catalog -create_bootstrap

If you use the onbar script to back up storage spaces and logical logs, it backs up the ISM catalog automatically. If you call onbar_d directly, you must use the ism_catalog -create_bootstrap command.

Backing Up with ON-Bar 4-15

Using Informix Server Administrator to Back Up and Verify

Using Informix Server Administrator to Back Up and Verify


Informix Server Administrator (ISA) is a browser-based tool for performing administrative tasks such as ON-Bar and onstat commands. You can use ISA to perform the following ON-Bar tasks:
s s

View messages in the ON-Bar activity log. Perform level-0, level-1, or level-2 backups.

Back up storage spaces (onbar -b). Back up the whole system (onbar -b -w). Override error checks during the backup (onbar -b -O). Perform a fake backup (onbar -b -F). Include the current log in the log backup (onbar -l -c). Override error checks to back up logs when blobspaces are ofine (onbar -l -O). Start a continuous logical-log backup (onbar -l -C).

Back up the logical logs.


s s

Verify backups. Edit the onbar script.

For more information, see the ISA online help.

ON-Bar Backup Examples


The following sections contain examples of ON-Bar syntax for backing up storage spaces.

Performing a Level-0 Backup of All Storage Spaces


To perform a standard, level-0 backup of all online storage spaces and used logical logs, use one of the following commands:
onbar -b onbar -b -L 0

ON-Bar never backs up ofine storage spaces, temporary dbspaces, or

temporary sbspaces.

4-16

IBM Informix Backup and Restore Guide

ON-Bar Backup Examples

Important: Save your logical logs so that you can restore from this backup.

Performing a Level-0 Backup of Specied Storage Spaces


To perform a level-0 backup of specied storage spaces and all logical logs (for example, two dbspaces named n_dbspace1 and n_dbspace2), use the -b option as the following example shows. You could also specify the -L 0 option, but it is not necessary.
onbar -b fin_dbspace1 fin_dbspace2

Performing an Incremental Backup


An incremental backup backs up all changes in the storage spaces since the last level-0 backup and performs a level-0 backup of used logical logs. To perform a level-1 backup, use the -L 1 option, as the following example shows:
onbar -b -L 1

Backing Up a List of Storage Spaces Specied in a File


To back up a list of storage spaces specied in a le and the logical logs, use the following command:
onbar -b -f /usr/informix/backup_list/listfile3

The format of the le is as follows:


s

Each line can list more than one storage space, separated by spaces or a tab. Comments begin with a # or ; symbol and continue to the end of the current line.
ON-Bar ignores all comment or blank lines in the le. ON-Bar truncates pathnames to the word after the last directory

s s

delimiter.

Backing Up with ON-Bar 4-17

ON-Bar Backup Examples

Figure 4-1 shows a sample le that contains a list of storage spaces to be backed up (blobsp2.1, my_dbspace1, blobsp2.2, dbsl.1, rootdbs.1, and dbsl.2). You can also use this le to specify a list of storage spaces to be restored.
Figure 4-1 Sample File with a List of Storage Spaces
blobsp2.1 # a comment

ignore this text

/usr/informix/my_dbspace1 # back up this dbspace ; another comment blobsp2.2 /usr/informix/dbsl.1 /usr/informix/rootdbs.1 dbsl.2 ; backing up two spaces

Backing Up Specic Tables


To back up a specic table or set of tables in ON-Bar, store these tables in a separate dbspace and then back up this dbspace. Warning: If you need to restore only that table, you must warm restore the entire dbspace to the current time (onbar -r). This procedure does not allow you to recover from accidentally dropping or corrupting a table because it would be dropped again during logical restore.

Retrying Skipped Storage Spaces During a Backup


You cannot back up storage spaces that are down or temporarily inaccessible. If a storage space is down, ON-Bar skips it during the backup and writes a message to the activity log. Take one of the following actions:
s s

Retry the backup later when the storage space is back online. Restore these storage spaces from an older backup, if available. Make sure that at least one level-0 backup of each storage space exists or else it might not be restorable. For details, see Restoring from an Older Backup on page 6-21.

4-18

IBM Informix Backup and Restore Guide

ON-Bar Backup Examples

IDS

Performing a Whole-System Backup


To perform a serial, level-0 backup of all online storage spaces and logical logs, use one of the following commands:
onbar -b -w onbar -b -w -L 0

For more details, see Performing a Whole-System Restore on page 6-20.


IDS

Backing Up Smart Large Objects in Sbspaces


You can back up smart large objects in one or more sbspaces or include them in a whole-system backup. In a level-0 backup, the entire sbspace is backed up. In a level-1 or level-2 backup, the modied sbpages in the sbspace are backed up. The following example performs a level-0 backup of the s9sbpace sbspace:
onbar -b -L 0 s9sbspace

When you turn on logging for a smart large object, you must immediately perform a level-0 backup to ensure that the object is fully recoverable. For details on logging sbspaces, see the Administrators Guide.
IDS

Using Fake Backups in a Data Warehouse


The High-Performance Loader (HPL) in Express mode loads tables in readonly mode. A backup changes the table to update mode. Use one of the following commands:
onbar -b onbar -b -F # the recommended way

Important: Informix recommends that you use fake backups on test systems, not on production systems. You cannot restore data from a fake backup. (If you performed a fake backup, you must reload the table to be able to restore the data.)

Backing Up with ON-Bar 4-19

ON-Bar Backup Examples

IDS

Backing Up Blobspaces in a Logging Database


Follow these steps when you back up blobspaces in a database that uses transaction logging:
1.

Before you back up a new blobspace, make sure that the log le that recorded the creation of the blobspace is no longer the current log le. To verify the logical-log status, use the onstat -l or xctl onstat -l command. To switch to the next log le, use the onmode -l command. Blobspaces are not available for use until the log le is not the current log le. For information on switching log les, see the onmode and onstat sections in the Administrators Reference.

2.

If you update or delete simple large objects in a blobspace, you must back up all the log les, including the current log le. If the blobspace is online, use the onbar -b -l -c command. When users update or delete simple large objects in blobspaces, the blobpages are not freed for reuse until the log le that contains the delete records is freed. To free the log le, you must back it up.

3.

Back up the blobspaces with the onbar -b or onbar -b -w command.

Warning: If you perform a warm restore of a blobspace without backing up the logical logs after updating or deleting data in it, that blobspace might not be restorable.
IDS

Backing Up Logical Logs When Blobspaces Are Ofine


To back up the logical logs when a blobspace is ofine, use the onbar -b -l -O or onbar -b -O command. If this backup is successful, ON-Bar returns 178. To salvage the logical logs, use the onbar -b -s -O command. Warning: If you back up logical logs that contain changes to a blobspace while it is ofine, the simple large objects in that blobspace will not be restorable. If an ofine blobspace has not changed, it will be restorable.

4-20

IBM Informix Backup and Restore Guide

ON-Bar Backup Examples

XPS

Assigning a Name to a Backup Session


To assign a name to a backup session, use the following command:
onbar -b -q session1

To monitor the backup session, use the onstat -g bus command.


XPS

Performing a Physical Backup


Use the -p option to perform either a level-0 or incremental backup of storage spaces only without also backing up the logical logs, as the following command shows. In the backup command, you can list the storage spaces on the command line or in a le.
onbar -b -p

To restore data, you must have previously backed up the logical logs. For more information, see Backing Up Logical Logs on Extended Parallel Server on page 4-25.

XPS

Backing Up a Dbslice
You can specify storage spaces individually or with a dbslice name. Specifying storage spaces with a dbslice name simplies backup commands. The dbslice name is translated to the names of its component storage spaces. If you back up a dbslice, ON-Bar backs up all the storage spaces in that dbslice. To back up all dbspaces in a dbslice named n_slice, use the following command:
onbar -b fin_slice

Backing Up with ON-Bar 4-21

Backing Up Table Types

Backing Up Table Types


Figure 4-2 discusses backup scenarios for six table types. For more information about the table types, see the chapter on data storage in the Administrators Guide.
Figure 4-2 Backing Up Table Types Table Type Standard Temp Scratch Operational IDS

XPS

Can You Back Up This Type of Table? Yes. No. No. Yes. If you use pload express mode to load an operational table, you cannot reliably restore the data unless you have done a level-0 backup after the load. It is not enough to just back up the logical logs. Yes. If you update a raw table, you cannot reliably restore the data unless you perform a level-0 backup after the update. Backing up only the logical logs is not enough. Yes.

Raw

Static

Important: Perform a level-0 backup before you alter a raw, static, or operational table to type STANDARD.

Backing Up Logical Logs


For background information, see What Is a Logical-Log Backup? on page 1-5. You can either back up the logical logs separately or with storage spaces. Informix recommends that you back up the logical logs as soon as they ll so that you can reuse them and to protect against data loss if the disks that contain the logs are lost. If the log les ll, the database server pauses until you back up the logical logs. You can either back up the logical logs manually or start a continuous logicallog backup. Logical-log backups are always level 0. After you close the current logical log, you can back it up.
4-22 IBM Informix Backup and Restore Guide

Backing Up Logical Logs on Dynamic Server

IDS

Backing Up Logical Logs on Dynamic Server


If you do not use whole-system backups, you must back up logical logs because you must restore both the storage spaces and logical logs. If you perform whole-system backups and restores, you can avoid restoring logical logs. Informix recommends that you also back up the logical logs when you use whole-system backups. These log backups allow you to recover your data to a time after the whole-system backup, minimizing data loss. The following diagram shows the syntax for onbar -b -l commands.
Backing Up Logical Logs

Back to Syntax of ON-Bar Commands p. 4-4 -l -C -c -s -O

-b

Command -b -l -b -l -c

Purpose Performs a backup of full logical-log les Closes and backs up the current logical log as well as the other full logical logs

Key Considerations The current logical-log le is not backed up. If you are using ISM, it also backs up the ISM catalog. None.

(1 of 2)

Backing Up with ON-Bar 4-23

Backing Up Logical Logs on Dynamic Server

Command -b -l -C

Purpose Starts a continuous log backup

Key Considerations Reserve a dedicated storage device and terminal window because the continuous log backups run indenitely waiting for logical logs to ll.

-b -l -O

-b -l -s

To stop a continuous log backup, kill the ON-Bar process with an interrupt (^C or SIGTERM). Overrides normal logical backup If a log backup occurs when blobspaces are ofine, restrictions such as when a blobspace return code 178 displays in the ON-Bar activity log. is ofine Salvages any logical logs that are still If possible, use this option before you replace a on disk after a database server failure damaged disk. If you use onbar -r to perform a cold restore on an undamaged disk, ON-Bar automatically salvages the logical logs. For information, see Salvaging Logical Logs on page 6-17. (2 of 2)

Performing a Continuous Backup of Logical Logs


You can start a continuous logical-log backup in the following ways:
s s

Specify onbar -b -l -C. Set the ALARMPROGRAM parameter to the full path for log_full.sh or ex_alarm.sh on UNIX or log_full.bat on Windows. You can write your own event alarm and set ALARMPROGRAM to it. For more information, see ALARMPROGRAM on page 9-7 and the Administrators Reference.

After the continuous logical-log backup starts, it runs indenitely waiting for logical logs to ll. To stop the continuous logical-log backup, kill the ON-Bar process. If an error occurs while the continuous logical-log backup is running, it stops. If it stops, reissue the onbar -b -l -C command. Tip: Reserve a dedicated storage device to improve performance during continuous logical-log backups.

4-24

IBM Informix Backup and Restore Guide

Backing Up Logical Logs on Extended Parallel Server

Performing a Manual Backup of Logical Logs


To start a manual logical-log backup, use the onbar -b -l command. If you set ALARMPROGRAM to no_log.sh or no_log.bat, you must initiate a logical-log backup manually. To back up the current logical-log le, use the onbar -b -l -c command.

Using ALARMPROGRAM to Set the Log Backup Mode


Use the ALARMPROGRAM conguration parameter to control continuous log backups. If ALARMPROGRAM is set to log_full.sh or log_full.bat, when a logical-log le lls, the database server triggers event alarm 23. This event alarm calls onbar -b -l to back up the full logical-log le. Restart the database server after you change the value of ALARMPROGRAM.
UNIX

If you do not set ALARMPROGRAM, or if you set it to $INFORMIXDIR/etc/ log_full.sh, ON-Bar performs continuous log backups. If you set ALARMPROGRAM to $INFORMIXDIR/etc/ex_alarm.sh, change BACKUP to YES to enable continuous log backup. To turn off continuous log backups, set ALARMPROGRAM to $INFORMIXDIR/etc/no_log.sh. To use ALARMPROGRAM to start continuous log backups, set it to %INFORMIXDIR%\etc\log_full.bat. To turn off continuous log backups, set ALARMPROGRAM to %INFORMIXDIR%\etc\no_log.bat.

WIN NT/2000

XPS

Backing Up Logical Logs on Extended Parallel Server


You must back up logical logs even when you use nonlogging tables because you must restore both storage spaces and logical logs.

Backing Up with ON-Bar 4-25

Backing Up Logical Logs on Extended Parallel Server


Use onstat -g bus or onstat -g bus_sm to monitor logical logs and onbarworker processes on each coserver in the current backup session. For more information, see Monitoring the Backup Scheduler Status on page 8-17.
Backing Up Logical Logs Back to Syntax of ON-Bar Commands p. 4-4

-b

-l - q session -s - f lename
logstreamid

Command -b -l

-b -l -f lename

-b -l logstreamid

Key Considerations The current logical-log le is not backed up. If you are using ISM, it also backs up the ISM catalog. Backs up the logstreamids that are The lename can be any valid UNIX or listed in the text le whose Windows lename, including simple pathname lename provides (listle_1), relative (../backup_lists/listle_2 or Use this option to avoid entering a ..\backup_lists\listle), and absolute long list of logstreamids every time (/usr/informix/backup_lists/listle3 or c:\informix\backup_lists\listle3) lenames. that you use this option. The le can list multiple logstreamids per line. Uniquely identies a logical-log If you supply more than one logstreamid, stream that a given XPS coserver separate each item in the list with a space. generates A logstreamid is the same as a coserver ID. Allows you to assign a name to the <DBSERVERNAME><random_number> is the log backup session default session name. The session name must be unique and can be up to 127 characters. This name appears in the onstat utility so that you can follow the progress of the log backup. Salvages any logical logs that are If possible, use this option before you replace a still on disk after a database server damaged disk. If you use onbar -r to perform a failure cold restore on an undamaged disk, ON-Bar automatically salvages the logical logs. For more information, see Salvaging Logical Logs on page 6-17.

Purpose Performs a backup of full logicallog les

-b -l -q session

-b -l -s

4-26

IBM Informix Backup and Restore Guide

Backing Up Logical Logs on Extended Parallel Server Performing a Manual Backup of Logical Logs
Use the LOG_BACKUP_MODE conguration parameter to specify whether to back up full logical-log les automatically or manually. If you change the value of LOG_BACKUP_MODE, you must restart the database server before the change takes effect. If you set LOG_BACKUP_MODE to MANUAL, you must initiate a logical-log backup manually. To back up lled logical-log les manually, use the following command:
onbar -b -l

If you want to assign a session name to the log backup, use the -q option, as follows:
onbar -b -l -q my_logbackup

To back up the current log, use the following commands:


xctl onmode -l onbar -b -l

Starting Continuous Logical-Log Backups


On Extended Parallel Server, you can start a continuous logical-log backup by setting the LOG_BACKUP_MODE conguration parameter to CONT. Whenever a logical-log le lls, the Backup Scheduler automatically starts an onbar-worker process, if one is not already active, and assigns the log backup to it. To stop a continuous logical-log backup, you must suspend the backup session. For example, the following command turns off continuous logicallog backup for the session log backup 1 on coserver 1. In a multicoserver environment, you might need to turn off logical-log backup on each coserver.
onbar off -q log backup 1

To nd the logical-log backup session, use the onstat -g bus command. For more information, see Starting and Stopping ON-Bar Sessions on page 8-14.

Backing Up with ON-Bar 4-27

Monitoring Logical-Log Backups Preventing Logical-Log Backups in a Test System


If you set LOG_BACKUP_MODE to NONE, you cannot back up or restore logical logs, and log salvage does not work. Although you can continue to back up storage spaces, you cannot restore them. The only reason to set LOG_BACKUP_MODE to NONE is to test your system. Do not use LOG_BACKUP_MODE = NONE in a production system.

Monitoring Logical-Log Backups


To nd out if a logical-log le is ready to be backed up, check the ags eld of onstat -l. After the logical-log le is marked as backed up, it can be reused. When the ags eld displays any of the following values, the logical-log le is ready to be backed up:
U-----U-----L

The value U means that the logical-log le is used. The value L means that the last checkpoint occurred when the indicated logical-log le was current. The value C indicates the current log. If B appears in the third column, the logicallog le is already backed up and can be reused.
U-B---L

The following example shows the output of onstat -l when you use it to monitor logical logs on the database server:
Logical Logging Buffer bufused L-2 0 Subsystem OLDRSAM address number a038e78 1 a038e94 2 a038eb0 3 a038ecc 4 a038ee8 5 a038f04 6 bufsize numrecs numpages numwrits recs/pages pages/io 16 1 1 1 1.0 1.0 numrecs Log Space used 1 32 flags uniqid begin size used %used U-B---- 1 10035f 500 500 100.00 U-B---- 2 100553 500 500 100.00 U---C-L 3 100747 500 366 73.20 F------ 0 10093b 500 0 0.00 F------ 0 100b2f 500 0 0.00 F------ 0 100d23 500 0 0.00

For information about the onstat -l elds, see the Administrators Reference. Warning: If you turn off continuous logical-log backup, you must monitor your logical logs carefully and start logical-log backups as needed.

4-28

IBM Informix Backup and Restore Guide

Salvaging Logical-Log Files


IDS

The ag values U---C-L or U---C-- represent the current logical log. While you are allowed to back up the current logical log, doing so forces a log switch that wastes logical-log space. Wait until a logical-log le lls before you back it up. On Extended Parallel Server, use the xctl onstat -l utility to monitor logical logs on all coservers.

XPS

Salvaging Logical-Log Files


Use onbar -b -l -s to salvage the logs.
ON-Bar salvages logical logs automatically before a cold restore unless you specify a physical restore only. ON-Bar salvages the logical logs that are used

before it restores the root dbspace. To make sure that no data is lost before you start the cold restore, manually salvage the logical logs in the following situations:
s

If you must replace the media that contains the logical logs If the media that contains the logical logs is no longer available, the log salvage will fail, resulting in data loss.

If you plan to specify a physical restore only (onbar -r -p)

For more information, see Salvaging Logical Logs on page 6-17 and Performing a Cold Restore on page 6-18.

XPS

Skipping Logical Replay


The database server automatically skips logical replay when it is not necessary during a warm restore. For example, if you lose a dbspace that contains a large table that has not changed since its last backup, you can quickly restore it without replaying the logical logs. If all dbspaces being restored on a coserver meet the following criteria, logical replay is skipped for the warm restore:
s s

A backup or set of incremental backups exists for the dbspaces. No logging activity has occurred for the dbspaces since the last backup.

Backing Up with ON-Bar 4-29

Restoring Nonlogging Databases and Tables

If dbspaces are being restored on multiple coservers, logical replay is skipped on those coservers where no dbspaces need it and performed on those coservers where at least one dbspace needs it. In the following onstat -d example, the S ag shows that dbspace dbnoreplay is a candidate for skipping logical replay. This S ag disappears the rst time that a logging operation occurs in that dbspace.
Dbspaces address number flags fchunk nchunks flags owner name a66c140 1 1 1 1 N informix rootdbs a68bea8 2 20001 2 1 N S informix dbnoreplay

The database server always replays the logical logs during a cold restore.

Restoring Nonlogging Databases and Tables


Warning: If you do not use logging for your databases or tables, ON-Bar can only restore the data up to the time it was most recently backed up. Changes made to data since the last standard backup are not restorable. If you do not use logging, you would need to redo lost transactions by hand.
IDS

If logical-log backups are disabled because LTAPEDEV is set to /dev/null or NUL, you can restore only whole-system backups. If logical-log backups are disabled because LOG_BACKUP_MODE is set to NONE, restores are not possible. Warning: Informix strongly recommends that you do not set LTAPEDEV to /dev/null or NUL, or LOG_BACKUP_MODE to NONE.

XPS

4-30

IBM Informix Backup and Restore Guide

Understanding ON-Bar Backup Processes

Understanding ON-Bar Backup Processes


This section explains how ON-Bar performs backup operations on the database server. You can perform a backup when the database server is in online or quiescent mode. The original ON-Bar process is called the driver, and each new ON-Bar process that it creates is called an onbar_d child process.

IDS

Backup Sequence on Dynamic Server


Figure 4-3 on page 4-32 describes the ON-Bar backup sequence. When you issue a backup command, the onbar-driver builds a list of storage spaces and creates a backup session. In a parallel backup (if BAR_MAX_BACKUP is not set to 1), the onbar-driver starts one or more onbar_d child processes and assigns backup tasks to them. Each onbar_d child process backs up one storage space. Each onbar_d child disappears when the backup of its storage space is done. The onbar-driver keeps creating new children until all the storage spaces are backed up. Then the onbar-driver backs up the logical logs. If you specify a whole-system backup or set BAR_MAX_BACKUP to 1, the onbar_driver backs up the storage spaces and logical logs serially. No onbar_d child processes are created. When the backup is complete, the onbar-driver determines whether an error occurred and returns a status in the ON-Bar activity log. After each object is backed up, information about it is added to the emergency boot le on the database server and to the sysutils database.

Backing Up with ON-Bar 4-31

Backup Sequence on Dynamic Server

Figure 4-3 ON-Bar Backup Process on Dynamic Server ON-Bar

Physical backup ? Y List of backup storage spaces

Parallel ? N Back up storage spaces serially

Create onbar_d child process for each storage space

Back up storage spaces in parallel

If not whole-system, update boot le and sysutils

Log backup ? Y Back up logs

Update boot le and sysutils Backup complete

4-32

IBM Informix Backup and Restore Guide

Backup Sequence on Extended Parallel Server

XPS

Backup Sequence on Extended Parallel Server


Figure 4-4 on page 4-34 describes the ON-Bar backup sequence. The onbardriver builds and sends a list of storage spaces to the Backup Scheduler. The Backup Scheduler creates a backup session, might start one or more onbarworker processes, and assigns backup tasks to the onbar-worker processes. Once all the storage spaces are backed up, the onbar-driver sends a list of logstreams (logical-log data) to the Backup Scheduler that assigns the tasks to onbar-worker processes. Each onbar-worker process is associated with a coserver and a storage-manager instance. Once an onbar-worker process starts, it might be active after the backup or restore session is completed. An onbar-worker can process parts of several backup or restore sessions in its lifetime. Each onbar-worker transfers data between the database server and the storage manager until the backup request is fullled. When an onbar-worker completes its task, it waits for the next task from the Backup Scheduler. If no new task is assigned in a user-specied amount of time, the onbar-worker shuts down. You can set the number of minutes that the onbar-worker processes wait in BAR_IDLE_TIMEOUT in the ONCONFIG le. If the Backup Scheduler has new tasks to assign and not enough onbarworker processes are running to complete the task, it calls the start_worker script to start one or more new onbar-worker processes. Informix recommends that you start onbar-worker processes automatically, but if you want to start them manually, see Using start_worker.sh to Start onbar_worker Processes Manually on page 8-7. If you have set BAR_WORKER_MAX = 0, you must start a new onbar-worker manually. After each object is backed up, ON-Bar updates the emergency backup boot le on the coserver that is local to the onbar-worker and the sysutils database. The emergency backup boot le is on the coserver of the onbarworker that backed it up.

Backing Up with ON-Bar 4-33

Backup Sequence on Extended Parallel Server

To monitor the status of backups, restores, and onbar-worker activities, use the onstat -g bus or onstat -g bus_sm options or check the Backup Scheduler tables in the sysmaster database. For more information, see Monitoring the Backup Scheduler Status on page 8-17 and Backup Scheduler SMI Tables on page 10-11.
Figure 4-4 ON-Bar Backup Process on Extended Parallel Server ON-Bar Backup Scheduler Physical backup, if specied get event

Logical backup, if specied

nish start assign session worker task or kill worker

onbar_w Backup complete Back up spaces Back up logs

4-34

IBM Informix Backup and Restore Guide

Chapter

Verifying Backups

5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 5-3 5-4 5-6 5-7 5-8 5-10 5-10 5-10 5-10 5-10 5-10 5-11 5-11 5-11 5-12 5-12 5-12 5-12 5-12 5-13

In This Chapter .

Verifying Backups with archecker . . . . . . . . . . . . Using archecker to Verify Backups . . . . . . . . . . Preparing to Verify Backups . . . . . . . . . . . . Syntax . . . . . . . . . . . . . . . . . . . . Estimating the Amount of Temporary Space for archecker . . Verication Examples . . . . . . . . . . . . . . Performing Verication Only. . . . . . . . . . . Performing a Point-in-Time Verication . . . . . . . Verifying a Whole-System Backup . . . . . . . . . Verifying Blobspaces . . . . . . . . . . . . . Verifying Sbspaces . . . . . . . . . . . . . . Interpreting Verication Messages . . . . . . . . . . Sample Verication Message in the ON-Bar Activity Log . Sample Verication Message in the archecker Message Log What To Do If Backup Verication Fails . . . . . . . . Backups with Corrupt Pages . . . . . . . . . . . Backups with Corrupt Control Information . . . . . . Backups with Missing Data . . . . . . . . . . . Backups of Inconsistent Database Server Data . . . . . Procedures for Fixing Backup Verication Problems . . . .

5-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter describes the archecker utility for checking the validity and completeness of backups. To ensure that you can restore a backup safely, issue the onbar -v command, which calls the archecker utility.

Verifying Backups with archecker


You access the archecker utility when you use the onbar -v command. You can use archecker with the database server in any mode. The archecker utility veries that all pages required to restore a backup exist on the media in the correct form. After you successfully verify a backup, you can restore it safely. If archecker shows problems with the backup, contact Informix Technical Support. The archecker utility veries standard and whole-system backups. The archecker utility cannot verify logical-log backups. The archecker utility does not perform a restore.

Verifying Backups 5-3

Using archecker to Verify Backups

Figure 5-1 shows how ON-Bar and archecker verify a backup. The archecker utility veries level-0 backups on all database servers. The following steps correspond to the circled numbers in Figure 5-1.
Figure 5-1 How ON-Bar Veries a Backup

onbar -v
2

Emergency boot le or sysutils Storage manager

archecker

Bitmap of backup

Using archecker to Verify Backups


When the user issues an onbar -v command, the following sequence of actions occurs:
1. ON-Bar uses the emergency boot le if the database server is ofine

or in microkernel mode or the sysutils database if the database server is online or quiescent to determine which backup to verify.
2. 3. ON-Bar requests and retrieves the backup data from the storage

manager.
ON-Bar forwards the backup data to archecker.

5-4

IBM Informix Backup and Restore Guide

Using archecker to Verify Backups

4.

The archecker utility scans the backup data and creates a bitmap of the pages. During the scan phase, archecker veries the following types of problems:
s s s

Backups with corrupt pages Backups with corrupt control information Backups with missing pages that have been added since the last level-0 backup Retrieval of the wrong backup objects An example of retrieving the wrong backup object is if ON-Bar requests the rootdbs backup from last Wednesday but the storage manager retrieves the rootdbs backup from last Tuesday.

5.

After it completes the scan, archecker uses this bitmap to verify the backup and records the status in the archecker message log. ON-Bar also records this status in the ON-Bar activity log. When a backup is veried, ON-Bar inserts a row into the emergency boot le with the backup copy ID and the verication date, and updates the ins_verify and ins_verify_date rows of the bar_instance table in the sysutils database. For more information, see The bar_instance Table on page 10-5.

6.

During the verication phase, archecker veries that all the pages for each table are present and checks the partition pages, the reserved pages, the chunk-free list, blobspaces, sbspaces, and extents. The archecker utility also checks the free and used counts, veries that the page stamps match and that no overlap exists in the extents. Archecker writes temporary les in the directory that the AC_STORAGE parameter species. For information, see AC_STORAGE on page 9-5.

Verifying Backups 5-5

Preparing to Verify Backups

Preparing to Verify Backups


This section describes preparing to verify backups. To prepare to verify backups
1.

Review the ac_cong.std le that contains default archecker conguration parameters to see if you want to change the location of the directories for the archecker message log and temporary les. Set the AC_CONFIG environment variable to specify the path for the archecker conguration le (either ac_cong.std or user dened). For more information on setting the path, see Setting archecker Conguration Parameters in AC_CONFIG on page 9-4.

2.

3.

Estimate the amount of temporary space needed for storing the archecker temporary les. For more information, see Estimating the Amount of Temporary Space for archecker on page 5-8.

4.

Use the onbar -v option to verify that an existing backup will restore properly. For examples, see Verication Examples on page 5-10. To see whether archecker veried the backup successfully, check the archecker return code in the ON-Bar activity log and the messages in the archecker message log.

5.

5-6

IBM Informix Backup and Restore Guide

Syntax

Syntax
This diagram shows the onbar -v syntax.

Verifying Backups with archecker

Back to Syntax of ON-Bar Commands p. 4-4

-v -t time -f lename
dbspace_list

-w

Element -v

Purpose Veries a backup If verication is successful, you can restore the storage spaces safely.

Key Considerations Specify onbar -v to verify the backup. You can perform a point-in-time verication. You cannot verify the logical logs. You must specify the -b or -v parameter rst. You can verify a whole-system or physical-only backup (IDS). If you enter more than one storage-space name, use a space to separate the names. On XPS, if you enter a dbslice name, it veries all the dbspaces in that dbslice. (1 of 2)

dbspace_list

Names a list of storage spaces to be backed up or veried

Verifying Backups 5-7

Estimating the Amount of Temporary Space for archecker

Element -f lename

Purpose Key Considerations Veries the storage spaces that are You can use any valid UNIX or Windows pathname listed in the text le whose and lename. For the format of this le, see pathname lename provides Figure 4-1 on page 4-18. Use this option to avoid entering a The le can list multiple storage spaces per line. long list of storage spaces every time that you verify them. Species the date and time to How you enter the time depends on your current which dbspaces are veried GLS locale convention. If the GL_DATETIME environment variable is set, you must specify the date and time according to that variable. If the GLS locale is not set, use ANSI-style date format:
YYYY-MM-DD HH:MM:SS.

-t time

-w

Veries a whole-system backup

Available on IDS only. (2 of 2)

Estimating the Amount of Temporary Space for archecker


The archecker utility requires about 15 megabytes of temporary space for a medium-size system (40-50 gigabytes) and 25 megabytes for a large system. This temporary space is stored on the le system in the directory that the AC_STORAGE parameter species, not in the dbspaces. The temporary les contain bitmap information about the backup and copies of partition pages, chunk-free pages, reserved pages, and optionally, blob-free map pages and debugging information. The archecker utility must have permissions to the temporary directory. If the backup is veried successfully, these les are deleted. If the backup fails verication, these les remain. Copy them to another location so that Informix Technical Support can review them. If your database server contains only dbspaces, use the following formula to estimate the amount of temporary space in kilobytes for the archecker temporary les:
space = (130 KB * number_of_chunks) + (pagesize * number_of_tables) + (.05 KB * number_of_logs)

5-8

IBM Informix Backup and Restore Guide

Estimating the Amount of Temporary Space for archecker

IDS

If your database server contains blobspaces or sbspaces, use the following formula to estimate the amount of temporary space for the archecker temporary les:
space = (130 KB * number_of_chunks) + (pagesize * number_of_tables) + (.05 KB * number_of_logs) + (pagesize * (num_of_blobpages/252))

number_of_chunks pagesize number_of_tables number_of_logs num_of_blobpages is the maximum number of chunks that you estimate for the database server. is the system page size in kilobytes. is the maximum number of tables that you estimate for the database server. is the number of logical logs on the database server. is the number of blobpages in the blobspaces or the number of sbspaces. (If your database server contains sbspaces, substitute num_of_blobpages with the number of sbspaces.) (IDS only)

For example, you would need 12.9 megabytes of temporary disk space on a 50-gigabyte system with a page size of 2 kilobytes. This system does not contain any blobspaces, as the following statement shows:
13,252 KB = (130 KB * 25 chunks) + (2 KB * 5000 tables) + (.05 KB * 50 logs) + (2 KB * 0)

To convert kilobytes to megabytes, divide the result by 1024:


12.9 MB = 13,252/1024

Verifying Backups 5-9

Verication Examples

Verication Examples
The following examples show how to verify an existing backup and how to verify immediately after backing up.

Performing Verication Only


To verify a backup of all storage spaces, use the onbar -v command. The logical logs are not veried. To verify the backed-up storage spaces listed in the le bkup1, use the following command:
onbar -v -f /usr/backups/bkup1

Performing a Point-in-Time Verication


To perform a point-in-time verication of a backup, use the following command with the datetime value in quotes:
onbar -v -t 2001-12-10 10:20:50

IDS

Verifying a Whole-System Backup


To verify a whole-system backup, use the following command:
onbar -v -w

IDS

Verifying Blobspaces
The onbar -v command cannot verify the links between data rows and simple large objects in a blobspace. Use the oncheck -cD command instead to verify the links in a blobspace. For information on oncheck, see the Administrators Reference.

IDS

Verifying Sbspaces
The onbar -v command veries only the smart-large-object extents in an sbspace. For a complete check, use the oncheck -cS command. For information on oncheck, see the Administrators Reference.

5-10

IBM Informix Backup and Restore Guide

Interpreting Verication Messages

Interpreting Verication Messages


When you verify a backup, ON-Bar writes summary messages to the bar_act.log that report which storage spaces were veried and whether the verication succeeded or failed. The archecker utility writes detailed messages to the ac_msg.log. Informix Technical Support uses the ac_msg.log to diagnose problems with backups and restores.

Sample Verication Message in the ON-Bar Activity Log


The level-0 backup of dbspace dbs2.2 passed verication, as follows:
Begin backup verification of level0 for dbs2.2 (Storage Manager Copy ID:##) Completed level-0 backup verification successfully.

The level-0 backup of rootdbs failed verication, as follows:


Begin backup verification of level0 for rootdbs (Storage Manager Copy ID:##). ERROR: Unable to close the physical check: error_message.

Sample Verication Message in the archecker Message Log


More detailed information is available in the archecker message log, as follows:
STATUS: STATUS: STATUS: STATUS: . . STATUS: Archive Scan PASSED Control page checks PASSED Starting checks of dbspace dbs2.2. Checking dbs2.2:TBLSpace

Tables/Fragments Validated: 1 Validation Passed

Verifying Backups 5-11

What To Do If Backup Verication Fails

What To Do If Backup Verication Fails


If a backup fails verication, do not attempt to restore it. The results are unpredictable and range from corruption of the database server to a failed restore because ON-Bar cannot nd the backup object on the storage manager. In fact, the restore might appear to be successful but it hides the real problem with the data or media. The three different types of corrupt backups are as follows:
s s s

Backups with corrupt pages Backups with corrupt control information Backups with missing data

Backups with Corrupt Pages


If the pages are corrupt, the problem is with the databases rather than with the backup or the media. Run oncheck -cd on any tables that produce errors and then redo the backup and validation. To check extents and reserved pages, run oncheck -ce and oncheck -cr.

Backups with Corrupt Control Information


In this case, all the data is correct, but some of the backup control information is incorrect, which could cause problems with the restore. Ask Informix Technical Support for assistance.

Backups with Missing Data


When a backup is missing data, it might not be recoverable. After a data loss, try to restore from an older backup. Then restore the current logical logs.

Backups of Inconsistent Database Server Data


There are cases where archecker returns success to ON-Bar but shows failure in the archecker message logs. This situation occurs when archecker veries that ON-Bar backed up the data correctly, but the database server data was invalid or inconsistent when it was backed up.

5-12

IBM Informix Backup and Restore Guide

Procedures for Fixing Backup Verication Problems

Procedures for Fixing Backup Verication Problems


Follow these steps when a backup fails verication. The rst procedure diagnoses why a backup failed verication; the second procedure veries an expired backup; and the third procedure veries a backup with missing data. To diagnose why a backup failed verication
1.

Verify that the AC_CONFIG environment variable and the contents of the archecker conguration le are set correctly. If these variables are set incorrectly, the ON-Bar activity log displays a message. Immediately redo the backup onto different media. Do not reuse the original backup media because it might be bad. Do not use any backups based on this backup. If the level-0 backup is bad, do not use the corresponding level-1 and level-2 backups. Verify this new backup. If verication succeeds, you will be able to restore the storage spaces with condence. Use your storage manager to expire the backup that failed verication and then run the onsmsync utility. For more information on expiring data from the storage manager, see your storage-manager documentation or the Informix Storage Manager Administrators Guide. For more information, see Using the onsmsync Utility on page 8-10.

2.

3. 4. 5.

6.

If verication fails again, call Informix Technical Support and provide them with the following information:
s s s s

Your backup tool name (ON-Bar) The database server online.log The archecker message log The AC_STORAGE directory that contains the bitmap of the backup and copies of important backed-up pages

If only part of the backup is corrupt, Informix Technical Support can help you determine which portion of the backup can be restored in an emergency.
7.

Informix Technical Support might advise you to run oncheck options against a set of tables. (See Backups with Corrupt Pages on page 5-12.)

Verifying Backups 5-13

Procedures for Fixing Backup Verication Problems

To verify an expired backup


1.

Check the status of the backup save set on the storage manager. If the storage manager has expired the backup save set, the archecker utility cannot verify it. Use the storage-manager commands for activating the expired backup save set. See your storage-manager documentation or the Informix Storage Manager Administrators Guide. Retry the backup verication: onbar -v.

2.

3.

To restore when a backup is missing data


1.

Choose the date and time of an older backup than the one that just failed. To perform a point-in-time verication, use the following command:
onbar -v -t datetime dbspace1

2.

If the older backup passes verication, perform a point-in-time physical restore using the same datetime value, then perform a log restore, as follows:
onbar -r -p -t datetime dbspace1 onbar -r -l

3.

To prevent the storage manager from restoring a backup that failed verication, use your storage manager to expire the bad backup and then run the onsmsync utility. The onsmsync utility removes the bad backup from the emergency boot le and the sysutils database.

5-14

IBM Informix Backup and Restore Guide

Chapter

Restoring Data with ON-Bar

6
. . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 6-3 6-3 6-4 6-5 6-5 6-5 6-6 6-6 6-7 6-8 6-9 6-9 6-10 6-10 6-13 6-14 6-14 6-14 6-15 6-15 6-16 6-16 6-17 6-18 6-20 6-21

In This Chapter .

. . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

What Types of Restores Does ON-Bar Perform What Is a Warm Restore? . . . . . . What Is a Cold Restore? . . . . . . . What Is a Mixed Restore? . . . . . . What Is a Parallel Restore? . . . . . . What Is a Whole-System Restore? . . . What Is a Point-in-Time Restore?. . . . What Is an Imported Restore? . . . . . What Is a Restartable Restore? . . . .

Using the Pre-Recovery Checklist . . . . . . Monitoring Restores . . . . . . . . . Ensuring That Storage Devices Are Available Restoring Save Sets with ISM . . . . . . Performing a Complete Restore . . . . . .

Performing a Physical-Only or Logical-Only Restore . . . . . . Using Informix Server Administrator to Restore Data . . . . Examples of ON-Bar Restore Commands . . . . . . . . . Performing a Restore . . . . . . . . . . . . . . Restoring Specied Storage Spaces. . . . . . . . . . Performing a Logical Restore. . . . . . . . . . . . Restoring Data on Extended Parallel Server . . . . . . Performing a Physical Restore Followed By a Logical Restore Salvaging Logical Logs . . . . . . . . . . . . . . Performing a Cold Restore . . . . . . . . . . . . Performing a Whole-System Restore . . . . . . . . . Restoring Data to a Point in Time . . . . . . . . . .

Restoring from an Older Backup . . . . . . . . Performing a Point-in-Log Restore . . . . . . . . Restoring Online Storage Spaces . . . . . . . . Re-Creating Chunk Files During a Restore . . . . . Restoring a Dropped Storage Space . . . . . . . Restoring Data when Reinitializing the Database Server

. . . . . .

. . . . . .

. . . . . .

6-21 6-22 6-22 6-22 6-24 6-25 6-26 6-28 6-29 6-32 6-33 6-33 6-34 6-35 6-36 6-37 6-40 6-40 6-42 6-44 6-46

Transferring Data with the Imported Restore . . . . . . . . . . Importing a Restore . . . . . . . . . . . . . . . . . Initializing High-Availability Data Replication with ON-Bar . . . Restoring Table Types . . . . . . . . . . . . . . . . . .

Using Restartable Restore to Recover Data . . . . Restartable Restore Example . . . . . . . Restarting a Restore . . . . . . . . . . Interaction Between Restartable Restore and BAR_RETRY Value . . . . . . Restarting a Logical Restore . . . . . . Resolving a Failed Restore . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Understanding ON-Bar Restore Processes . . . . . . Warm-Restore Sequence on Dynamic Server . . . . Cold-Restore Sequence on Dynamic Server . . . . Warm-Restore Sequence on Extended Parallel Server . Cold-Restore Sequence on Extended Parallel Server .

6-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter describes the different types of restores that ON-Bar performs.

What Types of Restores Does ON-Bar Perform


You can restore storage spaces stored in both raw and cooked les. If your system contains primary and mirrored storage spaces, ON-Bar writes to both the primary and mirrored chunks at the same time during the restore. (Mirroring is a strategy that pairs a primary chunk of one storage space with an equal-sized mirrored chunk.) Important: You cannot specify temporary dbspaces in a warm or cold restore. When you restore the critical dbspaces (for example, the root dbspace), the database server re-creates the temporary dbspaces but they are empty.

What Is a Warm Restore?


The database server is in online, quiescent, or fast-recovery mode in a warm restore. Unless your database server has failed, you can restore noncritical storage spaces in a warm restore in the following circumstances:
s

The storage space is online, but one of its chunks is ofine, recovering, or inconsistent. The storage space is ofine or down.

If the database server goes ofine but the critical dbspaces are all right, bring the database server online and perform a warm restore. If the database server goes ofine and a critical dbspace is down, perform a cold restore. For details, see What Is a Cold Restore? on page 6-4.

Restoring Data with ON-Bar

6-3

What Is a Cold Restore?

What Is a Cold Restore?


If a critical dbspace is damaged because of a disk failure or corrupted data, the database server goes ofine automatically. If a critical dbspace goes down, you must perform a cold restore of all critical dbspaces. The database server must be ofine on Dynamic Server or in microkernel mode on Extended Parallel Server for a cold restore. You can perform a cold restore of all storage spaces regardless of whether they were online or ofine when the database server went down. Perform a cold restore when the database server fails or you need to perform one of the following restores:
s s s s

Point in time Point in log Whole system (IDS only) Imported

A cold restore starts by physically restoring all critical storage spaces, then the noncritical storage spaces, and nally the logical logs. The database server goes into recovery mode after the reserved pages of the root dbspace are restored. When the logical restore is complete, the database server goes into quiescent mode. Use the onmode command to bring the database server online. For more information, see Performing a Cold Restore on page 6-18. Tip: If you mirror the critical dbspaces, you are less likely to have to perform a cold restore after a disk failure because the database server can use the mirrored storage space. If you mirror the logical-log spaces, you are more likely to be able to salvage logical-log data if one or more disks fail.

6-4

IBM Informix Backup and Restore Guide

What Is a Mixed Restore?

What Is a Mixed Restore?


A mixed restore is a cold restore of some storage spaces followed by a warm restore of the rest of the storage spaces. If you need to provide access to a particular table or set of tables as soon as possible, you might want to perform a mixed restore. A mixed restore restores the critical dbspaces rst, then the other storage spaces that you specify during a cold restore. After the database server is back online, perform one or more warm restores of the remaining storage spaces and logical logs. The storage spaces that you do not restore during the cold restore are not available until after you restore them during a warm restore, even though they might not have been damaged by the failure. While a mixed restore makes the critical data available sooner, the complete restore takes longer because the logical logs are restored twice, once during the cold restore and again during the warm restore.

What Is a Parallel Restore?


If you perform a restore using the onbar -r command, ON-Bar restores the storage spaces in parallel and replays the logical logs once.
IDS

If BAR_MAX_BACKUP is set to 1, ON-Bar restores the storage spaces serially. If you did not perform a whole-system backup, you must use the onbar -r command to restore the data. If BAR_WORKER_MAX is set to 1, ON-Bar restores the storage spaces serially.

XPS

IDS

What Is a Whole-System Restore?


Whole-system restores are always serial. If you backed up the whole system (onbar -b -w), you can restore the whole system (onbar -r -w or onbar -r -p -w) with or without restoring the logical logs. Choose a wholesystem restore for small systems or when you do not need to restore logs. You can perform a whole-system point-in-time restore.

Restoring Data with ON-Bar

6-5

What Is a Point-in-Time Restore?

What Is a Point-in-Time Restore?


A point-in-time restore is a cold restore that you can use to undo mistakes that might otherwise not be xable. An example of such a mistake is dropping a table by mistake. A full restore restores the table during the physical restore but drops it again during the logical restore. A point-in-time restore lets you restore the data to the moment just before the table was dropped. When you restore the database server to a specic time, any transactions that were uncommitted at the specied point in time are lost. Also, all transactions after the point-in-time restore are lost. For information on how to restore to a specic time, see Restoring Data to a Point in Time on page 6-21.

What Is an Imported Restore?


ON-Bar allows you to restore objects to a different database server instance

than the one from which the data was backed up. This type of restore is called an imported restore. You can perform imported restores using whole-system, serial, or parallel backups. You must use compatible versions of XBSA and storage managers for both operations. If you perform a parallel imported restore, it must include all storage spaces, logical logs, and administrative les from the source database server to synchronize the instance. For more information, see Transferring Data with the Imported Restore on page 6-26. You cannot use a backup from one database server version to restore on a different version.

6-6

IBM Informix Backup and Restore Guide

What Is a Restartable Restore?

IDS

What Is a Restartable Restore?


If a failure occurs with the database server, media, or ON-Bar during a restore, you can restart the restore from the place that it failed. You do not have to restart the restore from the beginning. The RESTARTABLE_RESTORE parameter controls whether ON-Bar is able to keep track of the storage spaces and logical logs that were restored successfully. You can restart the following types of restores:
s s s s

Whole system Point in time Storage spaces Logical part of a cold restore

For more details, see Using Restartable Restore to Recover Data on page 6-33 and RESTARTABLE_RESTORE on page 9-27.

Restoring Data with ON-Bar

6-7

Using the Pre-Recovery Checklist

Using the Pre-Recovery Checklist


Use this checklist before you decide if a restore is required:
s s s s s

Has data been lost or corrupted? Does a committed transaction error need to be undone? Is the database server down or has a disk failed? Is a storage space or chunk down or inconsistent? Review the following les and outputs to obtain information about your system:

The onstat -d and onstat -l outputs The database server message log The ON-Bar activity log The storage-manager logs The oncheck output (Dynamic Server) or onutil CHECK output (Extended Parallel Server) The oncfg les The physical data layout (disks) The database schema (dbschema command) The af* les (assertion failures), if any The core dump les, if any The xcfg le The ism_chk.pl report

XPS

The ism_chk.pl report is useful when you investigate backup or restore problems. For details, see the Informix Storage Manager Administrators Guide.
s s

Estimate how long the restore will take. Determine whether a warm or cold restore is needed. If you need to take the database server ofine for the restore, ask your client users to log off the system. If you suspect a problem with the storage manager or the XBSA connection, the operating system, or the storage media, contact your vendor.

6-8

IBM Informix Backup and Restore Guide

Monitoring Restores

Monitoring Restores
To determine the state of each storage space and its chunks, or the status of the restore, examine the output of the onstat -d utility. The onstat -d utility works only with the database server online. For more information on onstat -d, see the Administrators Reference and the following table.
XPS

On Extended Parallel Server, you can use the xctl onstat -d utility to check the storage spaces on all coservers.
Storage Space or Chunk State Storage space no longer exists. Action Required Perform a point-in-time cold restore to a time before the space was dropped. Perform a warm restore of the affected storage space. Retry the logical restore. No action required. Perform a logical restore, if one is not already in progress. Perform a physical or logical restore.

onstat -d Flag

D L O P R

Chunk is down. Storage space is being logically restored. Chunk is online. Storage space is physically restored. Storage space is being restored.

Ensuring That Storage Devices Are Available


Verify that storage devices and les are available before you begin a restore. For example, when you drop a dbspace or mirroring for a dbspace after your level-0 backup, you must ensure that the dbspace or mirror chunk device is available to the database server when you begin the restore. If the storage device is not available, the database server cannot write to the chunk and the restore fails. When you add a chunk after your last backup, you must ensure that the chunk device is available to the database server when it rolls forward the logical log.

Restoring Data with ON-Bar

6-9

Restoring Save Sets with ISM

Restoring Save Sets with ISM


If you are using ISM, you can restore data from save sets on the storage volume. When the ISM server receives a restore request, the ism_watch command prompts you to mount the required storage volume on the storage device. When you mount the volume, the restore will resume. You can set the retention period for either a save set or volume. Unless all the save sets on the volume have expired, you can use ON-Bar to restore it. After the retention period for a save set expires, ON-Bar can no longer restore it. To re-create an expired save set, use the ism_catalog -recreate from command. If you set the retention period for a volume, ISM retains the save sets until all the save sets on that volume have expired. To recover an expired volume, use the ism_catalog -recover from command. For more information, see the Informix Storage Manager Administrators Guide.

Performing a Complete Restore


This diagram shows the syntax for the onbar -r commands. -r
XPS

-e -q name -O

- f lename
dbspace_list

- t time
IDS

- n log
IDS

-w - t time - RESTART - n log

6-10

IBM Informix Backup and Restore Guide

Performing a Complete Restore

Element -r

Purpose Species a restore

Key Considerations In a cold restore, the -r option restores all storage spaces, salvages and restores the logical logs. In a warm restore, the -r option restores all ofine storage spaces and restores the logical logs.

dbspace_list

-e

You must specify the -r parameter rst. Names one or more dbspaces, ON-Bar restores only the storage spaces listed. If it is blobspaces (IDS), sbspaces (IDS), a cold restore, you must list all the critical dbspaces. or dbslices (XPS) to be restored If you enter more than one storage-space name, use a space to separate the names. Species an external restore After you externally restore the storage spaces with a third-party utility, run onbar -r -e to mark the storage spaces as physically restored, restore the logical logs, and bring the storage spaces back online. For details, see Using External Restore Commands on page 7-17. Restores the storage spaces that The lename can be any valid UNIX or Windows are listed in the text le whose lename, including simple (listle_1), relative pathname lename provides (../backup_lists/listle_2 or ..\backup_lists\listle2), and absolute Use this option to avoid entering a long list of storage spaces every (/usr/informix/backup_lists/listle3 or c:\informix\backup_lists\listle3) lenames. time that you use this option. This le can list multiple storage spaces per line. Indicates the uniqid of the last log A point-in-log restore is a special kind of point-into restore in a cold restore time restore. You must restore all storage spaces in a point-in-log restore so that the data is consistent. If To nd the uniqid number, use any logical logs exist after this one, ON-Bar does not the onstat -l command (IDS). restore them and their data is lost. Allows a restore of online storage If a chunk le no longer exists, the -O option lets spaces ON-Bar re-create it. This new chunk le is cooked disk space, not raw disk space. This option also re-creates missing chunk les. If a storage space in the list of spaces to restore is online, the -O option lets ON-Bar bring it ofine and then restore it.
s

-f lename

-n log

-O

If an online storage space is restored successfully, return code 177 displays in the ON-Bar activity log. If a chunk is re-created successfully, return code 179 displays in the ON-Bar activity log.

Use the -O option with a whole-system restore to re-create missing chunk les (IDS). (1 of 2) Restoring Data with ON-Bar 6-11

Performing a Complete Restore

Element -q name

Purpose Allows you to assign a name to the restore

-RESTART

This name appears in the onstat utility so that you can follow the progress of the backup session (XPS). Restarts a restore after a database For the restore to be restartable, the server or ON-Bar failure (IDS) RESTARTABLE_RESTORE conguration parameter must be ON when the restore failure occurs. If RESTARTABLE_RESTORE is OFF, the -RESTART option does not work.

Key Considerations DBSERVERNAMErandom_number is the default session name. The session name must be unique and can be up to 127 characters.

-t time

Species the time of the last transaction to be restored from the logical logs in a cold restore

For more information, see Using Restartable Restore to Recover Data on page 6-33. You must specify the onbar -r -t option (point-intime) in a cold restore only and must restore all storage spaces to the same time.

-w

For more information, see Restoring Data to a Point in Time on page 6-21. Performs a whole-system restore You must specify the -w option in a cold restore. If of all storage spaces and logical you specify onbar -r -w without a whole-system logs from the last whole-system backup, return code 147 appears because ON-Bar cannot nd any storage spaces backed up as part of a backup (IDS) whole-system backup. (2 of 2)

6-12

IBM Informix Backup and Restore Guide

Performing a Physical-Only or Logical-Only Restore

Performing a Physical-Only or Logical-Only Restore


This diagram shows the syntax for a physical-only or logical-only restore. -l - t time
IDS XPS

- f lename - n log
logstreamid

-r
XPS

-q

-p -e -O
dbspace_list IDS

- t time

- f lename

-w

Element -r

Purpose If specied with the -p option, restores the storage spaces only If specied with the -l option, restores the logical logs only. Species a logical restore only Restores and rolls forward the logical logs. Uniquely identies logical-log records that a given coserver generates (XPS)

Key Considerations You must specify the -r parameter rst.

-l

The logical restore applies only to those storage spaces that have already been physically restored. If you supply more than one logstreamid, separate each item in the list with a space. A logstream is a coserver ID. (1 of 2)

logstreamid

Restoring Data with ON-Bar

6-13

Using Informix Server Administrator to Restore Data

Element -p

Purpose Species a physical restore only

-t time

Species the time of the last transaction to be restored from the logical logs in a cold restore

Key Considerations You must follow a physical restore with a logical restore before data is accessible unless you use a whole-system restore. This option turns off automatic log salvage before a cold restore. You can specify the onbar -r -p -t command in a warm or cold restore to restore specic storage spaces from an old physical backup. You must then use onbar -r -l to nish the logical restore.

-w

For more information, see Restoring from an Older Backup on page 6-21. Performs a whole-system restore To restore the storage spaces only, specify the -w -p (IDS) option in a cold restore. (2 of 2)

Using Informix Server Administrator to Restore Data


You can use Informix Server Administrator (ISA) to perform backups and restores with ON-Bar. For more information, see the ISA online help.

Examples of ON-Bar Restore Commands


The following sections contain examples of ON-Bar syntax for restoring data.

Performing a Restore
To perform a complete cold or warm restore, use the onbar -r command. ON-Bar restores the storage spaces in parallel. To speed up restores, you can add additional CPU virtual processors. To perform a restore, use the following command:
onbar -r

In a warm restore, the -r option restores all down storage spaces and logical logs, and skips online storage spaces. A down storage space means it is ofine or a chunk in it is inconsistent. In a cold restore, the -r option automatically salvages the logical logs, and restores all storage spaces and appropriate logical logs.

6-14

IBM Informix Backup and Restore Guide

Examples of ON-Bar Restore Commands

Tip: For faster performance in a restore, assign separate storage devices for backing up storage spaces and logical logs. If physical and logical backups are mixed together on the storage media, it takes longer to scan the media during a restore.

Restoring Specied Storage Spaces


To restore particular storage spaces (for example, a dbspaces named n_dbspace1 and n_dbspace2), use the -r option, as the following example shows:
onbar -r fin_dbspace1 fin_dbspace2

If any named dbspaces are online, they are skipped in the restore. ON-Bar writes a message to the activity log about the skipped dbspaces.

Performing a Logical Restore


To perform a logical restore, use the following command:
onbar -r -l

Warning: Because the logical-log les are replayed using temporary space during a warm restore, make sure that you have enough temporary space for the logical restore. The minimum amount of temporary space that the database server needs is equal to:
IDS XPS
s

The total logical-log space for the database server instance, or the number of log les to be replayed, whichever is smaller. The total logical-log space for the coservers on which storage spaces are being restored, or the number of log les to be replayed, whichever is smaller. Each coserver must have enough temporary space for all its temporary log les.

Tip: To improve performance, replay logical-log transactions in parallel during a warm restore. Use the ON_RECVRY_THREADS conguration parameter to set the number of parallel threads. To replay logical-log transactions in parallel during a cold restore, use the OFF_RECVRY_THREADS conguration parameter. For more information, see your Performance Guide.

Restoring Data with ON-Bar

6-15

Examples of ON-Bar Restore Commands

XPS

Restoring Data on Extended Parallel Server


To restore all dbspaces in a dbslice named n_slice, use the following command:
onbar -r fin_slice

If you have a mixture of dbspaces to restore, some that require logical replay and some that do not, follow these steps:
1. 2.

Restore the dbspaces that do not require logical replay rst. Restore the dbspaces that require logical replay.

You can use the dbspaces restored in the rst pass sooner but the total restore time might be longer. This method enables you to quickly restore tables in a data warehouse. For more information, see Skipping Logical Replay on page 4-29.

Performing a Physical Restore Followed By a Logical Restore


In certain situations, you might want to perform a restore in stages. The combination of physical and logical restores ensures that tables and indexes are as current as possible. If multiple devices are available for the restore, you can restore multiple storage spaces separately or concurrently, and then perform a single logical restore. To perform a warm restore in stages
1. 2. 3.

Perform a physical restore:


onbar -r -p

Back up the logical logs:


onbar -b -l

Perform a logical restore:


onbar -r -l

6-16

IBM Informix Backup and Restore Guide

Examples of ON-Bar Restore Commands

To perform a cold restore in stages


1.

Optionally, salvage the logical logs manually:


onbar -b -l -s

To perform a cold restore without salvaging the logical logs, skip this step.
2. 3. 4.

Perform a physical restore:


onbar -r -p

Perform a logical restore:


onbar -r -l

Synchronize the sysutils database and emergency boot les:


onsmsync

You must run onsmsync after performing a cold restore in stages, but do not need to run onsmsync after a complete cold restore (onbar -r). For information on what actions to take when an error occurs during a physical or logical restore, see Resolving a Failed Restore on page 6-37.

Salvaging Logical Logs


Decide whether you want to salvage the logical logs before you perform a cold restore. If not, the data in the logical logs that has not been backed up is lost. If a disk is damaged, salvage the logs if they are still accessible before you replace the disk. For more information, see Performing a Cold Restore on page 6-18. The onbar -r command automatically salvages the logical logs. Use the onbar -r -p and onbar -r -l commands if you want to skip log salvage.
IDS

If you set the LTAPEDEV conguration parameter to /dev/null on UNIX or to NUL or \dev\nul on Windows, the logical logs are not salvaged in any ON-Bar restore (onbar -r or onbar -r -w, for example).

Restoring Data with ON-Bar

6-17

Examples of ON-Bar Restore Commands

Avoid salvaging the logical logs in the following situations:


s

When you perform an imported restore Salvage the logical logs on the source database server but not on the target database server. For more information, see Transferring Data with the Imported Restore on page 6-26.

If you reinitialize the database server (oninit -i) before you perform a cold restore Reinitialization creates new logical logs that do not contain the data that you want to restore.

If you install a new disk for the dbspace that contains the logical logs Salvage the logs from the old disk, but not from the new disk.

Performing a Cold Restore


If a critical storage space is damaged because of a disk failure or corrupted data, you must perform a cold restore. If a disk fails, you need to replace it before you can perform a cold restore to recover data.
XPS

On Extended Parallel Server, if a critical dbspace on any of the coservers goes down, you must perform a cold restore on all coservers. Warning: Back up all storage spaces before you perform a cold restore. If not and you try a cold restore, data in the storage spaces that were not backed up will be lost. The storage space is marked as ofine after the cold restore. Drop the storage space so that you can reuse its disk space.

6-18

IBM Informix Backup and Restore Guide

Examples of ON-Bar Restore Commands

To perform a cold restore with automatic log salvage


1.

Copy the administrative les (ONCONFIG, sqlhosts [UNIX only], emergency boot les, oncfg les, and xcfg les [XPS only]) to a safe place. Take the database server ofine with the following command:
onmode -ky

IDS

2.

XPS

Take the database server ofine and then bring it to microkernel mode:
xctl onmode -ky xctl -C oninit -m

3.

If the disk that contains the logical-log les needs to be replaced or repaired, use the following command to salvage logical-log les on the damaged disk:
onbar -b -l -s

4. 5.

Then repair or replace the disk. If the les in INFORMIXDIR were destroyed, copy the previously saved administrative les to their original locations. However, if you did the cold restore because a critical dbspace was lost, you do not need to copy the administrative les. For more information, see Which Administrative Files to Back Up? on page 4-6.

6.

To restore the critical and noncritical storage spaces, use the following command:
onbar -r

When the restore is complete, the database server is in quiescent mode.


7.

To bring the database server online, use the following command:


onmode -m

Restoring Data with ON-Bar

6-19

Examples of ON-Bar Restore Commands

IDS

Performing a Whole-System Restore


A whole-system restore must be cold and must restore all storage spaces. A whole-system restore does not require you to restore the logical logs. A whole-system restore requires a whole-system backup. However, you can perform a plain restore of a whole-system backup. If you use onbar -b -w to back up the whole system, you can restore with any of the following commands:
onbar onbar onbar onbar onbar onbar -r -r -r -r -r -r -w -p -w # # # dbspaces # -t time # -t time -w # whole-system restore (salvages logs automatically) physical-only whole-system restore (no log salvage) parallel restore of the whole-system backup restore dbspaces from a whole-system backup point-in-time restore whole-system point-in-time restore

If you use onbar -r -p -w, the database server is in fast recovery mode when the restore completes. Perform either a logical restore (onbar -r -l) or use onmode -m to bring the database server online. For more information, see Performing a Whole-System Backup on page 4-19.

Considerations When LTAPEDEV is Set to Null


A whole-system backup with LTAPEDEV set to /dev/null on UNIX or to \dev\nul on Windows does not back up the logical logs. To restore the data from a whole-system backup when LTAPEDEV is null
1.

Upon restore, you must use the onbar -r -w -p command. When the physical-only whole-system restore completes, the database server is in fast recovery mode.

2.

If the database server is ofine, use the onmode -sy command to perform fast recovery. If the database server is online, use the onmode -m command to perform fast recovery.

Using the -O Option in a Whole-System Restore


Use the -O option with a whole-system restore only to re-create missing chunk les. You cannot use the onbar -r -w -O command when the database server is online because the root dbspace cannot be taken ofine during the whole-system restore.
6-20 IBM Informix Backup and Restore Guide

Examples of ON-Bar Restore Commands

Restoring Data to a Point in Time


Perform a point-in-time restore if you do not want to replay a mistake that was recorded in the logical logs. If you use the onbar -r -t time command, you must restore all storage spaces to a specic time in a cold restore. To restore database server data to its state at a specic date and time, enter a command using the date and time format for your GLS locale, as this example shows:
onbar -r -t 1997-05-10 12:00:00

Quotes are recommended around the date and time. The format for the English locale is yyyy-mm-dd hh:mm:ss. If the GL_DATETIME environment variable is set, you must specify the date and time according to that variable. For an overview, see What Is an Imported Restore? on page 6-6. For an example of using a point-in-time restore in a non-English locale, see Using GLS with ON-Bar on page B-1. Important: To determine the appropriate date and time for the point-in-time restore, use the onlog utility that the Administrators Reference describes. The onlog output displays the date and time of the committed transactions in the logical log. All data transactions that occur after time or last_log are lost.
IDS

You can also perform a whole-system, point-in-time restore.

Restoring from an Older Backup


By default, ON-Bar restores the latest backup. If you do not want to restore this backup (for example, when backup verication failed or the backup media was lost), you can restore from an older backup. To restore from an older backup using a physical point-in-time restore
1. 2.

Find the time of the older backup in the message log or ON-Bar activity log or from the storage manager. To restore all or specic storage spaces, issue the following commands:
onbar -r -p -t time [dbspaces_from_older_backup] onbar -r -p [remaining_dbspaces] onbar -r -l

Restoring Data with ON-Bar

6-21

Examples of ON-Bar Restore Commands

To restore from an older backup by expiring the bad backup


1. 2. 3.

Expire the bad backup in the storage manager. Run onsmsync. To restore the data, issue the following command:
onbar -r

IDS

Performing a Point-in-Log Restore


A point-in-log restore is similar to a point-in-time restore. The point-in-log restore stops at the time of the last committed transaction listed in the logical log. You must use point-in-log restore in a cold restore only and must restore all storage spaces. To perform a point-in-log restore, use the following command:
onbar -r -n last_log

Restoring Online Storage Spaces


Use the following command to force a restore of online storage spaces (except critical dbspaces) in a warm restore:
onbar -r -O dbsp1 dbsp2

The database server automatically shuts down each storage space before it starts to restore it. Taking the storage space ofine ensures that users do not try to update its tables during the restore process.
IDS

For special considerations on using the -O option, see Using the -O Option in a Whole-System Restore on page 6-20.

Re-Creating Chunk Files During a Restore


If the disk or le system fails, one or more chunk les could be missing from the dbspace. If you use the -O option in a warm or cold restore, ON-Bar recreates the missing chunk les, including any necessary directories, before restoring the dbspace as long as enough space exists on the le system. The newly created chunk les are cooked les and are owned by group informix on UNIX or group Informix-Admin on Windows.

6-22

IBM Informix Backup and Restore Guide

Examples of ON-Bar Restore Commands

To restore when using cooked chunks


1. 2.

Install the new disk. On UNIX, mount the device as a le system. On Windows, format the disk. Allocate disk space for the chunk le. For instructions, see the chapter on managing data in the Administrators Guide.

3.

4.

Issue the following command to re-create the chunk les and restore the dbspace:
onbar -r -O crashedspace

Important: ON-Bar does not re-create chunk les during a logical restore if the logical logs contain chunk-creation records. To restore when using raw chunks
1.
UNIX

Install the new disk. If you use symbolic links to raw devices, create new links for the down chunks that point to the newly installed disk.
ON-Bar restores the chunk le where the symbolic link points.

2.

3.

Issue the following command to restore the dbspace:


onbar -r crashedspace

Restoring Data with ON-Bar

6-23

Examples of ON-Bar Restore Commands

Restoring a Dropped Storage Space


If you accidentally drop a storage space, you can use a point-in-time restore or a point-in-log restore to recover it. To restore a dropped storage space using a point-in-time restore
1.

In this example, the database server has dbspace1, which was dropped accidentally, and dbspace2. Use onlog or the database server message log to obtain a time before dbspace1 was dropped. Shut down the database server. Perform a point-in-time restore:
onbar -r -t time

2. 3.

This command restores the rootdbs and dbspace2 but fails with error 131 and the following message: Unable to start the logical-log restore: A point-in-time logical restore is only permitted during a full restore. Dbspace dbspace1 was not recovered during this restore. Ignore this error message. 4.

To restore the dropped storage space, enter the following command:


onbar -r -t time dbspace1

To restore a dropped storage space using separate physical and logical restores
1.

In this example, the database server has dbspace1, which was dropped accidentally, and dbspace2. Use onlog or the database server message log to obtain a time before dbspace1 was dropped. Shut down the database server. Perform a physical-only restore of all storage spaces:
onbar -r -p -t time rootdbs dbspace1 dbspace2

2. 3. 4.

To restore the dropped storage space and prevent the logical log from replaying the drop, enter one of the following commands:
a.

If you use the point-in-log command, specify the uniqid of the log before the log that contains the drop command:
onbar -r -l -n uniqid

b.

If you use the logical point-in-time command, use the same time as in step 3:
onbar -r -l -t time

6-24

IBM Informix Backup and Restore Guide

Examples of ON-Bar Restore Commands

To restore a dropped storage space when the chunk les were also deleted
1. 2.

Use the onlog utility to nd the logical-log le that contains the dropped transaction for the storage space. To restore a dropped storage space when the chunk les were deleted, enter the following command:
onbar -r -t time -O

The point-in-time restore restores the dropped storage space and automatically re-creates the chunk les. Warning: You must restore the data to a point in time before the storage space was dropped in both the physical and logical restores.

Restoring Data when Reinitializing the Database Server


Any backups that you performed before reinitializing the database server are unusable. During intialization, ON-Bar saves the emergency boot le elsewhere and starts a new, empty emergency boot le. Do not use the copy of the emergency boot le unless you want to restore the previous database server instance. To reinitialize the database server after a failure when you do not need the old data
1.

Do not copy the old emergency boot le into the database server directory ($INFORMIXDIR/etc on UNIX or %INFORMIXDIR%\etc on Windows). To perform a complete backup, use onbar -b.

2.

To reinitialize the database server and restore the old data


1.

Before you reinitialize the database server, copy the administrative les (emergency boot, oncfg, and ONCONFIG les) to a different directory, if possible. Reinitialize the database server. Re-copy the administrative les into the database server directory because you need the information in the old emergency boot le. If the administrative les are unavailable, copy them from the last backup into the database server directory.

2. 3.

4.

Perform a restore. Do not salvage the logical logs.

Restoring Data with ON-Bar

6-25

Transferring Data with the Imported Restore

5. 6.

Any changes made after reinitialization are lost. Verify that you restored the correct instance of the critical and noncritical storage spaces.

Transferring Data with the Imported Restore


With the imported restore feature, you can transfer all the data from one instance of the database server to the same instance on a foreign host. For example, you can back up data on one computer and restore the data on a different computer. You can perform imported restores using whole-system, parallel, or serial backups. The imported restore is useful in the following situations:
s s s

Disaster recovery Database server upgrade Initialization of High-Availability Data Replication (HDR)

When you prepare for an imported restore, consider these points:


s s

Make sure that your storage manager supports imported restores. The whole-system backup must include all storage spaces; logical logs are optional. The parallel backup must include all storage spaces and logical logs. You can change the database server name in an imported restore.

Important: You cannot use a backup from one database server version to restore on a different version. For information on importing a restore with ISM, see the Informix Storage Manager Administrators Guide. For information on using HDR, see the Administrators Guide. If you are using a third-party storage manager, use the following procedure for an imported restore.

6-26

IBM Informix Backup and Restore Guide

Transferring Data with the Imported Restore

To set up an imported restore


1.

Install the database server and the storage manager on the target computer. Both computers must have the following:
s s s s s

Identical hardware and operating systems Identical database server versions Be on the same LAN or WAN Identical storage-manager versions Compatible XBSA libraries

The source computer (also called the primary server) contains the current instance that you want to replicate. The target computer (also called the secondary server) contains the computer where you want to replicate the source instance.
2.

Set up the storage manager on the target database server instance.


a. b. c. d.

Dene the same type of storage devices as on the source instance. Label the storage media with the correct pool names. Mount the storage devices. Update the sm_versions le on the target computer with the storage-manager version.

Restoring Data with ON-Bar

6-27

Importing a Restore

Importing a Restore
Before you back up the data, set the storage-manager environment variables. To back up the data and migrate the storage-manager objects
1.

Perform a level-0 backup (onbar -b or onbar -b -w) of all storage spaces on the source database server. (Do not perform an incremental backup.) If you are using ISM, follow these steps:
a. b. c.

2.

Shut down the storage manager on both computers. Create a tar le of the storage-manager directories on the source computer. Copy this tar le and unpack it on the target computer.

With other storage managers, you might be able to use backup tapes or import the storage-manager directories over the network. For more information, see your storage-manager documentation.
3.

Mount the transferred storage volumes.


s

If the backup les are on disk, copy them from the source computer to the target computer. If the backup is on tape, mount the transferred volumes on the storage devices that are attached to the target computer. Both the source and target computers must use the same type of storage devices such as 8mm tape or disk. Some storage managers support remote backups to a backup server. If the backup is on the backup server, retrieve the backup from that backup server.

4.

Use storage-manager commands (such as nsradmin -c) to add the source hostname as a client on the target computer.

6-28

IBM Informix Backup and Restore Guide

Initializing High-Availability Data Replication with ON-Bar

To perform the imported restore


1.

Copy the following les from the source computer to the target computer:
a.

Emergency boot le Rename the emergency boot le with the target database server number. For example, rename ixbar.51 to ixbar.52. The emergency boot le needs only the entries from the level-0 backup on the source computer. On Dynamic Server, the lename is ixbar.servernum. On Extended Parallel Server, the lename is bixbar.servernum.coservernum.

b.

The oncfg les: oncfg_servername.servernum


ON-Bar needs the oncfg le to know what dbspaces to retrieve.

Rename the oncfg le with the target database server name and number. For example, rename oncfg_bostonserver.51 to oncfg_chicagoserver.52. The lename should match the DBSERVERNAME and SERVERNUM on the target computer.
c.

The ONCONFIG le In the ONCONFIG le, update the DBSERVERNAME and SERVERNUM parameters with the target database server name and number.

d.

Storage-manager conguration les, if any The storage-manager conguration les might need updating.

2.
IDS

Use the onbar -r command to restore the data. If you are importing a whole-system backup, you can use the onbar -r -w -p command to restore the data.

Important: Every chunk (including mirrors) must match exactly in size, location, and offset on the source and target computers for the imported restore to complete.

IDS

Initializing High-Availability Data Replication with ON-Bar


Follow the steps for the imported restore rst and then start HDR and perform a physical-only restore on the target computer. Also see Initializing HDR with an External Backup and Restore on page 7-22.

Restoring Data with ON-Bar

6-29

Initializing High-Availability Data Replication with ON-Bar

To perform the imported restore


1. 2.

Follow the steps in To set up an imported restore on page 6-27. On the source computer, add entries into your sqlhosts le or registry to recognize the target instance. Verify that the source and target database servers can communicate over the network. For more information on sqlhosts, see the Administrators Guide.

3. 4.

Follow the steps in To back up the data and migrate the storagemanager objects on page 6-28. Copy the emergency boot les, oncfg les, ONCONFIG le, and storage-manager les from the source computer to the target computer.

To initialize High-Availability Data Replication


1.

To start HDR on the source database server, use the following command:
onmode -d primary secondary_dbservername

You might see the following messages in the database server message log:
19:28:15 solo_724 19:28:15 19:28:18 19:28:18 19:28:18 19:28:19 19:28:20 19:28:20 19:28:31 19:28:31 19:28:31 19:28:32 19:28:33 19:28:33 DR: new type = primary, secondary server name = DR: Trying to connect to secondary server ... DR: Primary server connected DR: Receive error DR: Failure recovery error (2) DR: Turned off on primary server Checkpoint Completed: duration was 0 seconds. DR: Cannot connect to secondary server DR: Primary server connected DR: Receive error DR: Failure recovery error (2) DR: Turned off on primary server Checkpoint Completed: duration was 0 seconds. DR: Cannot connect to secondary server

2.

Perform a physical-only restore on the target computer.


onbar -r -p

If you performed a whole-system backup (onbar -b -w), you could optionally use onbar -r -w -p to restore the storage spaces only.
3.

Check the database server message log, ON-Bar activity log, and the storage-manager error log to see whether the restore was successful.

6-30

IBM Informix Backup and Restore Guide

Initializing High-Availability Data Replication with ON-Bar

4.

To start HDR on the target database server, use the following command:
onmode -d secondary primary_dbservername

5.

If the logical logs needed to synchronize the two database servers are still present on the source database server, the target server retrieves them from the source database server. While the database servers are synchronizing, the logical logs are transferred automatically from the source to the target server. If the logical logs are not on the source database server, you are prompted to restore the required logical logs. If the target database server requires a log number that no longer exists because it was overwritten, ON-Bar will need to retrieve that logical log from the backup.

6. 7.

The following online.log messages might display while the database servers are synchronizing:
19:37:10 DR: Server type incompatible 19:37:23 DR: Server type incompatible 19:37:31 DR: new type = secondary, primary server name = bostonserver 19:37:31 DR: Trying to connect to primary server ... 19:37:36 DR: Secondary server connected 19:37:36 DR: Failure recovery from disk in progress ... 19:37:37 Logical Recovery Started. 19:37:37 Start Logical Recovery - Start Log 11, End Log ? 19:37:37 Starting Log Position - 11 0x629c 19:37:44 Checkpoint Completed: duration was 0 seconds. 19:37:45 Checkpoint Completed: duration was 0 seconds. 19:37:47 19:37:48 19:37:49 Checkpoint Completed: duration was 0 seconds. DR: Secondary server operational Checkpoint Completed: duration was 0 seconds.

Restoring Data with ON-Bar

6-31

Restoring Table Types

Restoring Table Types


Figure 6-1 discusses restore scenarios for different table types. For more information about the table types, see the Administrators Guide.
Figure 6-1 Restoring Table Types Table Type Standard Temp Scratch Operational IDS

XPS

Can You Restore This Type of Table? Yes. Warm restore, cold restore, and point-in-time restore work. No. No. You can restore an operational table if no light appends occurred since the last level-0 backup. If light appends occur to the table since the last backup, the table is not wholly restorable. This sort of problem can also occur if you restore from an older backup. To determine whether your table was restored to its original state, check the message log for the following error message:
Portions of partition partnum of table tablename in database dbname were not logged. This partition cannot be rolled forward.

If you see this message, the table or table fragments were not restored to their original state. If you want full access to whatever remains in this table, you need to alter the table to raw and then to the desired table type. This alter operation removes inconsistencies in the table that resulted from replaying non-logged operations such as light appends. Raw

When you restore a raw table, it contains only data that was on disk at the time of the last backup. Because raw tables are not logged, changes that occurred since the last backup cannot be restored. Yes, you can restore the data present at the last dbslice or dbspace backup. Static tables cannot change data. If you alter a static table to another type and update the data, the recoverability of the table depends on each type the table has been since each dbspace was backed up. For example, if you alter a static table to raw, it follows the rules for restoring a raw table.

Static

6-32

IBM Informix Backup and Restore Guide

Using Restartable Restore to Recover Data

IDS

Using Restartable Restore to Recover Data


If a failure occurs with the database server, media, or ON-Bar during a restore, you can restart the restore from the place that it failed. By default, the RESTARTABLE_RESTORE parameter is ON. If it is OFF, you must shut down and restart the database server before you begin the original restore. To restart a failed warm or cold restore, issue the onbar -RESTART command. All restarted restores resume where the last restore failed. Important: Informix recommends setting RESTARTABLE_RESTORE to ON if your system is large or unstable. If your system is small, consider turning off restartable restore for faster restore performance only if you have the time to repeat a failed restore from the beginning. If the failure occurred during a physical restore, ON-Bar restarts the restore at the storage space and level where the failure occurred. It does not matter whether the restore was warm or cold. If a failure occurred during a cold logical restore, ON-Bar restarts the logical restore from the most recent log checkpoint. Restartable logical restore is supported for cold restores only. However, if the failure during a warm restore caused the database server to shut down, do not restart the restore. Instead, use the archecker utility to verify the backup and start the whole restore from the beginning. Warning: Restartable restore does not work for the logical part of a warm restore.

Restartable Restore Example


The following example shows how to use restartable restore for a cold restore:
1.

Make sure that RESTARTABLE_RESTORE is ON. If you just set RESTARTABLE_RESTORE to ON, shut down and restart the database server for the changes to take effect.

2.

Restore several storage spaces:


onbar -r rootdbs dbs1 dbs2 dbs3 dbs4

The database server fails while restoring dbs3.

Restoring Data with ON-Bar

6-33

Restarting a Restore

3.

Restart the restore:


onbar -RESTART

ON-Bar automatically starts restoring dbs3, dbs4, and the logical

logs.
4.

If necessary, bring the database server online:


onmode -m

Important: If a restore fails with RESTARTABLE_RESTORE set to OFF, the onbar -RESTART option will not work. Use the onbar -r command to repeat the restore from the beginning.

Restarting a Restore
You can restart a point-in-time, whole-system, or parallel restore. The physical restore restarts at the storage space and level where the failure occurred. If the restore failed while some, but not all, chunks of a storage space were restored, even a restarted restore must restore all chunks of that storage space again. If storage spaces and incremental backups are restored successfully before the failure, they are not restored again.

6-34

IBM Informix Backup and Restore Guide

Restarting a Restore

Figure 6-2 shows how a restartable restore works when the restore failed during a physical restore of dbspace2. For example, you set RESTARTABLE_RESTORE to ON before you begin the restore. The level-0, level-1, and level-2 backups of rootdbs, and the level-0 and level-1 backups of dbspace1 and dbspace2 are successfully restored. The database server fails while restoring the level-1 backup of dbspace2. When you restart the restore, ON-Bar restores the level-2 backup of dbspace 1, the level-1 and level-2 backups of dbspace2, and the logical logs.
Restore failed during a physical restore of dbspace2: rootdbs dbspace1 dbspace2 Figure 6-2 Restartable Physical Restore

Completed

Completed

Failed

Restart the restore: Restarts at dbspace1 (level-2). rootdbs dbspace1 dbspace2

Interaction Between Restartable Restore and BAR_RETRY Value


If BAR_RETRY > 1, ON-Bar automatically retries the failed storage space or logical log. If this retry is successful, the restore continues and no restart is needed. If BAR_RETRY = 0 or 1, ON-Bar does not retry the failed storage space or logical log. If the database server is still running, ON-Bar skips the failed storage space and attempts to restore the remaining storage spaces.

Restoring Data with ON-Bar

6-35

Restarting a Restore

Figure 6-3 shows what to expect with different values for BAR_RETRY in a different restarted restore example.
Figure 6-3 Restartable Restore Results with Different BAR_RETRY Values ON-Bar Command BAR_RETRY = 2 BAR_RETRY = 0 restore level-0 dbs1, dbs2, dbs3 restore level-1 dbs1 FAILS

onbar -r dbs1 dbs2 dbs3 restore level-0 dbs1, dbs2, dbs3 restore level-1 dbs1 FAILS restore level-1 dbs1 RETRY PASSES restore level-1 dbs2, dbs3 restore level-2 dbs1, dbs2, dbs3 restore logical logs onbar -RESTART No restart is needed because everything was successfully restored.

restore level-1 dbs1, dbs2, dbs3 restore level-2 dbs1, dbs2, dbs3 restore logical logs restore level-0 dbs1, dbs2, dbs3 restore level-1 dbs1 FAILS

onbar -r dbs1 dbs2 dbs3 restore level-0 dbs1, dbs2, dbs3 restore level-1 dbs1 FAILS restore level-1 dbs1 RETRY FAILS restore level-1 dbs2, dbs3 restore level-2 dbs2, dbs3 restore logical logs onbar -r dbs1 dbs2 restore level-1 dbs1 restore level-2 dbs1 restore logical logs

onbar -RESTART restore level-1 dbs1, dbs2, dbs3 restore level-2 dbs1, dbs2, dbs3 restore logical logs

Restarting a Logical Restore


If a restore fails during the logical phase and you restart the restore, ON-Bar veries that the storage spaces have been restored successfully, skips the physical restore, and restarts the logical restore. Figure 6-4 on page 6-37 shows a cold restore that failed while restoring logical log LL-3. When you restart the cold logical restore, log replay starts from the last restored checkpoint. In this example, the last checkpoint is in logical log LL-2. If a failure occurs during a cold logical restore, ON-Bar restarts it at the place that it failed.

6-36

IBM Informix Backup and Restore Guide

Resolving a Failed Restore

Important: If a failure occurs during a warm logical restore, you have to restart it from the beginning. If the database server is still running, use the onbar -r -l command to complete the restore.
Cold restore failed during a logical restore of LL-3. The last checkpoint is in LL-2. Figure 6-4 Restartable Cold Logical Restore

LL-1 Completed

LL-2 Completed

LL-3 Failed

Restart the cold restore: Restarts at the last checkpoint in LL-2.

LL-1

LL-2

LL-3

Informix recommends that you set the RESTARTABLE_RESTORE parameter to ON. A restartable restore makes the logical restore run more slowly if many logical logs need to be restored, but it saves you time if something goes wrong and you need to restart. Restartable restore does not affect the speed of the physical restore.

Resolving a Failed Restore


What is retried, what is restartable, and what command you use to restart the restore depends on what failed and how serious it was. You can save some failed restores even if restartable restore is turned off. For example, if the restore fails because of a storage-manager or storage-device error, you can x the tape drive or storage-manager problem, remount a tape, and then continue the restore. Figure 6-5 shows what results to expect when physical restore fails. Assume that BAR_RETRY > 1 in each case.

Restoring Data with ON-Bar

6-37

Resolving a Failed Restore

Figure 6-5 Failed Physical Restore Scenarios Type of Error Database server, ON-Bar, or storage-manager error (database server is still running) RESTARTABLE_RESTORE ON or OFF What to Do When the Physical Restore Fails? ON-Bar retries each failed restore. If the storage manager failed, x the storage-manager error. If the retried restore fails, issue onbar -r spaces where spaces is the list of storage spaces not yet restored. Use onstat -d to obtain the list of storage spaces that need to be restored. ON-Bar restores the level-0 backup of each storage space, then the level-1 and level-2 backups, if any. ON Issue the onbar -RESTART command. If the storage manager failed, x the storage-manager error. The restore restarts at the storage space and backup level where the rst restore failed. If the level-0 backup of a storage space was successfully restored, the restarted restore skips the level-0 backup and restores the level-1 and level-2 backups, if any. ON or OFF Because the database server is down, perform a cold restore. Use onbar -r to restore the critical dbspaces and any noncritical spaces that were not restored the rst time. Issue the onbar -RESTART command. The restore restarts at the storage space and backup level where the rst restore failed. If the level-0 backup of a storage space was successfully restored, the restarted restore skips the level-0 backup and restores the level-1 and level-2 backups, if any.

ON-Bar or storage-manager error (database server is still running)

Database server failure Database server failure

ON

Figure 6-6 shows what results to expect when logical restore fails.

6-38

IBM Informix Backup and Restore Guide

Resolving a Failed Restore

Figure 6-6 Failed Logical Restore Scenarios Type of Error Database server or ON-Bar error in a cold restore (database server is still running) RESTARTABLE_RESTORE ON What to Do When a Logical Restore Fails? Issue the onbar -RESTART command. The logical restore restarts at the last checkpoint. If this restore fails, shut down and restart the database server to initiate fast recovery of the logical logs. All logical logs not restored are lost. ON or OFF Issue the onbar -r -l command. The restore should restart at the failed logical log. If onbar -r -l still fails, shut down and restart the database server. The database server will complete fast recovery. All logical logs that were not restored are lost. If fast recovery does not work, you have to do a cold restore. Database server error ON If the cold logical restore failed, issue onbar -RESTART. If the warm logical restore failed, issue the onbar -r -l command. If that fails, restart the entire restore from the beginning. Storage-manager error (IDS) ON or OFF ON-Bar retries each failed logical restore. If the retried restore fails, the logical restore is suspended. Fix the storage-manager error. Then issue the onbar -r -l command. The restore should restart at the failed logical log.

Database server or ON-Bar error (database server is still running)

Restoring Data with ON-Bar

6-39

Understanding ON-Bar Restore Processes

Understanding ON-Bar Restore Processes


This section explains how ON-Bar performs restore operations on the database server. If the database server is in quiescent mode or is online, you can perform a warm restore. ON-Bar gathers storage-space and logical-log backup data from the sysutils database and then requests a restore from the database server. If you have lost critical dbspaces, you must perform a cold restore. ON-Bar gathers backup data from the emergency boot le and then restores the storage spaces and logical logs.

IDS

Warm-Restore Sequence on Dynamic Server


Figure 6-7 on page 6-41 describes the ON-Bar warm-restore sequence. In a warm restore, the onbar-driver creates a list of restore objects. In a parallel restore (if BAR_MAX_BACKUP is not set to 1), the ON-Bar driver starts onbar_d child processes. The onbar_d processes transfer data between the storage manager and the database server until the warm restore is complete. Each onbar_d process processes one storage space. In a serial restore, the onbar-driver restores the storage spaces one at a time. Then the onbar-driver performs the logical backup and restore. After each object is restored, information about it is added to the sysutils database. For each storage space, ON-Bar restores the last level-0 backup, the level-1 backup (if it exists), and the level-2 backup (if it exists). After the physical restore is complete, ON-Bar backs up the logical logs to get the latest checkpoint and then restores the logical logs. This logical backup allows data to be restored up to the moment of failure.

6-40

IBM Informix Backup and Restore Guide

Warm-Restore Sequence on Dynamic Server

Figure 6-7 ON-Bar Warm-Restore Sequence on Dynamic Server ON-Bar

Physical restore? Y storage spaces Parallel? N Restore storage spaces serially Restore storage spaces in parallel Y Create onbar_d child process for each storage space

Update sysutils Log backup Update boot le and sysutils

Log restore? Y Restore logs

Update sysutils

Warm restore complete

Restoring Data with ON-Bar

6-41

Cold-Restore Sequence on Dynamic Server

IDS

Cold-Restore Sequence on Dynamic Server


Figure 6-8 on page 6-43 describes the ON-Bar cold-restore sequence. ON-Bar uses the backup emergency boot le to determine what restores are required. In a cold restore, ON-Bar performs the following steps in order:
s s s s s s

Salvages the logical logs Restores the root dbspace Restores the critical dbspaces Restores blobspaces Restores noncritical dbspaces and sbspaces Restores logical logs

For each storage space, ON-Bar restores the last level-0 backup, the level-1 backup (if it exists), and the level-2 backup (if it exists). Finally, ON-Bar restores the logical logs.

6-42

IBM Informix Backup and Restore Guide

Cold-Restore Sequence on Dynamic Server

Figure 6-8 ON-Bar Cold-Restore Sequence on Dynamic Server ON-Bar

Salvage logs? Y Salvage logs; update boot le

Parallel restore? N

Create onbar_d child process for each storage space

Restore storage spaces serially

Restore storage spaces in parallel

Log restore? N Y Logical restore

Update sysutils

Cold restore complete

Restoring Data with ON-Bar

6-43

Warm-Restore Sequence on Extended Parallel Server

XPS

Warm-Restore Sequence on Extended Parallel Server


Figure 6-9 on page 6-45 describes the ON-Bar warm-restore sequence. In a warm restore, the onbar-driver sends a list of backup objects to the Backup Scheduler. The Backup Scheduler creates a restore session that contains lists of backup objects to restore and might start one or more onbarworker processes. The onbar-worker transfers data between the storage manager and the database server until the warm restore is complete. For each storage space, ON-Bar restores the last level-0 backup, the level-1 backup (if it exists), and the level-2 backup (if it exists). Next, ON-Bar backs up the logical logs to get the latest checkpoint and then restores them. This logicallog backup allows data to be restored as close to the moment of failure as possible. As each object is restored, information about the restore is added to the sysutils database. As each logical log is backed up, information about it is added to sysutils and the emergency boot le. The emergency backup boot le is on the coserver of the onbar-worker that backed it up.

6-44

IBM Informix Backup and Restore Guide

Warm-Restore Sequence on Extended Parallel Server

Figure 6-9 ON-Bar Warm-Restore Sequence on Extended Parallel Server

ON-Bar Backup Scheduler Physical restore, if specied get event

Logical backup, if specied

nish start assign session worker task or kill worker

Logical restore, if specied

onbar_w event Restore spaces Back up logs Restore logs Update sysutils Update boot le

Warm restore complete

Restoring Data with ON-Bar

6-45

Cold-Restore Sequence on Extended Parallel Server

XPS

Cold-Restore Sequence on Extended Parallel Server


You must put the database server in microkernel mode to do a cold restore. If the database server or a coserver is ofine, you cannot perform any restores. Figure 6-10 on page 6-47 describes the ON-Bar cold-restore sequence. In a cold restore, ON-Bar performs the following steps in order:
s s s s s s

Salvages the logical logs Merges the boot les Restores the root dbspace Restores the critical dbspaces Restores the other dbspaces Restores logical logs

The onbar-merger utility collects and processes the backup emergency boot les from each coserver to determine what restores are required. The onbarmerger then creates the restore boot le and copies it to each coserver that contains a backup emergency boot le. You can specify in the BAR_WORKER_COSERVER conguration parameter which coservers have boot les and run onbar-worker processes. For more information, see BAR_WORKER_COSVR on page 9-20. For each storage space, ON-Bar restores the last level-0 backup, the level-1 backup (if it exists), and the level-2 backup (if it exists). Finally, it restores the logical logs.

6-46

IBM Informix Backup and Restore Guide

Cold-Restore Sequence on Extended Parallel Server

Figure 6-10 ON-Bar Cold-Restore Sequence on Extended Parallel Server ON-Bar Backup Scheduler Salvage logs, if specied get event

Physical restore, if specied

Start merge if Mixbar le does not exist

nish start assign session worker task or kill worker

onbar_w Collect backup boot les Merge backup boot les Create restore boot les Send restore boot les Salvage logs Restore spaces and logs Update sysutils

Logical restore, if specied

Cold restore complete

Restoring Data with ON-Bar

6-47

Chapter

Performing an External Backup and Restore


In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 7-3 7-5 7-6 7-7 7-9 7-9 7-10 7-10 7-11 7-11 7-12 7-14 7-14 7-14 7-15 7-15 7-16 7-17 7-18 7-19 7-19 7-20 7-20 7-21

Recovering Data Using an External Backup and Restore . What Is Backed Up in an External Backup? Rules for an External Backup . . . . Performing an External Backup . . . . . . . . . . . . . . . . . .

Preparing for an External Backup . . . . . . . . . . . . . . Blocking and Unblocking Dynamic Server . . . . . . . . . Blocking and Unblocking Extended Parallel Server . . . . . . Blocking Coservers or the Database Server . . . . . . . . Blocking a Cogroup and Specifying a Session Name. . . . . Blocking Coservers . . . . . . . . . . . . . . . . Unblocking Coservers or the Database Server . . . . . . . Unblocking All Coservers and Marking Dbspaces as Backed Up . . . . . . . . . . . . . . . Unblocking a Cogroup and Marking Selected Dbspaces as Backed Up . . . . . . . . . . . . . . . Unblocking a Specic Session and Not Marking Dbspaces as Backed Up . . . . . . . . . . . . . . . Monitoring an External Backup . . . . . . . . . . . . . Tracking an External Backup . . . . . . . . . . . . . . What Is Restored in an External Restore? . . . Using External Restore Commands . . . . Rules for an External Restore . . . . . . Performing an External Restore . . . . . Cold External Restore Procedure . . . Mixed External Restore Restriction. . . Warm External Restore Procedure . . . Examples of External Restore Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Initializing HDR with an External Backup and Restore .

7-22

7-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter discusses recovering data using external backup and restore.

Recovering Data Using an External Backup and Restore


An external backup and restore eliminates the downtime of systems because the backup and restore operations are performed external to the Informix system. ON-Bar does not move the data during the backup or physical restore. An external backup allows you to copy disks that contain storagespace chunks without using ON-Bar. When disks fail, replace them and use third-party software to restore the data, then use ON-Bar for the logical restore. For more information, see What Is Restored in an External Restore? on page 7-16. The following are typical scenarios for external backup and restore:
s

Availability with disk mirroring. If you use hardware disk mirroring, you can get your system online faster with external backup and restore than with conventional ON-Bar commands. Cloning. You can use external backup and restore to clone an existing production system for testing or migration without disturbing the production system.

Performing an External Backup and Restore

7-3

Recovering Data Using an External Backup and Restore

Figure 7-1 shows how an external backup and restore moves the data directly between the storage spaces on disk and the storage media. You can externally back up and restore specic storage spaces or all storage spaces but not logical logs.
Figure 7-1 Step 1: Moving the Data in an External Backup and Restore Storage spaces Backup media

Figure 7-2 shows how an external restore uses the onbar -r -e command to restore the logical logs.
Figure 7-2 Step 2: Restoring the Logical Logs in an External Restore onbar -r -e Logical logs Backup media

Database server

7-4

IBM Informix Backup and Restore Guide

What Is Backed Up in an External Backup?

What Is Backed Up in an External Backup?


Before you begin an external backup, block the database server or one or more coservers. Blocking forces a checkpoint, ushes buffers to disk, and blocks user transactions that involve temporary tables. During the blocking operation, users can access that database server or coserver in read-only mode. Then you can physically back up or copy the data to another set of disks or storage media using operating-system or third-party tools. When you complete the external backup, unblock the database server so that transactions can resume. You should include all the chunk les in each storage space, administrative les, such as ONCONFIG, and the emergency boot le, in an external backup. Important: To make tracking backups easier, Informix recommends that you back up all storage spaces in each external backup.
ON-Bar treats an external backup as equivalent to a level-0 backup. You cannot perform an external backup and then use ON-Bar to perform a level1 backup, or vice versa because ON-Bar does not have any record of the

external backup. For more information, see Performing an External Backup on page 7-7.

Performing an External Backup and Restore

7-5

Rules for an External Backup

Rules for an External Backup


Before you begin an external backup, keep the following rules in mind:
s

The database server must be online or quiescent during an external backup. Use ON-Bar to back up all logical logs including the current log so that you can restore the logical logs at the end of the external restore. Suspend continuous logical-log backups before you block the database server for an external backup. After the external backup is complete, resume the continuous logical-log backup. To suspend continuous logical-log backup, use the onbar off "Log backup coserver_id" command. To resume continuous logical-log backup, use the onbar on "Log backup coserver_id" command. For more information, see Starting and Stopping ON-Bar Sessions on page 8-14. To stop continuous logical-log backup, use the CTRL-C command. To resume continuous logical-log backup, use the onbar -b -l -C command.

XPS

IDS

Wait until all ON-Bar backup sessions have completed before you block the database server. If any backup sessions are active, the block command displays an error message. Any OLTP work or queries are suspended while the database server is blocked. They resume after the database server is unblocked.

Important: Because the external backup is outside the control of ON-Bar, you must track these backups manually. For more information, see Tracking an External Backup on page 7-15.

7-6

IBM Informix Backup and Restore Guide

Performing an External Backup

Performing an External Backup


The database server must be online or in quiescent mode during an external backup. To perform an external backup without disk mirroring
1.

To obtain an external backup, block the database server. The system takes a checkpoint and suspends all update transactions. Users can access the database server in read-only mode. On Dynamic Server, use the following command:
onmode -c block

IDS

XPS

On Extended Parallel Server, use the following command to block all the coservers in cogroup_all:
onutil ebr block;

2.

To back up the storage spaces and administrative les, use a copy command, such as cp, dd, or tar on UNIX or copy on Windows, or a le-backup program. You must back up all chunks in the storage spaces. To allow normal operations to resume, unblock the database server. Use the following command:
onmode -c unblock

3.
IDS

XPS

Use the following command to unblock all the coservers in cogroup_all and mark all dbspaces on each coserver as having a level-0 backup:
onutil ebr unblock commit;

4.

Back up all the logical logs including the current log so that checkpoint information is available for the external restore.

Warning: Because external backup is not done through ON-Bar, you must ensure that you have a backup of the current logical log from the time when you execute the onutil EBR BLOCK or onmode -c block command. Without a backup of this logicallog le, the external backup is not restorable.

Performing an External Backup and Restore

7-7

Performing an External Backup

IDS

5.

After you perform an external backup, use the following command to back up the current log on Dynamic Server:
onbar -b -l -c

XPS

After you perform an external backup, use the following commands to switch to and back up the current log on Extended Parallel Server:
onmode -l # execute on coservers with external backups onbar -b -l # back up all used logs

If you lose a disk, coserver, or the whole system, you are now ready to perform an external restore. To perform an external backup with hardware disk mirroring For example, you could set up a high-availability environment and use external backups for fail-over to a second database server.
1. 2. 3. 4. 5. 6.
IDS

If you are using hardware to mirror your disks, copy the primary partition to the mirror partition. Synchronize the mirrored disk partitions. Block the database server. The system takes a checkpoint and suspends all update transactions. Break the link between the disk mirrors. Install a new set of disk mirrors, if needed. Unblock the database server so that transactions can resume. Back up the logical logs. On Dynamic Server only, also back up the current log. Put the mirror disk into storage, copy the mirrored data to another computer, or back it up to tape or storage media by using a lesystem backup program or an operating-system copy command. Reconnect and synchronize the disk mirrors, if necessary.

7.

8.

7-8

IBM Informix Backup and Restore Guide

Preparing for an External Backup

Preparing for an External Backup


This section describes the commands used to prepare for an external backup. For the procedure, see Performing an External Backup on page 7-7.

IDS

Blocking and Unblocking Dynamic Server


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

onmode

-c block unblock

Element -c block

Purpose Performs a checkpoint and blocks or unblocks the database server Blocks the database server from any transactions

Key Considerations None. Sets up the database server for an external backup. While the database server is blocked, users can access it in read-only mode. Sample command:
onmode -c block

unblock Unblocks the database server, allowing data transac- Do not unblock until the external backup tions and normal database server operations to is nished. Sample command: resume onmode -c unblock

Performing an External Backup and Restore

7-9

Blocking and Unblocking Extended Parallel Server

XPS

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.

EBR BLOCK

,
SESSION session_name cogroup

Element BLOCK

cogroup

Purpose Forces a checkpoint that ushes the buffers to disk and blocks the database server or specied coservers from any transactions Species 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 identier, use the format: dbservername.%r(rst.last). EBR Species an external backup or restore command SESSION Assigns a session name to the onutil EBR BLOCK session_name command

Key Considerations While a coserver or database server is blocked, users can access it in readonly mode. If no cogroup or coserver name is specied, all coservers on the database server are blocked.

None. If no session name is specied, onutil generates a session name of the Use the session name to monitor the external backup following format: ebr_connectioncoserver-id.client-sql-session-id.ebrstatus. command-number.

7-10

IBM Informix Backup and Restore Guide

Blocking and Unblocking Extended Parallel Server

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 on page 7-12.

Blocking a Cogroup and Specifying a Session Name


Specifying a session name is useful for monitoring external backup sessions. To block the coservers dened 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 Administrators Reference. For information on how to monitor this session, see Monitoring an External Backup on page 7-15.

Blocking Coservers
To block specic coservers, either specify them by name or use the cogroup range identier 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;

Performing an External Backup and Restore

7-11

Blocking and Unblocking Extended Parallel Server

For information on how to specify coserver names and cogroup range identiers, see the onutil section of the Administrators 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.

EBR UNBLOCK

ABORT , COMMIT space_list

SESSION session_name

,
cogroup

7-12

IBM Informix Backup and Restore Guide

Blocking and Unblocking Extended Parallel Server

Element ABORT

cogroup

COMMIT

Purpose Key Considerations Unblocks the specied coservers but does not mark Use the ABORT option when the the dbspaces as backed up external backup failed or when you do not want to update the backup status. The dbspaces are not restorable. Species a list of one or more cogroup names to All coservers in the specied unblock the coservers cogroups that are currently blocked are unblocked. If you do not specify a You can specify cogroup_all, cogroup names, cogroup name, all the coservers in the coserver names, or a cogroup range identier. database server are unblocked. If a specic coserver is not blocked, an error is reported. Marks the listed dbspaces or dbslices as successIf you do not specify any dbspaces or fully backed up while the set of coservers were dbslices after the COMMIT blocked keyword, it commits the dbspaces and dbslices on the coservers that Enables newly added logical logs and dbspace mirrors. If no logged updates have occurred since were blocked. the last backup, marks the dbspace for skipping log replay. To verify, issue onstat -d. Species an external backup or restore Species a session name that can be either a name that you specied or onutil automatically created in the block command

EBR SESSION session_name

space_list UNBLOCK

None. 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. Species the dbspaces or dbslices that are success- Separate the dbspace or dbslice fully backed up names with commas. Unblocks the coservers or database server, allowing Ends the external backup. data transactions and normal database server operations to resume

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.

Performing an External Backup and Restore

7-13

Blocking and Unblocking Extended Parallel Server

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

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 Specic 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 identied 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;

7-14

IBM Informix Backup and Restore Guide

Monitoring an External Backup

Monitoring an External Backup


To monitor the external backup status, use the onstat -g -bus command. To nd blocked coservers, use the xctl onstat - command. For more information, see Using the onstat -g bus Option on page 8-17. To monitor the external backup status in the sysmaster database, use the following SQL queries. For more information, see Backup Scheduler SMI Tables on page 10-11.
# to find all blocked coservers SELECT * FROM sysbuobject WHERE is_block = 1 AND is_coserver = 1; # to find all blocked coservers in my session
SELECT * FROM sysbuobjses WHERE os_ses_id = my_session;

Tracking an External Backup


The database server and ON-Bar do not track external backups. To track the external backup data, use a third-party storage manager or track the data manually. Figure 7-3 shows which items Informix recommends that you track in an external backup. ON-Bar keeps a limited history of external restores.
Figure 7-3 Items to Track When You Use External Backup and Restore Items to Track Full pathnames of each chunk le for each backed up storage space Object type ins_copyid_hi and ins_copyid_lo Backup date and time Backup media Database server version Examples /work/dbspaces/rootdbs (UNIX) c:\work\dbspaces\rootdbs (Windows) Critical dbspaces, noncritical storage spaces Copy ID that the storage manager assigns to each backup object The times that the database server was blocked and unblocked Tape volume number or disk pathname Version 9.3 or Version 8.3x

Performing an External Backup and Restore

7-15

What Is Restored in an External Restore?

What Is Restored in an External Restore?


If you lose a disk, coserver, or the whole system, you can externally restore data only if it was externally backed up. You must use the same third-party utility for both the external backup and restore. To externally restore the storage spaces, copy the backed up data to disk. Use the onbar -r -e command to mark the storage spaces as physically restored, replay the logical logs, and bring the storage spaces back online. If you do not specify an external restore command, the database server thinks that these storage spaces are still down. You can perform these types of external restores:
s

Warm external restore. Mark noncritical storage spaces as physically restored, then perform a logical restore of these storage spaces. Cold external restore. Mark storage spaces as physically restored, then perform a logical restore of all storage spaces. Optionally, you can do a point-in-time cold external restore.

Warning: When you perform a cold external restore, ON-Bar does not rst attempt to salvage logical-log les from the database server because the external backup has already copied over the logical-log data. To salvage logical logs, perform onbar -l -s before you copy the external backup and perform the external restore (onbar -r -e).
XPS

In Extended Parallel Server, you must perform a logical restore on the whole system after an external backup even if all the storage spaces were backed up together.

7-16

IBM Informix Backup and Restore Guide

Using External Restore Commands

Using External Restore Commands


Use the onbar -r -e command to perform a warm or cold external restore. This command marks the storage spaces as physically restored and restores the logical logs. The following diagram shows the external restore syntax.

Using External Restore Commands

Back to Syntax of ON-Bar Commands p. 4-4

-r

-e -p - t time
IDS dbspace_list XPS

-q

-O

- f lename

- n last_log

Element -r -e

Purpose Species a restore Species an external restore

dbspace_list

Names one or more storage spaces to be marked as restored in a warm restore

-f lename

-n last_log

Restores the storage spaces that are listed in the text le whose pathname lename provides Indicates the number of the last log to restore (IDS) Restores online storage spaces

-O

Key Considerations In a cold restore, if you do not specify storage space names, all of them are marked as restored. Must be used with the -r option. In a warm external restore, marks the down storage spaces as restored unless the -O option is specied. If you do not enter dbspace_list or -f lename and the database server is online or quiescent, ON-Bar marks only the down storage spaces as restored. If you enter more than one storage-space name, use a space to separate the names. To avoid entering a long list of storage spaces every time, use this option. The lename can be any valid UNIX or Windows lename. If any logical logs exist after this one, ON-Bar does not restore them and data is lost. The -n option does not work with the -p option. None. (1 of 2)

Performing an External Backup and Restore

7-17

Rules for an External Restore

Element -p

Purpose Species an external physical restore only

-q name

-t time

Key Considerations After the physical restore completes, you must perform a logical restore because XPS does not support whole-system restore. Allows you to assign a session <DBSERVERNAME><random_number> is the default name to the external restore session name. The session name must be unique and can be up to 127 characters. Restores the last backup before the You can use a point-in-time restore in a cold restore specied point in time only. You must restore all storage spaces. If you pick a backup made after the How you enter the time depends on your current point in time, the restore will fail. GLS locale convention. If the GLS locale is not set, use English-style date format. See Restoring Data to a Point in Time on page 6-21. (2 of 2)

Rules for an External Restore


Before you begin an external restore, keep the following rules in mind:
s

You must externally restore from an external backup. Although the external backup is treated as a level-0 backup, it might actually be a non-Informix incremental backup. A warm external restore restores only noncritical storage spaces. You cannot externally restore temporary dbspaces. You cannot externally restore from regular ON-Bar backups. You cannot verify that you are restoring from the correct backup and that the storage media is readable using ON-Bar. If the external backups are from different times, the external restore uses the beginning logical log from the oldest backup.

s s s s

7-18

IBM Informix Backup and Restore Guide

Performing an External Restore

These rules apply to cold external restores only:


s

Salvage the logical logs (onbar -b -l -s) before you switch the disks that contain the critical storage spaces. If you are restoring critical dbspaces, the database server must be ofine (Dynamic Server) or in microkernel mode (Extended Parallel Server). Point-in-time external restores must be cold and restore all storage spaces.

Performing an External Restore


This section describes procedures for performing cold and warm external restores.

Cold External Restore Procedure


If you specify the onbar -r -e command in a cold restore, you must restore all storage spaces. Use the onbar -r -e -p command to restore all or specic storage spaces. To perform a cold external restore
IDS XPS

1.

To shut down the database server, use the onmode -ky command. To bring the database server to microkernel mode, use the xctl -C oninit -m command.

2. 3.

Salvage the logical logs:


onbar -b -l -s

To restore the storage spaces from an external backup, use a copy command, such as cp, dd, or tar on UNIX or a le-backup program. You must restore the storage spaces to the same path as the original data and include all the chunk les.

Performing an External Backup and Restore

7-19

Performing an External Restore

4.

To perform an external restore of all storage spaces and logical logs, use the following command:
onbar -r -e

To perform a point-in-time external restore of all storage spaces, use the following command:
onbar -r -e -t datetime

To perform a physical external restore of specic storage spaces, followed by a logical restore, use these commands:
onbar onbar onbar onbar -r -r -r -r -e -p rootdbs -e -p critical_space1 -e -p other_dbspaces -l

This step brings the database server to fast-recovery mode.


5. ON-Bar and the database server roll forward the logical logs and

bring the storage spaces online.

Mixed External Restore Restriction


ON-Bar does not support mixed external restores. For example, the following

sequence of commands might fail:


onbar -r -e rootdbs onbar -r -e other_dbspaces

Warm External Restore Procedure


The database server is online during a warm external restore. A warm external restore involves only noncritical storage spaces.

7-20

IBM Informix Backup and Restore Guide

Performing an External Restore

To perform a warm external restore


1.

To restore the storage spaces from an external backup, use a copy command, such as cp, dd, or tar on UNIX or a le-backup program. You must restore the storage spaces to the same path as the original data and include all the chunk les for each restored storage space.

2.

Perform a warm external restore of the noncritical storage spaces to bring them online.
a.

To restore selected storage spaces and all logical logs, use the following command:
onbar -r -e dbspace_list

b.

To restore all the down noncritical storage spaces and logical logs, use the following command:
onbar -r -e

c.

To restore all the down noncritical storage spaces and logical logs in separate steps, use the following commands:
onbar -r -e -p onbar -r -l

Specify the logstreams for only the coservers from where you restored the dbspaces. For example, use the following command to restore logstreams 1, 2, and 3:
onbar -r -l 1 2 3

d.

To restore all the noncritical storage spaces and logical logs, use the following command:
onbar -r -e -O

Examples of External Restore Commands


The following table contains examples of external restore commands.
Action Complete external restore External Restore Command onbar -r -e Comments In a cold restore, restores everything. In a warm restore, restores all down noncritical storage spaces. (1 of 2)

Performing an External Backup and Restore

7-21

Initializing HDR with an External Backup and Restore

Action Physical external restore and separate logical restore

External Restore Command onbar -r -e -p onbar -r -l

Comments You must always perform a logical restore (XPS). If the external backups come from different times, you must perform a logical restore. The system restores the logical logs from the oldest external backup (IDS).

External restore of selected storage spaces and logical logs External restore of selected storage spaces and separate logical restore External point-in-time (cold) restore Whole-system external restore (IDS)

onbar -r -e dbspace_list

Use this command in a warm external restore only. Use this command in a warm or cold external restore. Be sure to select a collection of backups from before the specied time. When you use onbar -r -e -w -p, back up all storage spaces in one block and unblock session. That way, all storage spaces have the same checkpoint. (2 of 2)

onbar -r -e -p dbspace_list onbar -r -l onbar -r -e -t datetime onbar -r -e -w or onbar -r -e -p -w

IDS

Initializing HDR with an External Backup and Restore


You can use external backups to initialize High-Availability Data Replication (HDR). For more information on HDR, see Initializing High-Availability Data Replication with ON-Bar on page 6-29 and the Administrators Guide. To initialize HDR with an external backup and restore
1. 2. 3. 4.

Block the source database server with the following command:


onmode -c block

Externally back up all chunks on the source database server. When the backup completes, unblock the source database server:
onmode -c unblock

Make the source database server the primary server:


onmode -d primary secondary_servername

7-22

IBM Informix Backup and Restore Guide

Initializing HDR with an External Backup and Restore

5. 6. 7. 8.

On the target database server, restore the external backup of all chunks. Bring the target database server to recovery mode:
oninit -r

Make the target database server the secondary server:


onmode -d secondary primary_servername

Wait until the database server operational messages appear in the message log on the primary and secondary servers.

Performing an External Backup and Restore

7-23

Chapter

Using ONBar Utilities

8
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3 8-3 8-4 8-6 8-7 8-8 8-9 8-10 8-11 8-11 8-12 8-12 8-12 8-12 8-13 8-13 8-13 8-14 8-15 8-17 8-17 8-17 8-17 8-18 8-18 8-19

In This Chapter .

Customizing ON-Bar and Storage-Manager Commands . Printing the Backup Boot Files . . . . . . . . Migrating Backed-Up Logical Logs to Tape . . . .

Using start_worker.sh to Start onbar_worker Processes Manually. Expiring and Synchronizing the Backup Catalogs . . . Choosing an Expiration Policy . . . . . . . . Using the onsmsync Utility . . . . . . . . . Removing Expired Backups . . . . . . . . Expiring Old Backups on ISM . . . . . . . Regenerating the Emergency Boot File . . . . Regenerating the sysutils Database . . . . . Deleting a Bad Backup . . . . . . . . . . Expiring Backups Based on the Retention Date . Expiring a Generation of Backups . . . . . . Expiring Backups Based on the Retention Interval Expiring All Backups . . . . . . . . . . Starting and Stopping ON-Bar Sessions . Using the onbar_w Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Monitoring the Backup Scheduler Status . . . . . . . . . Using the onstat -g bus Option . . . . . . . . . . . Sample onstat -g bus Output Without Any ON-Bar Activity Sample onstat -g bus Output During a Dbspace Backup . Using the onstat -g bus_sm Option . . . . . . . . . . Sample onstat -g bus_sm Output When ON-Bar Is Idle. . Sample onstat -g bus_sm Output During a Dbspace Backup

8-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter discusses the following topics:
s

Customizing ON-Bar and storage-manager commands with the onbar script Starting onbar-worker processes manually Expiring and synchronizing the backup history Starting and stopping ON-Bar sessions Monitoring the backup scheduler status

s s

XPS

s s

Customizing ON-Bar and Storage-Manager Commands


When you issue ON-Bar commands from the command line, the arguments are passed to the onbar script and then to onbar_d. Use the onbar shell script on UNIX or the onbar batch le on Windows to customize backup and restore commands, start ISM, and back up the ISM catalog. The onbar script is located in the $INFORMIXDIR/bin directory on UNIX and in the %INFORMIXDIR%\bin directory on Windows. The default onbar script assumes that the currently installed storage manager is ISM and backs up the ISM catalogs. If you are using a different storage manager, edit the onbar script, delete the ISM-specic lines, and optionally, add storage-manager commands. For background information on the onbar script or batch le, see ON-Bar Utilities on page 2-12 and Updating the onbar Script on page 3-7.

Using ON-Bar Utilities 8-3

Printing the Backup Boot Files

The default onbar script contains the following sections:


s

Add start-up processing here Use this section to initialize the storage manager, if necessary, and set environment variables.

End start-up processing here This section starts the onbar_d driver and checks the return code. Use this section for onbar_d and storage-manager commands.

Add cleanup processing here The code in this section backs up the ISM catalogs to the ISMData volume pool after the backup operation is complete. If you are using a third-party storage manager, delete the ISM-specic information. If you use a name other than ISMData for the volume pool, change it to the name specied in the ISM_DATA_POOL conguration parameter.

IDS
s

The archecker temporary les are also removed. End cleanup processing here Use this section to return onbar_d error codes. Warning: Edit the onbar script carefully. Accidental deletions or changes might cause undesired side effects. For example, backup verication might leave behind temporary les if the cleanup code near the end of the onbar script is changed.

Printing the Backup Boot Files


Use the following examples of what to add to the onbar script to print the emergency boot le if the backup is successful. Each time that you issue the onbar -b command, the emergency boot le is printed.
UNIX
onbar_d "$@" # receives onbar arguments from command line return_code = $? # check return code # if backup (onbar -b) is successful, prints emergency boot file if [$return_code -eq 0 -a "$1" = "-b"]; then servernum=awk /^SERVERNUM/ {print $2} $INFORMIXDIR/etc/$ONCONFIG lpr \$INFORMIXDIR/etc/ixbar.$servernum fi exit $return_code

8-4

IBM Informix Backup and Restore Guide

Printing the Backup Boot Files

XPS

To print the backup boot les on all coservers, replace the line "lpr \$INFORMIXDIR/etc/ixbar.$servernum" with "xctl lpr \$INFORMIXDIR/etc/Bixbar_\hostname\.$servernum." If more coservers than hosts are on the system, this script prints the same boot les twice.

WIN NT/2000

@echo off %INFORMIXDIR%\bin\onbar_d %* set onbar_d_return=%errorlevel% if "%onbar_d_return%" == "0" goto backupcom goto skip REM Check if this is a backup command :backupcom if "%1" == "-b" goto printboot goto skip REM Print the onbar boot file :printboot print %INFORMIXDIR%\etc\ixbar.??? REM Set the return code from onbar_d (this must be on the last line of the script) :skip %INFORMIXDIR%\bin\set_error %onbar_d_return% :end

Using ON-Bar Utilities 8-5

Migrating Backed-Up Logical Logs to Tape

Migrating Backed-Up Logical Logs to Tape


You can set up your storage manager to back up logical logs to disk and then write a script to automatically migrate the logical logs from disk to tape for off-site storage. Edit the onbar script to call this migration script after the onbar_d process completes. The following example shows a script that calls the migration script:
UNIX
onbar_d "$@" # starts the backup or restore EXIT_CODE=$? # any errors? PHYS_ONLY=false #if its physical-only, do nothing for OPTION in $*; do if [$OPTION = -p]; then PHYS_ONLY = true fi done if ! PHYS_ONLY; then migrate_logs fi

# if logs were backed up, call another # program to move them to tape

WIN NT/2000

This example for Windows 2000 or Windows NT invokes the migration script:
%INFORMIXDIR%\bin\onbar_d %* set onbar_d_return=%errorlevel% if "%onbar_d_return%" == "0" goto backupcom goto skip REM Check if the command is a backup command :backupcom if "%1" == "-b" goto m_log if "%1" == "-l" goto m_log goto skip REM Invoke the user-defined program to migrate the logs :m_log migrate_log REM Set the return code from onbar_d (this must be on the last line of the script) :skip %INFORMIXDIR%\bin\set_error %onbar_d_return% :end

8-6

IBM Informix Backup and Restore Guide

Using start_worker.sh to Start onbar_worker Processes Manually

XPS

Using start_worker.sh to Start onbar_worker Processes Manually


To start onbar-worker processes manually, use the start_worker.sh script in $INFORMIXDIR/etc or the onbar_w utility. Edit this le to specify additional setup and cleanup tasks when the database server starts the onbar-worker processes or to set environment variables. The default start_worker.sh script contains only one line, which calls onbar_w to start an onbar-worker process. If the storage manager does not have special requirements for worker processes that pass data to it, you do not have to change the start_worker.sh script. If the storage manager has special requirements, edit start_worker.sh to include operating-system commands that set up the environment before you start the onbar-worker process or perform other required actions after onbarworker processes start. The storage-manager documentation should describe any special requirements. If onbar-worker processes are not working correctly with a storage manager, check if the storage manager has any special requirements. If they are not listed in the documentation, or if they are not clearly stated so that you can add them to start_worker, contact the storage-manager manufacturer directly for more information.

Using ON-Bar Utilities 8-7

Expiring and Synchronizing the Backup Catalogs

Expiring and Synchronizing the Backup Catalogs


ON-Bar maintains a history of backup and restore operations in the sysutils

database and an extra copy of the backup history in the emergency boot le. ON-Bar uses the sysutils database in a warm restore when only a portion of the data is lost. ON-Bar uses the emergency boot le in a cold restore because the sysutils database cannot be accessed. To perform the following tasks, use the onsmsync utility:
s

Expire old ON-Bar backups that you no longer need to restore to prevent unbounded growth in the emergency boot le and sysutils database Allow the storage manager to tell ON-Bar that a backup has expired according to its own internal policy. ON-Bar does not ask the storage manager to restore backups that are no longer available. Regenerate the emergency boot le

The onsmsync utility removes the following items from the sysutils database and the emergency boot le:
s s s

Backups that the storage manager has expired Old backups based on the age of backup Old backups based on the number of times they have been backed up

Use onsmsync with the database server online or in quiescent mode to synchronize both the sysutils database and the emergency boot le. If the database server is ofine, onsmsync synchronizes the storage manager with the emergency boot le.

8-8

IBM Informix Backup and Restore Guide

Choosing an Expiration Policy

To synchronize the sysutils database


1. 2.

Bring the database server online. Run the onsmsync utility without any options.

The onsmsync utility synchronizes the sysutils database, the storage manager, and the emergency boot le as follows:
s

Adds backup history to sysutils that is in the emergency boot le but is missing from the sysutils database. Removes the records of restores, whole-system restores, fake backups, successful and failed backups from the sysutils database. Expires old logical logs that are no longer needed. Regenerates the emergency boot le from the sysutils database.

s s

Choosing an Expiration Policy


You can choose from the following three expiration policies:
s

Retention date (-t) deletes all backups before a particular date and time. Retention interval (-i) deletes all backups older than some period of time. Retention generation (-g) keeps a certain number of versions of each backup.

ON-Bar always retains the latest level-0 backup for each storage space. It

expires all level-0 backups older than the specied time unless they are required to restore from the oldest retained level-1 backup.
ON-Bar expires all level-1 backups older than the specied time unless they

are required to restore from the oldest retained level-2 backup.


IDS

ON-Bar retains a whole-system backup that starts before the specied

retention time and ends after the specied retention time.

Using ON-Bar Utilities 8-9

Using the onsmsync Utility

Using the onsmsync Utility


The order of the commands does not matter except that the storage-space names or lename must come last. Tip: To control whether the sysutils database maintains a history for expired backups and restores, use the BAR_HISTORY conguration parameter. For information, see BAR_HISTORY on page 9-12.

onsmsync

- g generation - t time - i interval

-O

- f lename
dbspace_list

-b

Element no options

-b

dbspace_list -f lename

-g generation

Purpose Synchronizes the sysutils database and emergency boot le with the storagemanager catalog Regenerates the emergency boot le from the sysutils database only Lists the storage spaces to expire Species the pathname of a le that contains a list of storage spaces to expire Retains a certain number of versions of each level-0 backup

Key Considerations None.

Not used with the other onsmsync options. Does not synchronize with the storage manager. If you enter more than one storage space, use a space to separate the names. Use this option to avoid entering a long list of storage spaces. The lename can be any valid UNIX or Windows lename. The latest generation of backups are retained and all earlier ones are expired. (1 of 2)

8-10

IBM Informix Backup and Restore Guide

Using the onsmsync Utility

Element -i interval

Purpose Expires all backups older than some period of time

Key Considerations Retains backups younger than this interval. Backups older than interval are not expired if they are needed to restore from other backups after that interval. Use the ANSI or GLS format for the interval:
YYYY-MM or DD HH:MM:SS

-O

Enforces expiration policy strictly

If used with the -t, -g, or -i option, expires all levels of a backup, even if some of them are needed to restore from a backup that occurred after the expiration date. The -O option does not affect logical-log expiration. See Expiring All Backups on page 8-13. Retains backups younger than this datetime. Backups older than datetime are not expired if they are needed to restore from other backups after that datetime. Use the ANSI or GLS_DATETIME format for datetime. (2 of 2)

-t datetime

Expires all backups before a particular date and time

Removing Expired Backups


If called with no options, the onsmsync utility compares the backups in the storage-manager catalog with the backups in the sysutils database and emergency boot le. The onsmsync utility expires and removes all extra backups from the sysutils database and emergency boot le.
XPS

The onsmsync utility starts onbar-merger processes that delete backups on all nodes that contain storage managers.

Expiring Old Backups on ISM


Important: ISM and certain third-party storage managers do not allow onsmsync to delete backups from the storage manager. First, run onsmsync without any parameters. Then, manually expire or delete the old backups from the storage manager.
1.

To manually expire the old backups from ISM, use the ism_cong -volume name -retention #days command. For more information, see the Informix Storage Manager Administrators Guide.

2.

Run onsmsync without any options.

Using ON-Bar Utilities 8-11

Using the onsmsync Utility

Regenerating the Emergency Boot File


To regenerate the emergency boot le only, use the following command:
onsmsync -b IDS

On Dynamic Server, this command saves the old emergency boot le as ixbar.server_number.system_time and regenerates it as ixbar.server_number. On Extended Parallel Server, this command saves the old backup boot le on each coserver as Bixbar_hostname_system_time.server_number and regenerates it as Bixbar_hostname.server_number.

XPS

Regenerating the sysutils Database


If you lose the sysutils database, use the bldutil utility in $INFORMIXDIR/etc on UNIX or %INFORMIXDIR%\etc on Windows to re-create the sysutils database with empty tables. Then use the onsmsync utility to re-create the backup and restore data in sysutils. Important: If both the sysutils database and emergency boot le are missing, you cannot regenerate them with onsmsync. Be sure to back up the emergency boot le with your other operating-system les.

Deleting a Bad Backup


The onsmsync utility cannot tell which backups failed verication. If the latest backup failed verication but an earlier one was successful, you must manually delete the failed backup records from the storage manager and then run onsmsync with no options to synchronize ON-Bar. For more information, see Chapter 5, Verifying Backups.

Expiring Backups Based on the Retention Date


The following example expires backups that started before November 24, 2000 and all fake backups, failed backups, and restores:
onsmsync -t 2000-11-24 00:00

8-12

IBM Informix Backup and Restore Guide

Using the onsmsync Utility

Expiring a Generation of Backups


The following example retains the latest three sets of level-0 backups and the associated incremental backups, and expires all earlier backups and all restores, fake backups, and failed backups:
onsmsync -g 3

Expiring Backups Based on the Retention Interval


The following example expires all backups that are older than three days and all fake backups, failed backups, and restores:
onsmsync -i 3 00:00

The following example expires all backups older than 18 months (written as 1 year + 6 months):
onsmsync -i 1-6

Expiring All Backups


The onsmsync utility retains the latest level-0 backup unless you use the -O option. If you use the -O and -t options, all backups from before the specied time are removed even if they are needed for restore. If you use the -O and -i options, all backups from before the specied interval are removed even if they are needed for restore. For example, to expire all backups, specify the following:
onsmsync -O -g 0

Warning: If you use the -O option with the -t, -i, or -g options, you might accidentally delete critical backups, making restores impossible.

Using ON-Bar Utilities 8-13

Starting and Stopping ON-Bar Sessions

XPS

Starting and Stopping ON-Bar Sessions


Session control commands let you stop and restart ON-Bar sessions. You might stop and restart a session to:
s s

Temporarily stop continuous-log backup Temporarily stop some or all ON-Bar sessions while computer trafc is heavy

Starting and Stopping ON-Bar Sessions

Back to Syntax of ON-Bar Commands p. 4-4 session -q

off on

-d

Element off on -d

Purpose Suspends a session Resumes a previously suspended session Destroys a session

Key Considerations None. None. ON-Bar completes backing up the current storage spaces and logical logs. Storage spaces and logical logs that are not assigned to an onbar-worker are not processed. The session name can be up to 127 characters. If you use a name longer than 127 characters, ON-Bar truncates it to 127 characters in the onstat -g output. Put quotes around the session name if it contains white spaces.

-q session

Species the session name The -q option is optional but session is required.

The order of the options does not matter. For example, to destroy the ON-Bar session, myses10, use one of the following commands:
onbar -d -q myses10 onbar -q myses10 -d

8-14

IBM Informix Backup and Restore Guide

Using the onbar_w Utility

Using the onbar_w Utility


To start onbar-worker processes manually, use the onbar_w utility.

Using start_worker.sh to Start onbar_worker

Back to Syntax of ON-Bar Commands p. 4-4

onbar_w

-b

-r

-d

-l

-p

Element -b -r -d -l -p

Purpose Accepts request to back up storage spaces and logical logs Accepts request to restore storage spaces and logical logs Accepts request to back up and restore storage spaces Accepts requests to back up and restore logical logs Accepts queries from the Backup Scheduler that asks where particular objects have been backed up

Key Considerations None. None. None. None. None.

Specifying onbar_w without any options (the default) is the same as specifying onbar_w -b -r -d -l -p. Figure 8-1 shows some examples of onbar_w options. Some option combinations also do the same thing.
Figure 8-1 onbar_w Options

Using ON-Bar Utilities 8-15

Using the onbar_w Utility

onbar_w Options none

What Happens The onbar-worker process does everything. It backs up and restores storage spaces and logical logs, and places the storage spaces and logical logs in the correct storage manager. Backs up storage spaces and logical logs Backs up storage spaces Backs up logical logs Backs up storage spaces and logical logs, and places them in the storage manager Backs up and restores storage spaces and logical logs Backs up and restores storage spaces, and places them in the storage manager Backs up and restores logical logs Places storage spaces and logical logs in the storage manager Restores storage spaces and logical logs Restores storage spaces and logical logs, and places them in the storage manager Does everything Does everything Does everything

-b -b -d -b -l -b -p -b -r -d -p -l -p -r -r -p -b -r -d -l -p -b -r -p -d -l -p

8-16

IBM Informix Backup and Restore Guide

Monitoring the Backup Scheduler Status

XPS

Monitoring the Backup Scheduler Status


Use the onstat -g bus and onstat -g bus_sm options to monitor the status of the Backup Scheduler. The Backup Scheduler tracks scheduled and active ON-Bar sessions. For SQL access to the Backup Scheduler, see Backup Scheduler SMI Tables on page 10-11.

Using the onstat -g bus Option


The onstat -g bus option shows the current Backup Scheduler sessions, what work is scheduled for each ON-Bar session, and what work is currently in progress. Both options display identical information.

Sample onstat -g bus Output Without Any ON-Bar Activity


In the following example, two logical-log backup sessions are suspended:
onstat -g bus Backup scheduler sessions ------------------------Session "Log backup 2" state SUSPENDED error 0 Session "Log backup 1" state SUSPENDED error 0

Sample onstat -g bus Output During a Dbspace Backup


In the following example, ON-Bar and the Backup Scheduler are working on session gilism824589. Currently, dbspace dbs1.2 is being backed up. Dbspaces dbs12.1, dbs12.2, and other are waiting to be backed up.
onstat -g bus Backup scheduler sessions ------------------------Session "Log backup 2" state SUSPENDED error 0 Session "Log backup 1" state SUSPENDED error 0 Session "gilism824589" state WAITING error 0 DBSPACE(dbsl.2) level 0 BACKUP,RUNNING DBSPACE(dbsl2.1) level 0 BACKUP,READY DBSPACE(dbsl2.2) level 0 BACKUP,READY DBSPACE(other) level 0 BACKUP,READY

Using ON-Bar Utilities 8-17

Using the onstat -g bus_sm Option

Using the onstat -g bus_sm Option


The onstat -g bus_sm option shows the current storage-manager conguration, what storage managers are assigned to each coserver, and what work each storage manager is currently performing.

Sample onstat -g bus_sm Output When ON-Bar Is Idle


The following example shows the storage-manager version, storagemanager name, the number of onbar-worker processes, the number of coservers, the maximum number of onbar-worker processes started, and the ON-Bar idle time-out:
onstat -g bus_sm Configured storage managers --------------------------BAR_SM BAR_SM_NAME BAR_WORKER_COSVR BAR_DBS_COSVR BAR_LOG_COSVR BAR_WORKER_MAX BAR_IDLE_TIMEOUT END 1 ism 1 1,2 1,2 1 5

8-18

IBM Informix Backup and Restore Guide

Using the onstat -g bus_sm Option

Sample onstat -g bus_sm Output During a Dbspace Backup


When a backup or restore session is active, onstat -g bus_sm also displays information about the active onbar-worker processes, as the following example shows:
onstat -g bus_sm Configured storage managers --------------------------BAR_SM BAR_SM_NAME BAR_WORKER_COSVR BAR_DBS_COSVR BAR_LOG_COSVR BAR_WORKER_MAX BAR_IDLE_TIMEOUT END Active workers: Worker 2 Coserver 1 Pid 4590 State BUSY "dbsl.2.0" 1 ism 1 1,2 1,2 1 5

The onbar-worker process is backing up dbslice dbsl.2.0.

Using ON-Bar Utilities 8-19

Chapter

Setting ON-Bar Conguration Parameters


In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 9-4 9-4 9-5 9-5 9-6 9-7 9-7 9-8 9-9 9-10 9-11 9-12 9-13 9-13 9-14 9-15 9-16 9-17 9-19 9-19 9-20 9-21 9-22 9-23 9-24 9-24

Setting archecker Conguration Parameters in AC_CONFIG AC_CONFIG File . . . . . . . . . . . . . . AC_MSGPATH . . . . . . . . . . . . . . AC_STORAGE . . . . . . . . . . . . . . . AC_VERBOSE . . . . . . . . . . . . . . . Setting ON-Bar Parameters in ONCONFIG ALARMPROGRAM . . . . . . . BAR_ACT_LOG . . . . . . . . BAR_BOOT_DIR . . . . . . . . BAR_BSALIB_PATH . . . . . . . BAR_DBS_COSVR . . . . . . . BAR_HISTORY . . . . . . . . BAR_IDLE_TIMEOUT . . . . . . BAR_LOG_COSVR . . . . . . . BAR_MAX_BACKUP . . . . . . BAR_NB_XPORT_COUNT. . . . . BAR_PROGRESS_FREQ . . . . . BAR_RETRY. . . . . . . . . . BAR_SM . . . . . . . . . . . BAR_SM_NAME . . . . . . . . BAR_WORKER_COSVR . . . . . BAR_WORKER_MAX . . . . . . BAR_XFER_BUF_SIZE . . . . . . BAR_XFER_BUFSIZE . . . . . . BAR_XPORT_COUNT . . . . . . ISM_DATA_POOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ISM_LOG_POOL . . . LOG_BACKUP_MODE . LTAPEDEV . . . . . RESTARTABLE_RESTORE

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9-25 9-25 9-26 9-27 9-28

Files That ON-Bar and ISM Use

9-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter describes the ON-Bar conguration parameters that you can set in the ONCONFIG le and the archecker conguration parameters that you can set in the AC_CONFIG le. Be sure to congure your storage manager. Depending on the storage manager that you choose, you might set different ON-Bar conguration parameters. Before you start ON-Bar, see Installing and Conguring a Third-Party Storage Manager on page 3-3. This table describes the following attributes (if relevant) for each parameter.
Attribute oncong.std value Description The default value that appears in the oncong.std le in Dynamic Server or the oncong.xps le in Extended Parallel Server The value that the database server supplies if the parameter is missing from your ONCONFIG le If this value is present in oncong.std, the database server uses the oncong.std value. If this value is not present in oncong.std, the database server uses this value. units range of values takes effect The units in which the parameter is expressed The valid values for this parameter The time at which a change to the value of the parameter affects ON-Bar operation Except where indicated, you can change the parameter value between a backup and a restore. refer to Cross-reference to further discussion

if not present

Setting ON-Bar Configuration Parameters 9-3

Setting archecker Conguration Parameters in AC_CONFIG

IDS

Setting archecker Conguration Parameters in AC_CONFIG


Because ON-Bar calls the archecker utility to verify backups, you must congure these archecker parameters before you can use the onbar -v option. For more information about using archecker, see Chapter 5, Verifying Backups. The following table shows the archecker conguration parameters that you specify in the AC_CONFIG le.
Conguration Parameter AC_MSGPATH AC_STORAGE AC_VERBOSE Purpose Species the location of the archecker message log Species the location of the temporary les that archecker builds Species either verbose or quiet mode for archecker messages IDS

XPS

AC_CONFIG File
oncong.std value UNIX Windows takes effect
$INFORMIXDIR/etc/ac_cong.std %INFORMIXDIR%\etc\ac_cong.std

When onbar starts

Set the AC_CONFIG environment variable to the full pathname for the archecker conguration le (either ac_cong.std or user dened). You must specify the entire path, including the conguration lename in the AC_CONFIG le or else the archecker utility might not work correctly. The following table shows examples of valid AC_CONFIG pathnames. /usr/informix/etc/ac_cong.std (UNIX) /usr/local/my_ac_cong.std c:\Informix\etc\ac_cong.std (Windows) c:\Informix\etc\my_ac_cong.std

9-4

IBM Informix Backup and Restore Guide

AC_MSGPATH

If AC_CONFIG is not set, the archecker utility sets the default location for the archecker conguration le to $INFORMIXDIR/etc/ac_cong.std on UNIX or %INFORMIXDIR%\etc\ac_cong.std on Windows.

AC_MSGPATH
oncong.std value UNIX Windows takes effect /tmp/ac_msg.log c:\temp\ac_msg.log

When onbar starts

The AC_MSGPATH parameter in the AC_CONFIG le species the location of the archecker message log (ac_msg.log). You must specify the entire path of the message log in the AC_CONFIG le or else the archecker utility might not work correctly. When you verify backups with onbar -v, the archecker utility writes summary messages to the bar_act.log and indicates whether the validation succeeded or failed. It writes detailed messages to the ac_msg.log. If the backup fails verication, discard the backup and retry another backup, or give the ac_msg.log to Informix Technical Support. For sample messages, see Interpreting Verication Messages on page 5-11.

AC_STORAGE
oncong.std value UNIX Windows takes effect /tmp c:\temp

When onbar starts

The AC_STORAGE parameter in the AC_CONFIG le species the location of the directory where archecker stores its temporary les. You must specify the entire path of the storage location in AC_CONFIG or else the archecker utility might not work correctly.

Setting ON-Bar Configuration Parameters 9-5

AC_VERBOSE

Figure 9-1 lists the directories and les that archecker builds. If verication is successful, these les are deleted.
Figure 9-1 archecker Temporary Files Directory CHUNK_BM INFO SAVE Files Bitmap information for every backed up storage space. Statistical analysis and debugging information for the backup. Partition pages in the PT.######## le. Chunk-free pages in the FL.######## le. Reserved pages in the RS.######## le. Blob-free map pages in the BF.######## le (IDS only).

To calculate the amount of free space that you need, see Estimating the Amount of Temporary Space for archecker on page 5-8. Informix recommends that you set AC_STORAGE to a location with plenty of free space.

AC_VERBOSE
oncong.std value 1 range of values takes effect
1 for verbose messages in ac_msg.log 0 for terse messages in ac_msg.log

When onbar starts

The AC_VERBOSE parameter in the AC_CONFIG le species either verbose or terse output in the archecker message log.

9-6

IBM Informix Backup and Restore Guide

Setting ON-Bar Parameters in ONCONFIG

Setting ON-Bar Parameters in ONCONFIG


The following section lists the ON-Bar conguration parameters and indicates the database servers to which they apply. Important: ON-Bar does not use the TAPEDEV, TAPEBLK, TAPESIZE, LTAPEBLK, and LTAPESIZE conguration parameters. ON-Bar checks if LTAPEDEV is set to /dev/null on UNIX or \dev\nul or NUL on Windows. For more information, see LTAPEDEV on page 9-26.

ALARMPROGRAM
oncong.std value Dynamic Server: On UNIX: /usr/informix/etc/log_full.sh On Windows: %INFORMIXDIR%\etc\log_full.bat Extended Parallel Server: blank if value not present Dynamic Server: no_log.sh or no_log.bat Extended Parallel Server: blank range of values takes effect refer to Full pathname When the database server is shut down and restarted Administrators Reference

Use the ALARMPROGRAM conguration parameter to handle event alarms and start or end automatic log backups. Use the shell script, ex_alarm.sh, for handling event alarms and starting automatic log backups or the logs_full.sh or logs_full.bat script for starting automatic log backups. Modify this script and set it to the full path of ALARMPROGRAM in the ONCONFIG le. Important: When you choose automatic logical-log backups, backup media should always be available for the backup process. Do not use the continuous log backup command (onbar -b -l -C) if you have automatic log backup set up through the ALARMPROGRAM parameter, and conversely.
Setting ON-Bar Configuration Parameters 9-7

BAR_ACT_LOG

BAR_ACT_LOG
oncong.std value UNIX Windows takes effect /tmp/bar_act.log \\tmp\bar_act.log

IDS: When onbar-driver starts XPS: When onbar starts or an onbar-worker process starts

The BAR_ACT_LOG conguration parameter species the full pathname of the ON-Bar activity log. You can use the default lename or specify your own lename for the activity log. Whenever a backup or restore activity or error occurs, ON-Bar writes a brief description to the activity log. The format of the le resembles the format of the database server message log. You can examine the activity log to determine the results of ON-Bar actions.

Specifying BAR_ACT_LOG with a Filename Only


If you specify a lename only in the BAR_ACT_LOG parameter, ON-Bar creates the ON-Bar activity log in the working directory in which you started ON-Bar. For example, if you started ON-Bar from /usr/mydata on UNIX, the activity log is written to that directory.
UNIX

If the database server launches a continuous logical-log backup, ON-Bar writes to the ON-Bar activity log in the working directory for the database server. If the database server launches a continuous logical-log backup, ON-Bar writes to the activity log in the %INFORMIXDIR%\bin directory instead.

WIN NT/2000

XPS

Using BAR_ACT_LOG on Extended Parallel Server


The onbar_w and onbar_m utilities also write messages to the activity log. If you set BAR_ACT_LOG to a local pathname, each onbar-driver and onbarworker process writes to the ON-Bar activity log on the node where it runs. Unless your system is congured to have shared directories, and the ON-Bar activity log is specied to be in a shared directory, each node has its own ON-Bar activity log.

9-8

IBM Informix Backup and Restore Guide

BAR_BOOT_DIR

Warning: Even if you set the path of BAR_ACT_LOG to some other directory, check to see if the ON-Bar activity log was placed in the default directory. When onbarmerger rst starts, it writes messages to /tmp/bar_act.log until it has a chance to read the ONCONFIG le.

XPS

BAR_BOOT_DIR
oncong.std value /usr/informix/etc if value not presentblank takes effect When the next onbar-worker process starts

The BAR_BOOT_DIR conguration parameter allows you to change the directory path for the emergency boot les. You must specify it in the global section of the ONCONFIG le.

Accessing the Emergency Boot Files


The onbar_w, onbar_m, and onbar_d utilities must be able to access the directory that you select for the emergency boot les. All coservers must be able to write to the directory for user root. The BAR_BOOT_DIR parameter is designed to be used on a system where the INFORMIXDIR directory is shared but the root user does not have write permissions to the INFORMIXDIR directory. For example, you can set BAR_BOOT_DIR to the /var/informix directory on a multinode system. Because each node has its own /var le system, it prevents read/write permissions problems. If you change the BAR_BOOT_DIR value while an onbar-worker process is running, it will use the old value. Any new onbar-worker process started after the change will pick up the new value. Warning: After you change the BAR_BOOT_DIR value, you must kill all onbar-worker processes on all coservers. When the processes end, either perform a level-0 backup of all storage spaces or move the les from the etc subdirectory to the new location.

Setting ON-Bar Configuration Parameters 9-9

BAR_BSALIB_PATH

Saving the Emergency Boot Files During Reversion


When you revert from Version 8.3 to an earlier database server version, the reversion script saves the emergency boot les in the directory that the BAR_BOOT_DIR parameter species. Otherwise, the reversion script saves the emergency boot les to the $INFORMIXDIR/etc directory if BAR_BOOT_DIR is not set in the ONCONFIG le or is set to an invalid directory.

BAR_BSALIB_PATH
oncong.std value UNIX /usr/lib/ibsad001.platform_extension where platform_extension is the sharedlibrary le extension libbsa.dll None

Windows if value not present Windows takes effect

IDS: When onbar-driver starts XPS: When an onbar-worker process starts

ON-Bar and the storage manager rely on a shared library to integrate with each other. Congure the BAR_BSALIB_PATH conguration parameter for your storage-manager library. Support for BAR_BSALIB_PATH is platform-

specic. Check your machine notes to determine if you can use it with your operating system. You can change the value of BAR_BSALIB_PATH between a backup and restore. To ensure that this integration takes place, specify the shared-library pathname. Set one of the following options:
s

Place the storage-manager library in the default directory. For example, the sufx for Solaris is so, so you specify /usr/lib/ibsad001.so on a Solaris system.

UNIX
s

Place the storage-manager library in any directory that you choose and create a symbolic link to it from /usr/lib/ibsad001.platform_extension to your library. If you use ISM, create a symbolic link to $INFORMIXDIR/lib/libbsa.platform_extension or set BAR_BSALIB_PATH to this value.

9-10

IBM Informix Backup and Restore Guide

BAR_DBS_COSVR

Set the LD_LIBRARY_PATH environment variable. For example, to use ISM on Solaris, set LD_LIBRARY_PATH to $INFORMIXDIR/lib. Set the pathname for the ISM shared library to %ISMDIR%\bin\libbsa.dll.

WIN NT/2000

The %ISMDIR% variable includes a version or release number. For example: set ISMDIR=C:\program les\informix\ism\2.20. This directory is set when the database server is installed on Windows. This pathname is different if you use a different storage manager. Tip: Be sure that the shared library can access the backup data in the storage manager in a restore. You cannot back up using one storage manager and restore using a different storage manager.

XPS

BAR_DBS_COSVR
oncong.std value all coservers range of values takes effect A list of unique positive integers greater than or equal to one When the database server starts

The optional BAR_DBS_COSVR conguration parameter species the coservers from which the storage manager that BAR_SM species can be sent storage-space backup and restore data. If BAR_DBS_COSVR is set to 0, the storage manager is not given dbspaces from any coserver. You might specify BAR_DBS_COSVR 0 to reserve a storage manager for logical-log backups only. The values are coserver numbers, separated by commas. Hyphens indicate ranges. For example, BAR_DBS_COSVR 1-5,7,9 species a storage manager that backs up dbspaces on coservers 1, 2, 3, 4, 5, 7, and 9. Do not put spaces between coserver names. To provide exibility and improved performance, this list of coservers can overlap with values listed for other storage managers.

Setting ON-Bar Configuration Parameters 9-11

BAR_HISTORY

BAR_HISTORY
oncong.std value Not in oncong.std if value not present 0 range of values
0 to remove records for expired backup objects from

sysutils
1 to keep records for expired backup objects in sysutils

takes effect

When onsmsync starts

The BAR_HISTORY parameter species whether the sysutils database maintains a backup history when you use onsmsync to expire old backups. For more information, see Using the onsmsync Utility on page 8-10. If you set the value to 0, onsmsync removes the bar_object, bar_action, and bar_instance rows for the expired backup objects from the sysutils database. If you set the value to 1, onsmsync sets the act_type value to 7 in the bar_action row and keeps the bar_action and bar_instance rows for expired backup objects in the sysutils database. If you do not set BAR_HISTORY to 1, the restore history is removed. Regardless of the value of BAR_HISTORY, onsmsync removes the line that describes the backup object from the emergency boot le and removes the object from the storage manager when the storage manager expires the object.

9-12

IBM Informix Backup and Restore Guide

BAR_IDLE_TIMEOUT

XPS

BAR_IDLE_TIMEOUT
oncong.std value
0

if value not present 0 units range of values takes effect Minutes


0 to unlimited

When the database server starts

The BAR_IDLE_TIMEOUT conguration parameter determines the maximum amount of time in minutes that an onbar-worker process can be idle before it is shut down. The BAR_IDLE_TIMEOUT conguration parameter is optional. If BAR_IDLE_TIMEOUT is set to 0, the onbar-worker processes never shut down until you shut down the database server. You can set this option locally for individual storage managers to override the default or specied global setting.

XPS

BAR_LOG_COSVR
oncong.std value all coservers range of values takes effect A list of unique positive integers greater than or equal to one When the database server starts

The BAR_LOG_COSVR conguration parameter species the coservers from which the storage manager that BAR_SM species can be sent logical-log backup and restore data. BAR_LOG_COSVR is optional. The default is all coservers. If BAR_LOG_COSVR is set to 0, the storage manager is not given logical logs from any coserver. You might specify BAR_LOG_COSVR 0 to reserve a storage manager for dbspace backups only.

Setting ON-Bar Configuration Parameters 9-13

BAR_MAX_BACKUP
The values are coserver numbers, separated by commas. Hyphens indicate ranges. For example, BAR_LOG_COSVR 1-5,7,9 species a storage manager that backs up logical logs on coservers 1, 2, 3, 4, 5, 7, and 9. Do not put spaces between coserver names. Extended Parallel Server restricts BAR_LOG_COSVR settings to guarantee that no two storage-manager instances can back up logs for the same coserver.

IDS

BAR_MAX_BACKUP
oncong.std value 0 if value not present units range of values
4

onbar processes
0 = maximum number of processes allowed on system 1 = serial backup or restore n = specied number of processes spawned

takes effect

When onbar starts

The BAR_MAX_BACKUP parameter species the maximum number of parallel processes that are allowed for each onbar command. Both UNIX and Windows support parallel backups. Although the database server default value for BAR_MAX_BACKUP is 4, the oncong.std value is 0.

Specifying Serial Backups and Restores


To perform a serial backup or restore, set BAR_MAX_BACKUP to 1.
ON-Bar ignores the BAR_MAX_BACKUP parameter for a whole-system

backup because they are always done serially.

9-14

IBM Informix Backup and Restore Guide

BAR_NB_XPORT_COUNT

Specifying Parallel Backups and Restores


To specify parallel backups and restores, set BAR_MAX_BACKUP to a value other than 1. For example, if you set BAR_MAX_BACKUP to 5 and execute an ON-Bar command, the maximum number of processes that ON-Bar will spawn concurrently is 5. Congure BAR_MAX_BACKUP to any number up to the maximum number of storage devices or the maximum number of streams available for physical backups and restores. If you set BAR_MAX_BACKUP to 0, the system creates as many ON-Bar processes as needed. The number of ON-Bar processes is limited only by the number of storage spaces or the amount of memory available to the database server, whichever is less. The amount of memory available is based on SHMTOTAL. ON-Bar performs the following calculation where N is the maximum number of ON-Bar processes that are allowed:
N = SHMTOTAL / (# transport buffers * size of transport buffers / 1024)

If SHMTOTAL is 0, BAR_MAX_BACKUP is reset to 1. If N is greater than BAR_MAX_BACKUP, ON-Bar uses the BAR_MAX_BACKUP value. Otherwise, ON-Bar starts N backup or restore processes.

IDS

BAR_NB_XPORT_COUNT
oncong.std value 10 if value not present 10 units range of values takes effect Buffers
3 to unlimited

When onbar starts

The BAR_NB_XPORT_COUNT conguration parameter species the number of data buffers that each onbar_d process can use to exchange data with the database server. The value of this parameter affects onbar performance. For example, if you set BAR_MAX_BACKUP to 5 and BAR_NB_XPORT_COUNT to 5 and subsequently issue 5 ON-Bar commands, the resulting 25 ON-Bar processes will use a total of 125 buffers.

Setting ON-Bar Configuration Parameters 9-15

BAR_PROGRESS_FREQ

To calculate the amount of memory that each onbar_d process requires, use the following formula. For information on the page size for your system, see the release notes.
required_memory = (BAR_NB_XPORT_COUNT * BAR_XFER_BUF_SIZE * page_size) + 5 MB

BAR_PROGRESS_FREQ
oncong.std value 0 if value not present 0 units range of values takes effect Minutes
0, then 5 to unlimited

When onbar starts

The BAR_PROGRESS_FREQ conguration parameter species, in minutes, the frequency of the progress messages in the ON-Bar activity log for backup and restore operations. For example, if you set BAR_PROGRESS_FREQ to 5, ON-Bar reports the percentage of the object backed up or restored every ve minutes. If you set BAR_PROGRESS_FREQ to 0 or do not set it, ON-Bar does not write any progress messages to the activity log. Too frequent progress messages ll the activity log. So if you set BAR_PROGRESS_FREQ to 1, 2, 3, or 4, ON-Bar automatically resets it to 5 to prevent overow in the ON-Bar activity log. Infrequent progress messages might make it hard to tell if the operation is progressing satisfactorily. If ON-Bar cannot determine the size of the backup or restore object, it reports the number of transfer buffers sent to the database server instead of the percentage of the object backed up or restored.

9-16

IBM Informix Backup and Restore Guide

BAR_RETRY

BAR_RETRY
The BAR_RETRY conguration parameter species how many times onbar should retry a data backup, logical-log backup, or restore operation if the rst attempt fails.
IDS

BAR_RETRY on Dynamic Server


oncong.std value 1 if value not present 1 range of values takes effect
BAR_ABORT (0), BAR_CONT (1), or n

When onbar starts

The setting of the BAR_RETRY parameter determines ON-Bar behavior in the following ways:
s

If set to BAR_ABORT, ON-Bar aborts the backup or restore session when an error occurs for a storage space or logical log, returns an error, and quits. If ON-Bar is running in parallel, the already running processes nish but no new ones are started. If set to BAR_CONT, ON-Bar aborts the backup or restore attempt for that particular storage space, returns an error, and attempts to back up or restore any storage spaces or logical logs that remain. If set to a specic number (n), ON-Bar attempts to back up or restore this storage space or logical log the specied number of times before it gives up and moves on to the next one.

XPS

BAR_RETRY on Extended Parallel Server


oncong.std value 0. Does not retry range of values takes effect
0 to 5

When the database server starts

If a backup or restore fails, ON-Bar attempts to back up or restore the object the specied number of times before it gives up and moves on to the next object.
Setting ON-Bar Configuration Parameters 9-17

BAR_RETRY

The Backup Scheduler maintains two retry counts: object retries and storagemanager retries. Object retries is the number of times that the Backup Scheduler attempts a backup or restore operation. If the backup or restore of a particular object gets an error, the Backup Scheduler retries it BAR_RETRY times. If it continues to fail, the Backup Scheduler removes the object from the backup session. To restart the backup or restore operation
1. 2.

Resolve the error. Issue another ON-Bar command to back up or restore that object.

Storage-manager retries is the number of times that the Backup Scheduler attempts to start an onbar-worker process before giving up. If an onbarworker process registers with the Backup Scheduler but exits with an error, then the Backup Scheduler tries to start another onbar-worker process, up to BAR_RETRY times. If the onbar-worker process fails before it registers or if the Backup Scheduler already has tried to start an onbar-worker process BAR_RETRY times, it does not start another onbar-worker process. To reset the storage-manager retry counter and restart the operation
1. 2.

Resolve the error. Start an onbar-worker process manually, either directly on the command line or by calling start_worker.sh on UNIX or start_worker.bat on Windows. The backup or restore operation can then resume.

You can monitor the storage-manager retry count with onstat -g bus_sm. For more information, see Monitoring the Backup Scheduler Status on page 8-17.

9-18

IBM Informix Backup and Restore Guide

BAR_SM

XPS

BAR_SM
oncong.std value 1 range of values takes effect Positive integer greater than or equal to 1 When the database server starts

The required BAR_SM conguration parameter identies a specic storagemanager instance. Only ON-Bar and the Backup Scheduler use this value. The storage manager does not use this value. The system uses the BAR_SM to track the location of backups. If you change the identication number after you use the storage manager to perform a backup, you invalidate the backups that you have made. Perform a new level-0 backup of all data.

XPS

BAR_SM_NAME
oncong.std value None range of values takes effect Any character string that does not contain white spaces or the pound sign (#) When the database server starts

The BAR_SM_NAME conguration parameter is the name of the storage manager. It can be up to 18 characters.

Setting ON-Bar Configuration Parameters 9-19

BAR_WORKER_COSVR

XPS

BAR_WORKER_COSVR
oncong.std value 1 if value not present an error occurs range of values takes effect A list or range of unique positive integers greater than or equal to one When the database server starts

The required BAR_WORKER_COSVR conguration parameter species which coservers can access the storage manager that BAR_SM identies. If BAR_SM is specied, BAR_WORKER_COSVR must also be specied. Any coserver on the list can restore data that other coservers on the list back up. Enter the numbers of the coservers where onbar-worker processes can be started for this storage manager. If you enter only one coserver number, use the number of a coserver on a node with a physically attached storage device so that the storage manager does not have to transfer data across the network. This step improves performance. The list must not overlap with the list of any other storage manager. The values are coserver numbers, separated by commas. Hyphens indicate ranges. For example, BAR_WORKER_COSVR 1-3,5,7 species a storage manager that can access onbar-worker processes running on coservers 1, 2, 3, 5, and 7. Do not put spaces between coserver names.

9-20

IBM Informix Backup and Restore Guide

BAR_WORKER_MAX

XPS

BAR_WORKER_MAX
oncong.std value
0

if value not present 0 takes effect When the database server starts

The BAR_WORKER_MAX conguration parameter determines how many storage spaces and logical logs can be backed up or restored in parallel on each storage manager. It also species the maximum number of onbarworker processes that the database server automatically starts for this storage-manager instance. If the BAR_WORKER_MAX value is 0, you must start the onbar-worker processes manually.

Specifying a Parallel Backup or Restore


For example, to start ve onbar-worker processes in parallel, set BAR_WORKER_MAX to 5. Set BAR_WORKER_MAX to the number of storage devices available to the storage manager. If the database server has multiple storage managers congured, the number of parallel operations is the sum of BAR_WORKER_MAX values for all storage managers. The maximum number of onbar-worker processes that run simultaneously depends on the capabilities of the storage manager. If onbar-worker processes for a specic storage manager have special startup requirements, such as environment variables, you can specify these by editing the start_worker script le. For information, see Using start_worker.sh to Start onbar_worker Processes Manually on page 8-7. If storage managers have dynamic requirements for onbar-worker processes, you might have to start them manually.

Setting ON-Bar Configuration Parameters 9-21

BAR_XFER_BUF_SIZE

Specifying a Serial Backup or Restore


You can specify serial backups and restores with Extended Parallel Server in two ways:
s

Set BAR_WORKER_MAX to 0 and manually start one onbar-worker process. You must start the onbar-worker processes manually before you can back up or restore data.

Set BAR_WORKER_MAX to 1. The database server starts one onbar-worker process and backs up or restores the data serially for this storage-manager instance.

IDS

BAR_XFER_BUF_SIZE
oncong.std value 31 units range of values page size
1 to 15 pages when the PAGESIZE is 4 kilobytes 1 to 31 when the PAGESIZE is 2 kilobytes

The maximum buffer size is 64 kilobytes, so


BAR_XFER_BUF_SIZE * pagesize <= 64 kilobytes

takes effect

When onbar starts

The BAR_XFER_BUF_SIZE conguration parameter species the size of each transfer buffer. The database server passes the buffer to ON-Bar and the storage manager. To calculate the size of the transfer buffer in a storage space or logical-log backup, use the following formula:
transfer buffers = BAR_XFER_BUF_SIZE * pagesize

To calculate how much memory the database server needs, use the following formula:
memory = (BAR_XFER_BUF_SIZE * PAGESIZE) + 500

The extra 500 bytes is for overhead. For example, if BAR_XFER_BUF_SIZE is 15, the transfer buffer should be 61,940 bytes. Important: You cannot change the buffer size between a backup and restore.
9-22 IBM Informix Backup and Restore Guide

BAR_XFER_BUFSIZE

XPS

BAR_XFER_BUFSIZE
oncong.std value 8 pages if value not present 32,768 / pagesize for platform units range of values takes effect
PAGESIZE which can be 2, 4, or 8 kilobytes
1

to 15 pages

When the onbar_w utility starts

The BAR_XFER_BUFSIZE conguration parameter species the size of each transfer buffer. The actual size of a transfer buffer is BAR_XFER_BUFSIZE * PAGESIZE + 500. The extra 500 is for overhead. For example, if BAR_XFER_BUFSIZE is 15 and the page size is 4 kilobytes, the transfer buffer should be 61,440 bytes. For generally good performance, set to 8, although different storage managers might suggest other values. The maximum value that XBSA allows is 64 kilobytes. If you set BAR_XFER_BUFSIZE to 8 when the page size is 8 kilobytes, the database server decrements the transfer buffer size to 7 pages so that the maximum value would be under 64 kilobytes (7 * 8 = 56). ON-Bar displays a warning message if the transfer buffer size is decremented. To calculate how much memory the database server needs, use the following formula:
kilobytes = BAR_WORKER_MAX * BAR_XFER_BUFSIZE * BAR_XPORT_COUNT * PAGESIZE

For example, you would need at least 1600 kilobytes of memory for the transfer buffers for ve onbar-worker processes if the page size is 4 kilobytes.
1600 kilobytes = 5 workers * 8 pages* 10 buffers * 4 kilobytes

Important: You cannot change the buffer size (value of BAR_XFER_BUFSIZE) between a backup and restore.

Setting ON-Bar Configuration Parameters 9-23

BAR_XPORT_COUNT

XPS

BAR_XPORT_COUNT
oncong.std value 10 if value not present 10 units range of values takes effect Buffers
3 to unlimited

When an onbar-worker process starts

The BAR_XPORT_COUNT conguration parameter species the number of data buffers that each onbar-worker process can use to exchange data with Extended Parallel Server. The value of this parameter affects onbar-worker performance. To calculate the amount of memory that each onbar_w process requires, use the following formula:
required_memory = (BAR_XPORT_COUNT * BAR_XFER_BUFSIZE * page_size) + 5 MB

For information on conguring the page size, see the Administrators Guide.

ISM_DATA_POOL
oncong.std value ISMData takes effect When onbar starts

The ISM_DATA_POOL parameter, when listed in the ONCONFIG le for the database server, species the volume pool that you use for backing up storage spaces. The value for this parameter can be any volume pool that ISM recognizes. If this parameter is not present, ISM uses the ISMData volume pool. For details, see the Informix Storage Manager Administrators Guide.
XPS

Insert the ISM_DATA_POOL parameter inside the BAR_SM paragraph in the storage-manager section of the ONCONFIG le if you want it to apply to one storage-manager instance. Insert ISM_DATA_POOL in the global section of the ONCONFIG le if you want it to apply to all storage-manager instances. For more information, see Files That ON-Bar and ISM Use on page 9-28.

9-24

IBM Informix Backup and Restore Guide

ISM_LOG_POOL

ISM_LOG_POOL
oncong.std value ISMLogs takes effect When onbar starts

The ISM_LOG_POOL parameter, when listed in the ONCONFIG le for the database server, species the volume pool that you use for backing up logical logs. The value for this parameter can be any volume pool that ISM recognizes. If this parameter is not present, ISM uses the ISMLogs volume pool. For details, see the Informix Storage Manager Administrators Guide.
XPS

Insert the ISM_LOG_POOL parameter inside the BAR_SM paragraph in the storage-manager section of the ONCONFIG le if you want it to apply to one storage-manager instance. Insert ISM_LOG_POOL in the global section of the ONCONFIG le if you want it to apply to all storage-manager instances. For more information, see Files That ON-Bar and ISM Use on page 9-28.

XPS

LOG_BACKUP_MODE
Use the LOG_BACKUP_MODE conguration parameter to determine how logical-log les are backed up after they ll. oncong.std value MANUAL range of values
CONT

Continuous = an onbar-worker process backs up each logical-log le as soon as it lls. Manual = queues the logical-log les until you can issue an onbar -b -l command. Use the NONE option if you do not want to back up the logs. The database server marks the logical logs as backed up as soon as they are full so that ON-Bar cannot back them up. When the database server starts up, it writes a message to the online.log if LOG_BACKUP_MODE = NONE.

MANUAL

NONE

takes effect

When the database server restarts

Setting ON-Bar Configuration Parameters 9-25

LTAPEDEV

Warning: If you set LOG_BACKUP_MODE to NONE, you cannot back up logs. All transactions in those logs are lost, and you will not be able to restore them. Your physical backups also will not be restorable.

IDS

LTAPEDEV
If you specify a tape device in the LTAPEDEV conguration parameter, ON-Bar ignores the value. ON-Bar also ignores the value of the LTAPEBLK, LTAPESIZE, TAPEDEV, TAPEBLK, and TAPESIZE parameters. Consider leaving these parameter values blank when you use ON-Bar because the storage manager sets these values. Warning: Set LTAPEDEV to /dev/null or leave it blank on UNIX or \dev\nul or NUL on Windows only if you do not want to back up the logical logs. The ON-Bar activity log will display a warning and return code 152. Because the database server marks the logical logs as backed up when they are no longer current, ON-Bar cannot nd logical logs to back up. All transactions in those logs are lost, and you will not be able to restore them. If you performed a whole-system backup with LTAPEDEV set to null, you must use the onbar -r -w -p command during restore to notify ON-Bar that you do not want to restore the logs. For more information, see Considerations When LTAPEDEV is Set to Null on page 6-20.

9-26

IBM Informix Backup and Restore Guide

RESTARTABLE_RESTORE

IDS

RESTARTABLE_RESTORE
Use the RESTARTABLE_RESTORE conguration parameter to enable or disable restartable restores. oncong.std value ON if value not present ON range of values
OFF

Disables restartable restore. If a restore fails and RESTARTABLE_RESTORE is OFF, you will not be able to restart it. Enables restartable restore. Set RESTARTABLE_RESTORE to ON before you begin a restore. Otherwise, you will be unable to restart the restore after a failure.

ON

takes effect

If you need to restart a physical restore, you do not need to restart the database server before you can use RESTARTABLE_RESTORE. If you need to restart a logical restore, you must restart the database server before you can use restartable restore.

Turning on RESTARTABLE_RESTORE slows down logical restore performance. For more information, see Using Restartable Restore to Recover Data on page 6-33. For information on the physical log, see the Administrators Guide.

Setting ON-Bar Configuration Parameters 9-27

Files That ON-Bar and ISM Use

Files That ON-Bar and ISM Use


Figure 9-2 lists the les that ON-Bar and ISM use and the directories in which they reside. These names and locations change if you set up the ONCONFIG le to values different than the defaults.
Figure 9-2 List of Files That ON-Bar and ISM Use Filename ac_cong.std Directory $INFORMIXDIR/etc, %INFORMIXDIR%\etc Purpose Template for archecker parameter values. The ac_cong.std le contains the default archecker (archive checking) utility parameters. To use the template, copy it into another le and modify the values. archecker message log. When you use archecker with ON-Bar to verify a backup, it writes brief status and error messages to the ON-Bar activity log and writes detailed status and error messages to the archecker message log. Informix Technical Support uses the archecker message log to diagnose problems with backups and restores. Specify the location of the archecker message log with the AC_MSGPATH conguration parameter. bar_act.log /tmp, %INFORMIXDIR% ON-Bar activity log. For more information, see The ON-Bar Activity Log on page 2-17. When the sysutils database is created, error messages appear in this le. Used in a cold restore. For more information, see The Emergency Boot Files on page 2-15. (1 of 3)

ac_msg.log

/tmp, %INFORMIXDIR%\etc

bldutil.process_id Emergency boot les (ixbar* les)

/tmp, \tmp $INFORMIXDIR/etc, %INFORMIXDIR%\etc

9-28

IBM Informix Backup and Restore Guide

Files That ON-Bar and ISM Use

Filename ISM catalog

Directory $INFORMIXDIR/ism, %ISMDIR%

Purpose Records information about backup and restore save sets and storage volumes that ISM uses. ISM creates the ISM catalog during the ism_startup initialization. The ISM catalog records are stored in the mm, index, and res les. For more information, see the Informix Storage Manager Administrators Guide.

ISM logs

$INFORMIXDIR /ism/logs, %ISMDIR%\logs $INFORMIXDIR/ism, %ISMDIR%\bin $INFORMIXDIR/etc, %INFORMIXDIR%\etc

Operator alert messages, backend status, additional ISM information. The ISM log names are daemon.log, messages, and summary. Identies the ISM version. Do not edit this le. Conguration information for ON-Bar restores. The database server creates the oncfg_servername.servernum le when you initialize disk space. The database server updates the le every time that you add or delete a dbspace, a logical-log le, or a chunk. The database server uses the oncfg* le when it salvages logical-log les during a cold restore. The database server uses the oncfg* les, so do not delete them. Conguration information for ON-Bar restores. On XPS, the oncfg* les are on each coserver. ISM commands use these executable les. Do not edit them. (2 of 3)

ISMversion oncfg_servername. servernum (IDS)

oncfg_servername. $INFORMIXDIR/etc, servernum.coserverid %INFORMIXDIR%\etc (XPS) save, savegrp, savefs $INFORMIXDIR/bin, %ISMDIR%\bin

Setting ON-Bar Configuration Parameters 9-29

Files That ON-Bar and ISM Use

Filename sm_versions

Directory $INFORMIXDIR/etc, %INFORMIXDIR%\etc

Purpose Identies storage manager in use. To update the storage-manager version, edit the sm_versions le directly or run the ism_startup script. For more information, see Updating the sm_versions File on page 3-5. XBSA library call information. ON-Bar and ISM use XBSA to communicate with each other. Informix Technical Support uses the xbsa.messages log to x problems with ON-Bar and ISM communications. Internal server conguration information. The xcfg* le contains information about coserver location and dbslice denitions. (3 of 3)

xbsa.messages

$INFORMIXDIR /ism/applogs, %ISMDIR%\applogs

xcfg_servername.serve rnum (XPS)

$INFORMIXDIR/etc, %INFORMIXDIR%\etc

9-30

IBM Informix Backup and Restore Guide

Chapter

ON-Bar Catalog Tables

10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 10-3 10-5 10-7 10-8 10-9 10-9 10-11 10-12 10-13 10-14 10-14 10-15 10-15 10-16 10-16

In This Chapter .

. . . . . . .

. . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

The bar_action Table . The bar_instance Table The bar_object Table . The bar_server Table . The bar_version Table . ON-Bar Catalog Map .

Backup Scheduler SMI Tables sysbuobject . . . . . sysbuobjses . . . . . sysbusession. . . . . sysbusm . . . . . . sysbusmdbspace . . . sysbusmlog . . . . . sysbusmworker . . . sysbuworker. . . . .

10-2

IBM Informix Backup and Restore Guide

In This Chapter
This chapter describes the ON-Bar tables that are stored in the sysutils database. ON-Bar uses these tables for tracking backups and performing restores. You can query these tables for backup and restore data to evaluate performance or identify object instances for a restore.

The bar_action Table


The bar_action table lists all backup and restore actions that are attempted against an object, except during certain types of cold restores. Use the information in this table to track backup and restore history.
Column Name act_aid Type SERIAL Explanation Action identier. A unique number within the table. Can be used with act_oid to join with the bar_instance table. Object identier. Identies the backup object against which a backup or restore attempt is made. Can be used with act_aid to join with bar_instance. The act_oid column of the bar_action table equals the obj_oid column of the bar_object table. (1 of 2)

act_oid

INTEGER

ON-Bar Catalog Tables 10-3

The bar_action Table

Column Name act_type

Type INTEGER

Explanation Identies the attempted action: 1 for backup, 2 for restore, 3 for a foreign or imported restore, 4 for a fake backup, 5 for a whole-system backup, 6 for a whole-system restore, 7 for expired or deleted objects, 8 for an external restore. Fake backups, whole-system backups, and whole-system restores are available on IDS only.

act_status

INTEGER

Identies the result of the action: 0 if successful, otherwise an ON-Bar-specic error code. For more information, see Appendix 11, ON-Bar Messages and Return Codes. The date and time when the action began.

act_start

DATETIME YEAR TO SECONDS DATETIME YEAR TO SECONDS

act_end

The date and time when the action nished.

(2 of 2)

10-4

IBM Informix Backup and Restore Guide

The bar_instance Table

The bar_instance Table


ON-Bar writes a record to the bar_instance table for each successful backup. The table describes each object that is backed up. ON-Bar might later use the

information for a restore operation. For example, if you specify a level-2 backup, ON-Bar uses this table to ensure that a level-1 backup was done previously.
Column Name ins_aid Type INTEGER Explanation Action identier. Identies the successful action that created this instance of the backup object. Combined with ins_oid, can be used to join with the bar_action table. Object identier. Identies the affected object. Can be used to join with the bar_object table. Combined with ins_aid, can be used to join with the bar_action table. Time stamp (real clock time). The database server uses this value when it creates the next-level backup. Value represents the number of seconds since midnight, January 1, 1970, Greenwich mean time. For IDS, the ins_time value is 0. rsam_time INTEGER The backup checkpoint time stamp. Not a clock time. The database server uses this value when it creates the next level backup. Level of the backup action: 0 for a complete backup, 1 for a backup of any changes to this object since its last level-0 backup, 2 for a backup of any changes since the last level-1 backup. This value is always 0 for logical-log backups. The high bits of the instance copy identier. Combined with ins_copyid_lo, it is a unique value that the storage manager assigns to link the ON-Bar object identier with the storage-manager object identier. (1 of 3)

ins_oid

INTEGER

ins_time (XPS only)

INTEGER

ins_level

SMALLINT

ins_copyid_hi

INTEGER

ON-Bar Catalog Tables 10-5

The bar_instance Table

Column Name ins_copyid_lo

Type INTEGER

Explanation The low bits of the instance copy identier. Combined with ins_copyid_hi, it is a unique value that the storage manager assigns to link the ON-Bar object identier with the storage-manager object identier. Stores the required action ID for a backup object. Used in a restore to determine which level-0 backup goes with the level-1 backup, and which level-1 backup goes with the level-2 backup. For a level-0 backup, the value of ins_req_aid is the same as ins_aid in this table. For example, if this backup is level-1, ins_req_aid holds the action ID of the corresponding level-0 backup of this object. The coserver ID from which this object came. In a standard backup, identies the rst logical log required to restore from this backup. The ID of the log that contains the rsam_time checkpoint. Used during backup to verify that logs needed for restore are backed up. Log ID of the last log needed during logical restore for this storage space to restore it to the time of the backup. Value is 0 if the logical-log le was completely backed up. Value is 1 if the logical-log le was not completely backed up. Normally, log les are completely backed up, but during log salvage, the log les might be missing some data at the end. In a database server failure, the log records for the most recent transactions might not have been written to disk if you use buffered logging.

ins_req_aid

INTEGER

ins_logstream (XPS only) ins_rst_log ins_chpt_log (XPS only) ins_last_log (XPS only) ins_partial (XPS only)

INTEGER INTEGER INTEGER

INTEGER

INTEGER

ins_sm_id (XPS only)

INTEGER

Storage-manager instance ID. Created from BAR_SM in $ONCONFIG or %ONCONFIG%. (2 of 3)

10-6

IBM Informix Backup and Restore Guide

The bar_object Table

Column Name ins_sm_name (XPS only) ins_verify

Type CHAR(18)

Explanation Storage-manager instance name. Created from the BAR_SM_NAME parameter in the ONCONFIG le. Value is 1 if the backup is veried. Value is 0 if the backup is not veried. The current date is inserted when a backup is veried. If this backup has not been not veried, a dash represents each date and time. (3 of 3)

INTEGER

ins_verify_date DATETIME YEAR TO SECOND

The bar_object Table


The bar_object table describes each backup object. This table is a list of all storage spaces and logical logs from each database server for which at least one backup attempt was made.
Column Name obj_srv_name Type CHAR(18 or 128) Explanation The database server name. Used to ensure that objects are restored to the correct database server. Used when multiple database servers are on the node to ensure that objects are restored in the database server instance to which the object belongs. XPS: Name can be up to 18 characters. IDS: Name can be up to 128 characters. obj_oid SERIAL The object identier. A unique number within the table. Can be used to join with the bar_action and bar_instance tables. (1 of 2)

ON-Bar Catalog Tables 10-7

The bar_server Table

Column Name obj_name

Type CHAR(18 or 128)

Explanation The user name for the object. On IDS, the name can be up to 128 characters. On XPS, 15:3 is the name of log le 3 on coserver 15. The name can be up to 18 characters.

obj_type

CHAR(2)

Backup object type: CD L ND R B = = = = = critical dbspace logical log noncritical dbspace or sbspace rootdbs blobspace (IDS only) (2 of 2)

The bar_server Table


The bar_server table lists the database servers in an installation. This table is used to ensure that backup objects are returned to their proper places during a restore.
Column Name srv_name Type CHAR(18 or 128) Explanation DBSERVERNAME value specied in the ONCONFIG le. Database server name can be up to 128 characters on IDS or up to 18 characters on XPS. srv_node CHAR(18 or 256) Hostname of the computer where the database server resides. Hostname can be up to 256 characters on IDS or up to 18 characters.

10-8

IBM Informix Backup and Restore Guide

The bar_version Table

The bar_version Table


The bar_version table has been removed from the sysutils database. Use the sm_versions le to update the storage-manager information instead. For more information, see Updating the sm_versions File on page 3-5.

ON-Bar Catalog Map


IDS

Figure 10-1 maps the ON-Bar tables on Dynamic Server. The gray lines show the relations between tables. The arrows show that the ins_req_aid value must be a valid ins_aid value.
Figure 10-1 ON-Bar Catalog Map on Dynamic Server

bar_server srv_name srv_node

bar_object obj_srv_name obj_oid obj_name obj_type

bar_action act_aid act_oid act_type act_status act_start act_end

bar_instance ins_aid ins_oid ins_time ins_level ins_copyid_hi ins_copyid_lo ins_req_aid ins_rst_log ins_verify ins_verify_date

ON-Bar Catalog Tables 10-9

ON-Bar Catalog Map

XPS

Figure 10-2 maps the ON-Bar tables on Extended Parallel Server. The gray lines show the relations between tables. The arrows show that the ins_req_aid value must a valid ins_aid value.
Figure 10-2 ON-Bar Catalog Map on Extended Parallel Server

bar_server srv_name srv_node

bar_object obj_srv_name obj_oid obj_name obj_type

bar_action act_aid act_oid act_type act_status act_start act_end

bar_instance ins_aid ins_oid ins_time rsam_time ins_level ins_copyid_hi ins_copyid_lo ins_req_aid ins_logstream ins_rst_log ins_chpt_log ins_last_log ins_partial ins_sm_id ins_sm_name ins_verify ins_verify_date

10-10

IBM Informix Backup and Restore Guide

Backup Scheduler SMI Tables

XPS

Backup Scheduler SMI Tables


The following system-monitoring interface (SMI) pseudo-tables in the sysmaster database contain information about the Backup Scheduler. For information about other SMI tables, see the Administrators Reference.
Table sysbuobject sysbuobjses sysbusession sysbusm sysbusmdbspace sysbusmlog sysbusmworker sysbuworker Description Detailed information about backup objects that the Backup Scheduler is processing Backup object name and session ID Session status information Storage-manager conguration information Storage manager for backing up dbspaces on a coserver Storage manager for backing up logs on a coserver Coservers where onbar-worker processes can access a storage manager Detailed onbar-worker status Reference page 10-12 page 10-13 page 10-14 page 10-14 page 10-15 page 10-15 page 10-16 page 10-16

ON-Bar Catalog Tables 10-11

sysbuobject

sysbuobject
The sysbuobject table provides information about the backup and restore objects that the Backup Scheduler is processing.
Column owner priority order_hi order_lo placement retries timestamp dbsname level log_num is_backup is_restore is_check is_block is_external is_dbspace is_log Type integer integer integer integer integer integer integer char(18) integer integer integer integer integer integer integer integer integer Description The coserver owner of the object Priority in the Backup Scheduler queue for this session The high-order word of the restore order for the object (high 32 bits of a 64-bit number) The low-order word of the restore order for the object (low 32 bits of a 64-bit number) The storage-manager instance where this object is located Number of times that the backup or restore is retried The global time for the object The dbspace name The backup level of the dbspace The logical-log number A value of 1 means this object is to be backed up. A value of 1 means this object is to be restored. A value of 1 means this object is to be veried with the archecker utility. A value of 1 means the coserver is blocked for an external backup. A value of 1 means an external restore of a dbspace is in progress. A value of 1 means this object is a dbspace. A value of 1 means this object is a logical-log le. (1 of 2) 10-12 IBM Informix Backup and Restore Guide

sysbuobjses

Column is_coserver is_running is_ready is_waiting is_suspend is_cold

Type integer integer integer integer integer integer

Description A value of 1 means this object is a coserver (used for external backup and restore). A value of 1 means this object is being processed. A value of 1 means this object is ready to be processed. A value of 1 means this object cannot be processed yet. A value of 1 means processing of this object is suspended. A value of 1 means this object is to be cold-restored. (2 of 2)

sysbuobjses
The sysbuobjses table lists the backup object name and session ID. You can join the sysbuobjses table with the sysbusession table on the ses_id column to get all the backup objects in a specic session.
Column obj_name ses_id Type char(18) char(128) Description Object name Name of the backup or restore session

ON-Bar Catalog Tables 10-13

sysbusession

sysbusession
The sysbusession table shows the status of the current backup or restore session. The information in the sysbusession table is similar to the onstat -g bus output.
Column id count is_complete is_waiting is_suspended error Type Description

char(128) Name of the backup or restore session. integer integer integer integer integer Number of objects in the backup or restore session. A value of 1 means the session is complete. A value of 1 means the session is waiting for work. A value of 1 means the session is suspended. Error value that is returned to the ON-Bar driver.

sysbusm
The sysbusm table provides information about the storage-manager conguration, storage-manager retry status, and active onbar-worker processes.
Column id name worker max_idle retries pending registered Type integer char(18) integer integer integer integer integer Description ID of this storage-manager instance. Storage-manager name. Number of onbar-worker processes. The idle time-out value. If an onbar-worker has been idle the specied time, it is terminated. Times to retry the backup or restore for a storage manager. Number of pending onbar-worker processes. Number of registered onbar-worker processes for this storage manager.

10-14

IBM Informix Backup and Restore Guide

sysbusmdbspace

sysbusmdbspace
The sysbusmdbspace table provides information about which storage manager is congured to back up dbspaces for a coserver. This table contains the value of the BAR_DBS_COSVR parameter.
Column id cosvr_id Type integer integer Description Storage-manager ID. Dbspaces on this coserver are backed up or restored to this storage manager.

sysbusmlog
The sysbusmlog table provides information about which storage manager is congured to back up logical logs for a coserver. This table contains the value of the BAR_LOG_COSVR parameter.
Column id cosvr_id Type integer integer Description Storage-manager ID. Logical logs on this coserver are backed up or restored to this storage manager.

ON-Bar Catalog Tables 10-15

sysbusmworker

sysbusmworker
The sysbusmworker table lists the coserver IDs of onbar-worker processes that are congured for a storage manager. To display the list of active onbarworker processes for a storage manager, join the sysbuworker table with the sysbusmworker table (sysbusmworker.id = sysbuworker.sm). This table contains the same list of storage managers as the BAR_WORKER_COSVR parameter. For example, use the SELECT * FROM sysbusmworker WHERE id = 1 command to display information on the storage manager listed in BAR_SM 1.
Column id cosvr_id Type integer integer Description Storage-manager ID. Coserver on which the onbar-worker is running.

sysbuworker
The sysbuworker table provides status information about onbar-worker processes.
Column id cosvr pid sm obj_name is_new is_free is_wait Type integer integer integer integer char(18) integer integer integer Description ID of the onbar-worker. Coserver on which the onbar-worker is running. Process ID. Storage-manager ID. Name of the current backup or restore object. A value of 1 means this onbar-worker is initializing. A value of 1 means this onbar-worker is free for another job. A value of 1 means this onbar-worker is waiting for its next task. (1 of 2) 10-16 IBM Informix Backup and Restore Guide

sysbuworker

Column is_busy is_dead event_dbu event_phr event_lbu event_lgr event_lbuplace event_phrplace event_dbplace event_lgrplace event_cold idle_time

Type integer integer integer integer integer integer integer integer integer integer integer integer

Description A value of 1 means this onbar-worker is processing an object. A value of 1 means this onbar-worker is dead. A value of 1 means this onbar-worker can accept dbspace backup jobs. A value of 1 means this onbar-worker can accept dbspace restore jobs. A value of 1 means this onbar-worker can accept logical backup jobs. A value of 1 means this onbar-worker can accept logical restore jobs. A value of 1 means this onbar-worker determines the correct storage manager to handle logical backups. A value of 1 means this onbar-worker determines the correct storage manager to handle dbspace restores. A value of 1 means this onbar-worker determines the correct storage manager to handle dbspace backups. A value of 1 means this onbar-worker determines the correct storage manager to handle logical restores. A value of 1 means this onbar-worker can process an object that is part of a cold restore. How long this onbar-worker has been idle. (2 of 2)

ON-Bar Catalog Tables 10-17

Chapter

ON-Bar Messages and Return Codes


In This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3 11-3 11-3 11-4 11-5 11-9

11

About ON-Bar Messages . Message Format . . Message Numbers. . ON-Bar Usage Messages . ON-Bar Return Codes . .

11-2

IBM Informix Backup and Restore Guide

In This Chapter
The rst part of this chapter describes the ON-Bar activity log le and the ON-Bar usage messages. Both Dynamic Server, Version 9.3, and Extended Parallel Server, Version 8.3, share common ON-Bar messages. The second part of this chapter describes the ON-Bar return codes. For information on ON-Bar informational, progress, warning, and error messages, use the nderr or Find Error utility or view Informix Error Messages in Answers OnLine.

About ON-Bar Messages


This section explains how to read and interpret messages in the ON-Bar activity log le. For more information, see The ON-Bar Activity Log on page 2-17.

Message Format
A message in the ON-Bar activity log le has the following format:
timestamp process_id parent_process_id message

Figure 11-1 describes each eld in the message. No error message numbers appear in the ON-Bar activity log.

ON-Bar Messages and Return Codes 11-3

Message Numbers

Figure 11-1 ON-Bar Message Format Message Field timestamp process id parent process id message Description Date and time when ON-Bar writes the message. The number that the operating system uses to identify this instance of ON-Bar. The number that the operating system uses to identify the process that executed this instance of ON-Bar. The ON-Bar message text.

The following example illustrates a typical entry in the ON-Bar activity log:
1999-08-18 10:09:59 773 772 Completed logical restore.

Important: If you receive an XBSA error message, consult the storage-manager logs for more details.

Message Numbers
The ON-Bar message numbers range from -43000 to -43421. The following table lists the ON-Bar message groups. Because message numbers do not display in the activity log, the best way to nd information about ON-Bar messages is to search the message text in Informix Error Messages in Answers OnLine.
ON-Bar Message Type ON-Bar usage Options checking Permission checking Emergency boot le interface ONCONFIG le interface Operating system interface Message Numbers -43000 to -43009 -43010 to -43034 -43035 to -43039 -43040 to -43059 -43060 to -43074 -43075 to -43099 (1 of 2) 11-4 IBM Informix Backup and Restore Guide

ON-Bar Usage Messages

ON-Bar Message Type Database server interface Backup and restore status Onbar-worker processes XBSA interface onsmsync archecker ondblog

Message Numbers -43100 to -43229 -43230 to -43239 -43240 to -43254 -43255 to -43304 -43305 to -43319 -43320 to -43334 -43400 to -43421 (2 of 2)

ON-Bar Usage Messages


This section lists usage messages only. All informational, progress, warning, and error messages appear in nderr and Informix Error Messages in Answers OnLine. Important: You must specify the -b, -v, or -r option rst in the command so that ON-Bar can determine whether it is performing a backup, verication, or restore. The only exception is when you start or stop the ON-Bar session command on Extended Parallel Server.

ON-Bar Messages and Return Codes 11-5

ON-Bar Usage Messages

-43000
IDS

ON-Bar backup and verication usage.


For Dynamic Server -b [-L level] [-w | -f filename | spaces] [-O] -b -F -b -l [-c | -C | -s] [-O] -v [-p] [-t time] [-f filename | spaces] -b back up -c back up current logical log -C continuous logical-log backup -f pathname of file containing list of storage spaces -F fake backup -l back up full logical logs (no spaces) -L back up level: 0, 1, or 2; defaults to 0 -O override internal error checks - enforce policy strictly -w whole-system backup -s salvage logs -v verify consistency of most recent backups spaces list of storage spaces

XPS

For Extended Parallel Server -b [-v] [-p] [-q name] [-L level] [-f filename | spaces] -b -l [-q name] [-s] [-f filename | coservers] -v [-p] [-t time] [-q name] [-L level] [-f filename | spaces] back up pathname of file containing list of storage spaces back up full logical logs (no spaces) back up level: 0, 1, or 2; defaults to 0 back up spaces only (no logs) identifies the backup session, default DBSERVERNAMEpid salvage logs verify consistency of most recent backups (For details, contact Technical Support) spaces list of storage spaces coservers coserverlogs to back up -b -f -l -L -p -q -s -v

The backup or verication command was entered incorrectly. Revise the command and try again. The -b or -v parameter must come rst in the command.

11-6

IBM Informix Backup and Restore Guide

ON-Bar Usage Messages

-43001
IDS

ON-Bar restore usage.


For Dynamic Server -r [-e] [-O] [-f filename | spaces] -r [-e] [-t time | -n log] [-O] -r -p [-e] [-t time] [-O] [-f filename | spaces] -r -l [-t time | -n log] -r -w [-e] [[-p] [ -t time] | -n log] [-O] -RESTART

XPS

For Extended Parallel Server -r [-e] [-q name] [-O] [-f filename | spaces] -r [-e] [-q name] [-t time] [-O] -r -p [-e] [-q name] [-t time] [-O] [-f filename | spaces] -r -l [-q name] [-t time] [-f filename | logstreams] -e external restore -f pathname of file containing list of storage spaces -l logical-log only restore (no spaces) -n last logical log to restore -O override internal error checks - enforce policy strictly -p physical only restore (no logs) -q name to identify the restore session -r restore -t point in time to stop restore -w whole system to restore -RESTART restart an interrupted restore spaces list of storage spaces or logstreams to restore

The restore command was entered incorrectly. Revise the command and try again. You must specify the -r parameter rst. -43002
XPS

ON-Bar session usage.


For Extended Parallel Server {on | ON | off | OFF | -d} [-q] session_name on/ON off/OFF -d -q resume a suspended backup/restore session suspend a backup/restore session destroy backup/restore session name to identify the session

The session command was entered incorrectly. Revise the command and try again. The session name is required.

ON-Bar Messages and Return Codes 11-7

ON-Bar Usage Messages

-43003
XPS

onbar_w usage.
For Extended Parallel Server [-b] [-d] [-l] [-r] [-p] -b -d -l -r -p If accept backup requests accept db/blobspaces accept logical logs accept restore requests accept storage manager placement requests no commands are entered, accept all requests by default.

The onbar_w command was entered incorrectly. Revise the command and try again. -43006 onsmsync usage.
onsmsync [-g gen | -t time | -i interval] [-O] [-f filename | spaces] onsmsync -b -b just regenerate the emergency boot file -f pathname of file containing list of storage spaces -g number of generations/versions of level-0 backup to retain -i time interval (age) before which objects should be expired -t datetime before which objects should be expired -O override internal error checks - enforce policy strictly spaces list of storage spaces to check for expiration

The onsmsync command was entered incorrectly. Revise the command and try again.

11-8

IBM Informix Backup and Restore Guide

ON-Bar Return Codes

ON-Bar Return Codes


Figure 11-2 shows the ON-Bar return codes for all Informix database servers. These return codes are accompanied by messages in the ON-Bar activity log. For details about an ON-Bar or storage-manager error, review the activity log before you call Informix Technical Support.
Figure 11-2 Common ON-Bar Return Codes Decimal Value 2 through 34 100 ON-Bar Return Code Description These return codes are produced by XBSA. For more information, consult your storagemanager documentation and log les. ON-Bar cannot nd something in sysutils, the emergency boot le, or storage-manager catalogs that it needs for processing. Check the ON-Bar activity log for messages that say what could not be found and try to resolve that problem. If the problem recurs, contact Informix Technical Support. 104 Adstar Distributed Storage Manager (ADSM) is in generate-password mode. ON-Bar does not support ADSM running in generate-password mode. For information on changing the ADSM security conguration, refer to your ADSM manual. 119 The logical log is full on one or more coservers. Perform a logical-log backup. 120 The transport buffer size has changed since this object was last backed up. This object cannot be restored. Set the transport-buffer size to its original value and retry the restore. 121 Error occurred on dbslice name expansion (XPS). ON-Bar was unable to determine the list of dbspaces in a dbslice. 122 Deadlock detected. The ON-Bar command is contending with another process. Retry the ON-Bar command. (1 of 7)

ON-Bar Messages and Return Codes 11-9

ON-Bar Return Codes

Decimal Value 123

ON-Bar Return Code Description The root dbspace was not in the cold restore. You cannot perform a cold restore without restoring the root dbspace. To resolve the problem, try one of the following procedures:
s

Bring the database server to quiescent or online mode and restore just the storage spaces that need to be restored. If the database server is ofine, issue the onbar -r command to restore all the storage spaces. Make sure that the root dbspace and other critical dbspaces are listed on the command line or in the -f lename.

124

The buffer had an incomplete page during the backup. For assistance, contact Informix Technical Support.

126

Error processing the emergency boot le. Check the ON-Bar activity log for descriptions of the problem and the emergency boot le for corruption such as non-ASCII characters or lines with varying numbers of columns. If the source of the problem is not obvious, contact Informix Technical Support.

127

Could not write to the emergency boot le. Often, an operating-system error message accompanies this problem. Check the permissions on the following les and directories:
s s s

$INFORMIXDIR/etc on UNIX or %INFORMIXDIR%\etc on Windows The emergency boot le The directory that BAR_BOOT_DIR points to (XPS only).

128

Data is missing in the object description. For assistance, contact Informix Technical Support.

129

ON-Bar received a different object for restore than it had expected. (The backup object did not match.) The requested backup object might have been deleted or expired from the storage manager. Run onsmsync to synchronize the sysutils database, emergency boot le, and storagemanager catalogs. For assistance, contact Informix Technical Support. (2 of 7)

11-10

IBM Informix Backup and Restore Guide

ON-Bar Return Codes

Decimal Value 130

ON-Bar Return Code Description Database server is not responding. The database server probably failed during the backup or restore. Run the onstat command to check the database server status and then:
s s

If the operation was a cold restore, restart it. If the operation was a backup or warm restore, restart the database server and retry the backup or warm restore.

131

A failure occurred in the interface between ON-Bar and the database server. For assistance, contact Informix Technical Support.

132

Function is not in the XBSA shared library. Verify that you are using the correct XBSA for the storage manager. For information, consult your storage-manager manual.

133

Failed to load the XBSA library functions. Verify that you are using the correct XBSA for the storage manager. Ensure that the BAR_BSALIB_PATH value in the ONCONFIG le points to the correct location of the XBSA shared library. For information, consult your storage-manager manual.

134

User wants to restore a logical-log le that is too early. You probably tried a point-in-log restore (onbar -r -l -n) after performing a separate physical restore. The specied logical log is too old to match the backups used in the physical restore. Perform either of the following steps:
s s

Rerun the physical restore from an older set of physical backups. Specify a later logical log in the -n option when you rerun the point-in-log restore. To nd the earliest logical log that you can use, look at the emergency boot le. For assistance, contact Informix Technical Support.

136

ON-Bar cannot warm restore the critical dbspaces. Perform either of the following steps:
s s

Reissue the warm-restore command without listing any critical dbspaces. Shut down the database server and perform a cold restore.

137

The MAX_DBSPACE_COUNT was exceeded. For assistance, contact Informix Technical Support. (3 of 7)

ON-Bar Messages and Return Codes 11-11

ON-Bar Return Codes

Decimal Value 138

ON-Bar Return Code Description An XBSA error occurred. Verify that you are using the correct XBSA for the storage manager. Also check the bar_act.log for XBSA error messages. For information, consult your storage-manager manual.

139

Either the XBSA version is missing from the sm_versions le or the incorrect XBSA version is in the sm_versions le. Insert the correct XBSA version into the sm_versions le. For more information, consult your storage-manager manual.

140

A fake backup failed. Retry the fake backup using the onbar -b -F command. Only IDS supports fake backups. If the fake backup fails again, contact Informix Technical Support.

141

ON-Bar received an operating-system signal. Most likely, the user entered the Ctrl-C command to stop an ON-Bar process. Fix the cause of the interruption and then retry the ON-Bar command.

142

ON-Bar was unable to open a le. Verify that the named le exists and that the permissions are correct. Check the ON-Bar activity log for an operating-system error message.

143

ON-Bar was unable to create a child process. If BAR_MAX_BACKUP is not 0, ON-Bar could not create child processes to perform the parallel backup or restore. The operating system probably ran out of resources. Either not enough memory is available to start a new process or no empty slot exists in the process table. Check the operating-system logs, the ON-Bar activity log, or the console.

144

The log backup was aborted because one or more blobspaces were down. Attempt to restore the blobspace. If the restore fails, retry the log backup using the onbar -l -O command. Executing this command might make the blobspace unrestorable.

145

ON-Bar was unable to acquire more memory space. Wait for system resources to free up and retry the ON-Bar command.

146

ON-Bar was unable to connect to the database server. The network or the database server might be down. For assistance, contact Informix Technical Support. (4 of 7)

11-12

IBM Informix Backup and Restore Guide

ON-Bar Return Codes

Decimal Value 147

ON-Bar Return Code Description ON-Bar was unable to discover any storage spaces or logical logs to back up or restore. For example, if you specify a point-in-time restore but use a datetime value from before the rst standard backup, ON-Bar cannot build a list of storage spaces to restore. This return code also displays if you specify a whole-system restore without having performed a whole-system backup. Verify that the database server and the storage spaces are in the correct state for the backup or restore request. Contact Informix Technical Support.

148

An internal SQL error occurred. Provide Informix Technical Support with the information from the ON-Bar activity log.

149

Either you entered the wrong ON-Bar syntax on the command line or entered an invalid or incorrect datetime value for your GLS environment. Check the command that you tried against the usage message in the ON-Bar activity log. If that does not help, then retry the command with quotes around the datetime value. If your database locale is not English, use the GL_DATE or GL_DATETIME environment variables to set the date and time format.

150

Error collecting data from the ONCONFIG le. Check the permissions, format, and values in the ONCONFIG le. Check that the ONCONFIG environment variable is set correctly.

151

The database server is in an incorrect state for this backup or restore request, or an error occurred while determining the database server state. Either you attempted an operation that is not compatible with the database server mode or ON-Bar is unable to determine the database server state. For example, you cannot do a physical backup with the database server in recovery mode. Check the error message in the ON-Bar activity log. If an ASF error occurred, the following message displays in the ON-Bar activity log:
Fatal error initializing ASF; asfcode = code

To determine the cause of the ASF error, refer to the ASF error code in this message and repeat the backup or restore command. If an ASF error did not occur, change the database server state and repeat the backup or restore command. (5 of 7)

ON-Bar Messages and Return Codes 11-13

ON-Bar Return Codes

Decimal Value 152

ON-Bar Return Code Description ON-Bar cannot back up the logical logs. The logical logs are not backed up for either of the following reasons:
s s

If another log backup is currently running. If you perform a logical-log backup with the LTAPEDEV parameter set to /dev/null (UNIX) or nul (Windows).

You receive this return code when no log backups can be done. To enable log backups, change the LTAPEDEV parameter to a valid value. 153 ON-Bar cannot set the process group id. If BAR_MAX_BACKUP is set to any value other than 1 and ON-Bar encounters an error setting the process group id, this value is returned. This message is a warning of a possible operating-system problem. 154 The ON-Bar user does not have the correct permissions. You must be user root or informix or a member of the bargroup group on UNIX or a member of the Informix-Admin group on Windows to execute ON-Bar commands. 155 The INFORMIXSERVER environment variable is not set. Set the INFORMIXSERVER environment variable to the correct database server name. 157 Error attempting to set the INFORMIXSHMBASE environment variable to -1. ON-Bar could not set INFORMIXSHMBASE to -1. For assistance, contact either the system administrator or Informix Technical Support. 158 An internal ON-Bar error occurred. Contact Informix Technical Support. 159 An unexpected error occurred. Contact Informix Technical Support. 160 External restore failed. To determine what went wrong with the external restore, look at the bar_act.log and the online.log les. Ensure that you already performed the manual part of the external restore before you retry the onbar-r -e command to complete the external restore. If that does not work, try the external restore from a different external backup. 161 Restarted restore failed. Verify that RESTARTABLE_RESTORE is set to ON and try the original restore again. For more information, check the ON-Bar activity log and database server message logs (IDS). (6 of 7)

11-14

IBM Informix Backup and Restore Guide

ON-Bar Return Codes

Decimal Value 177

ON-Bar Return Code Description An online dbspace was restored. This return code noties the user that the -O option overrode the internal checks in ON-Bar. You do not need to take any action.

178

The logical log was backed up while one or more blobspaces were down. This return code noties the user that the -O option overrode the internal checks in ON-Bar. Examine the data in the blobspace to determine which simple large objects you need to recreate. These blobspaces might not be restorable. For assistance, contact Informix Technical Support.

179

ON-Bar created the chunk needed to restore the dbspace. This return code noties the user that the -O option overrode the internal checks in ON-Bar. You do not need to take any action.

180

ON-Bar could not create the chunk needed to restore the dbspace. Create the chunk le manually. Retry the restore without the -O option.

181

ON-Bar expired an object that was needed for a backup or restore. The onsmsync utility expired an object that might be needed for a restore. You probably specied onsmsync with the -O option. If you used the -O option by mistake, contact Informix Technical Support to recover the object from the storage manager.

247

Merging of emergency boot les timed out because it took too long. (XPS) On UNIX, look in /tmp/bar_act.log and the le that the BAR_ACT_LOG parameter points to for clues. (The onbar-merger writes to /tmp/bar_act.log until it has enough information to read the ONCONFIG le.) Resolve the problems that the bar_act.log describes and retry the cold restore. If the cold restore still fails, contact Informix Technical Support.

252

Received the wrong message from onbar_m that merges the emergency boot les. (XPS) For assistance, contact Informix Technical Support. (7 of 7)

ON-Bar Messages and Return Codes 11-15

The ontape Backup and Restore System


Chapter 12 Chapter 13 Chapter 14 Configuring ontape Backing Up with ontape Restoring with ontape

Section III

Chapter

Conguring ontape

12
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3 12-3 12-4 12-5 12-6 12-6 12-7 12-7 12-7 12-8 12-8 12-8 12-9 12-9 12-9

In This Chapter .

Setting the ontape Conguration Parameters . . . . . . . . Setting the Tape-Device Parameters . . . . . . . . . . Specifying Separate Devices for Storage-Space and Logical-Log Backups . . . . . . . . . . . Using Symbolic Links to Specify Tape Devices. . . . . Specifying a Remote Device . . . . . . . . . . . Using /dev/null for a Tape Device . . . . . . . . Rewinding Tape Devices Before Opening and on Closing . Specifying the Tape-Block-Size Parameters . . . . . . . Specifying the Tape-Size Parameters . . . . . . . . . Checking and Changing ontape Conguration Parameters Who Can Change ontape Parameters? . . . . . . When Can You Change ontape Parameters? . . . . Changing TAPEDEV to /dev/null . . . . . . Changing LTAPEDEV to /dev/null . . . . . Verifying That the Tape Device Can Read the Specied Block Size . . . . . . . . Changing ontape Parameters . . . . . . . . . Changing Backup-Tape Parameters . . . . . Changing Logical-Log Backup Tape Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 12-9 . 12-10 . 12-10 . 12-10

12-2

IBM Informix Backup and Restore Guide

IDS

In This Chapter
This chapter explains how to set the conguration parameters that the ontape utility uses for backups of storage spaces and logical logs. For a description of how ontape differs from ON-Bar, see Comparing ON-Bar and ontape on page 1-12. This chapter describes the following tasks:
s s s

Setting the conguration parameters for ontape Checking conguration parameters for ontape Changing conguration parameters for ontape

Chapter 13, Backing Up with ontape describes how to use the ontape utility to back up storage spaces and logical-log les.

Setting the ontape Conguration Parameters


The ontape utility uses six parameters in the ONCONFIG le to create storagespace and logical-log backups. The ONCONFIG le is located in the $INFORMIXDIR/etc directory. You specify that le in the ONCONFIG environment variable. For a description of the ONCONFIG environment variable and instructions on how to set it, see the Informix Guide to SQL: Reference. The rst set of ONCONFIG parameters species the characteristics of the tape device and tapes for storage-space backups; the second set species the characteristics of the tape device and tapes for logical-log backups.

Configuring ontape 12-3

Setting the Tape-Device Parameters

The following list shows backup tape devices and their associated tape parameters.
TAPEDEV TAPEBLK TAPESIZE is the tape device used for storage-space backups. is the block size of the tapes used for storage-space backups, in kilobytes. is the size of the tapes used for storage-space backups, in kilobytes.

The following list shows the logical-log tape devices and their associated tape parameters.
LTAPEDEV LTAPEBLK LTAPESIZE is the logical-log tape device. is the block size of tapes used for logical-log backups, in kilobytes. is the size of tapes used for logical-log backups, in kilobytes.

The following sections contain information about how to set the tape-device, tape-block-size, and tape-size parameters for both storage-space and logicallog backups.

Setting the Tape-Device Parameters


You must consider the following points when you assign values to TAPEDEV and LTAPEDEV:
s s s s s

Use separate devices, when possible. Use symbolic links. Specify remote devices. Specify /dev/null. Rewind tape devices.

The following sections explain each of these points.

12-4

IBM Informix Backup and Restore Guide

Setting the Tape-Device Parameters

Specifying Separate Devices for Storage-Space and Logical-Log Backups


When possible, the LTAPEDEV and TAPEDEV parameters in the ONCONFIG le must each specify a different device. When you specify separate devices for storage-space and logical-log backups, you can schedule these backups independently of each other. You can create a backup on one device at the same time you continuously back up the logical-log les on the other. When the LTAPEDEV and TAPEDEV parameters specify the same device, the logical log can ll and cause the database server to stop processing during a backup. When this happens, you face limited options. You can either abort the backup to free the tape device and back up the logical-log les or leave normal processing suspended until the backup completes.

Precautions to Take When You Use One Tape Device


When only one tape device exists and you want to create backups while the database server is online, take the following precautions:
s

Congure the database server with a large amount of logical-log space through a combination of many or large logical-log les. (See your Administrators Guide.) Store all explicitly created temporary tables in a dedicated dbspace and then drop the dbspace before backing up. Create the backup when low database activity occurs. Free as many logical-log les as possible before you begin the backup.

s s

The logical log can ll up before the backup completes. The backup synchronizes with a checkpoint. A backup might wait for a checkpoint to synchronize activity, but the checkpoint cannot occur until all virtual processors exit critical sections. When database server processing suspends because of a full logical-log le, the virtual processors cannot exit their critical sections and a deadlock results.

Configuring ontape 12-5

Setting the Tape-Device Parameters

Using Symbolic Links to Specify Tape Devices


You can specify the values of LTAPEDEV and TAPEDEV as symbolic links. Using symbolic links enables you to switch to other tape or tape-compatible devices without changing the pathname in the ONCONFIG le. For example, you can specify the following symbolic link for tape device /dev/rst0:
ln -s /dev/rst0 /dbfiles/logtape

When you set the LTAPEDEV conguration parameter, as the following example shows, you can switch to a different device without changing the LTAPEDEV parameter:
LTAPEDEV /dbfiles/logtape

You only need to change the symbolic link, as the following example shows:
ln -s /usr/backups /dbfiles/logtape

A user with one tape device could redirect a logical-log backup to a disk le while using the tape device for a backup.

Specifying a Remote Device


You can perform a storage-space or logical-log backup across your network to a remote device attached to another host computer. You should not do a continuous backup to a remote device. To specify a tape device on another host computer, use the following syntax:
host_machine_name:tape_device_pathname

The following example species a tape device on the host computer kyoto:
kyoto:/dev/rmt01

For information on the tape size for remote devices, see Tape Size for Remote Devices on page 12-8.

12-6

IBM Informix Backup and Restore Guide

Specifying the Tape-Block-Size Parameters

Using /dev/null for a Tape Device


Informix recommends that you do not use /dev/null as the device when backing up. However, when you specify /dev/null as a backup tape device, you can avoid the overhead of a level-0 backup that is required after some operations, such as changing the logging status of a database. Obviously, you cannot restore storage spaces from a backup to /dev/null. You can specify /dev/null as a tape device for logical-log backups when you decide that you do not need to recover transactions from the logical log. When you specify the tape device as /dev/null, block size and tape size are ignored. Warning: When you set the ONCONFIG parameter LTAPEDEV to /dev/null, the database server marks the logical-log les as backed up as soon as they become full, effectively discarding logical-log information.

Rewinding Tape Devices Before Opening and on Closing


With ontape, you must use rewindable tape devices. Before reading from or writing to a tape, the database server performs a series of checks that require the rewind.

Specifying the Tape-Block-Size Parameters


Specify the block-size parameters as the largest block size, in kilobytes, that your tape device permits. When you set the tape parameter to /dev/null, the corresponding block size is ignored. The ontape utility does not check the tape device when you specify the block size. Verify that the tape device can read the block size that you specied. If not, you cannot restore the tape.

Configuring ontape 12-7

Specifying the Tape-Size Parameters

Specifying the Tape-Size Parameters


The number of blocks specify tape sizes. They specify the maximum amount of data that you can write to a tape. When you specify the tape device as /dev/null, the corresponding tape size is ignored.

Tape Size for Remote Devices


When you perform a continuous logical-log backup to a remote device, the amount of data written to the tape is the smaller of LTAPESIZE and the following formula:
(sum of space occupied by all logical-log files on disk) (largest logical-log file)

The I/O to the remote device completes and the database server frees the logical-log les before a log-full condition occurs.

Checking and Changing ontape Conguration Parameters


To examine your ONCONFIG le (the le specied in $INFORMIXDIR/etc/$ONCONFIG), use one of the following:
s s

Execute onstat -c while the database server is running. Use Informix Server Administrator (CongurationONCONFIG).

This section provides information on how to change conguration parameters for ontape.

Who Can Change ontape Parameters?


When you log in as either user informix or root, you can use a text editor or ISA to change the value of conguration parameters for ontape.

12-8

IBM Informix Backup and Restore Guide

When Can You Change ontape Parameters?

When Can You Change ontape Parameters?


You can change the values of parameters for ontape while the database server is online. The change takes effect immediately. However, you must make additional considerations when you change either the TAPEDEV parameter or the LTAPEDEV parameter to /dev/null.

Changing TAPEDEV to /dev/null


The ontape utility reads the value of the TAPEDEV parameter at the start of processing. When you set TAPEDEV to /dev/null and request a backup, the database server bypasses the backup but still updates the dbspaces with the new backup time stamps. When you set TAPEDEV to /dev/null, you must do it before you start ontape to request the backup. No problems exist when you change TAPEDEV to /dev/null while the database server is online and ontape is not running.

Changing LTAPEDEV to /dev/null


Take the database server ofine before you change the value of LTAPEDEV to /dev/null. When you make the change while the database server is either quiescent or online, you can create a situation where you back up one or more logical-log les but do not free them. This situation can interrupt processing because the database server stops when it nds that the next logical-log le (in sequence) is not free. When you set LTAPEDEV to /dev/null, the database server frees the logical logs without requiring that you back up those logs. The logical logs do not get marked as free, but the database server can reuse them.

Verifying That the Tape Device Can Read the Specied Block Size
The ontape utility does not check the tape device when you specify the block size. Verify that the tape device specied in TAPEDEV and LTAPEDEV can read the block size you specify for their block-size parameters. If not, you cannot restore the tape.

Configuring ontape 12-9

Changing ontape Parameters

Changing ontape Parameters


Before you change the parameters for ontape, perform a level-0 backup, as explained in Performing a Backup on page 13-10.

Changing Backup-Tape Parameters


To change the value of TAPEDEV, TAPEBLK, and TAPESIZE from the command line, use a text editor to edit your ONCONFIG le. Save the le. The change takes effect immediately. You also can change these parameters in ISA.

Changing Logical-Log Backup Tape Parameters


To change the value of LTAPEDEV, LTAPEBLK, and LTAPESIZE from the command line, use a text editor to edit your ONCONFIG le. Save the le. The change takes effect immediately. You also can change these parameters in ISA.

12-10

IBM Informix Backup and Restore Guide

Chapter

Backing Up with ontape

13
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3 13-3 13-4 13-4 13-5 13-6 13-6 13-6 13-6 13-6 13-7 13-7 13-8 13-8 13-8 13-8 13-9 13-9 13-10 13-10 13-11 13-12 13-12 13-12 13-12 13-13 13-13

In This Chapter .

. . . .

. . . .

. . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . .

Syntax of ontape. . . . . Starting ontape . . . . Using ontape Exit Codes

Changing Database Logging Status .

Creating a Backup . . . . . . . . . . . . . . Choosing a Backup Level . . . . . . . . . . Level-0 Backups . . . . . . . . . . . . Level-1 Backups . . . . . . . . . . . . Level-2 Backups . . . . . . . . . . . . Backing Up After Changing the Physical Schema . . Preparing for a Backup . . . . . . . . . . . Avoid Using Temp Tables During Heavy Activity Making Sure Enough Logical-Log Space Exists . Keeping a Copy of Your ONCONFIG File . . . Verifying Consistency Before a Level-0 Backup . Using Online and Quiescent Backups . . . . . Ensuring That the Operator Is Available . . . . Labelling Tapes Created with ontape . . . . . Performing a Backup . . . . . . . . . . . . Backup Examples. . . . . . . . . . . . Backing Up Raw Tables . . . . . . . . . When the Logical-Log Files Fill During a Backup . . When You Can Use Two Tape Devices . . . . When Only One Tape Device Is Available . . . When a Backup Terminates Prematurely . . . . . Monitoring Backup History Using oncheck . . . .

Backing Up Logical-Log Files with ontape . . . . . . . Before You Back Up the Logical-Log Files . . . . . . Using Blobspace TEXT and BYTE Data Types and Logical-Log Files . . . . . . . . . . Using /dev/null When You Do Not Need to Recover When Must You Back Up Logical-Log Files? . . . . . Starting an Automatic Logical-Log Backup . . . . . Starting a Continuous Logical-Log File Backup . . . . Ending a Continuous Logical-Log Backup . . . . . What Device Must Logical-Log Backups Use? . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. 13-14 . 13-14 . . . . . . . 13-14 13-15 13-15 13-16 13-16 13-17 13-18

13-2

IBM Informix Backup and Restore Guide

IDS

In This Chapter
This chapter describes how to use ontape to back up storage spaces and logical-log les, and how to change the database logging status. The ontape utility can back up and restore the largest chunk les that your database server supports. The ontape utility cannot back up temporary dbspaces and temporary sbspaces.

Syntax of ontape
The ontape utility enables you to change the logging status of a database, back up storage spaces and logical-log les, perform continuous logical-log backups, and restore data from a backup. The following syntax diagram illustrates the basic syntax of the ontape utility.
Changing Database Logging Status p. 13-5 Creating an Backup p. 13-10 Requesting a Logical-Log Backup p. 13-16 Starting Continuous Backups p. 13-17 Performing a Data Restore p. 14-6

ontape

Backing Up with ontape 13-3

Starting ontape

Starting ontape
When you need more than one tape during a backup, ontape prompts for each additional tape. Warning: Do not start ontape in background mode (that is, using the UNIX & operator on the command line). You could also need to provide input from the terminal or window. When you execute ontape in background mode, you can miss prompts and delay an operation. The ontape utility does not include default values for user interaction, nor does it support retries. When ontape expects a yes/no response, it assumes that any response not recognized as a yes is no.

Using ontape Exit Codes


The ontape utility has the following two exit codes: 0 1 indicates a normal exit from ontape. indicates an exception condition.

13-4

IBM Informix Backup and Restore Guide

Changing Database Logging Status

Changing Database Logging Status


Changing Database Logging Status

-N
-s -B -U -A

database

When you add logging to a database, you must create a level-0 backup before the change takes effect. -A -B directs ontape to change the status of the specied database to ANSI-compliant logging. directs ontape to change the status of the specied database to buffered logging.

database is the name of the database. The database name cannot include a database server name. -N -s -U directs ontape to end logging for the specied database. initiates a backup. directs ontape to change the status of the specied database to unbuffered logging.

For considerations about changing the logging status of a database, see your Administrators Guide.

Backing Up with ontape 13-5

Creating a Backup

Creating a Backup
This section explains how to plan for and create backups of your database server data.

Choosing a Backup Level


The ontape utility supports level-0, level-1, and level-2 backups. For information on scheduling backups, see Planning a Recovery Strategy on page 1-14. Tip: It is good practice to create a backup schedule that keeps level-1 and level-2 backups small and to schedule frequent level-0 backups. With such a backup schedule, you avoid having to restore large level-1 and level-2 backups or many logical-log backups.

Level-0 Backups
When a re or ood, for example, completely destroys a computer, you need a level-0 backup to completely restore database server data on the replacement computer. For online backups, the data on the backup tape reects the contents of the storage spaces at the time the level-0 backup began. (The time the backup started could reect the last checkpoint before the backup started.) A level-0 backup can consume lots of time because ontape must write all the pages to tape.

Level-1 Backups
A level-1 backup usually takes less time than a level-0 backup because you copy only part of the database server data to the backup tape.

Level-2 Backups
A level-2 backup after a level-1 backup usually takes less time than another level-1 backup because only the changes made after the last level-1 backup (instead of the last level-0) get copied to the backup tape.
13-6 IBM Informix Backup and Restore Guide

Backing Up After Changing the Physical Schema

Backing Up After Changing the Physical Schema


You must perform a level-0 backup to ensure that you can restore the data after you make the following administrative changes. Consider waiting to make these changes until your next regularly scheduled level-0 backup.
s s s

Changing TAPEDEV or LTAPEDEV from /dev/null Adding logging to a database Adding a dbspace, blobspace, or sbspace before you can restore it with anything less than a full-system restore Starting mirroring for a dbspace that contains logical-log les Dropping a logical-log le Moving one or more logical-log les Changing the size or location of the physical log and after you reinitialize shared memory Dropping a chunk before you can reuse the dbspace that contains that chunk

s s s s

Tip: Although you no longer need to backup immediately after adding a logical-log le, your next backup should be level-0 because the data structures have changed.

Preparing for a Backup


When you create a backup, take the following precautions:
s s s s s s s s s

Avoid using temp tables during heavy activity. Make sure you make sufcient logical-log space to create a backup. Keep a copy of your ONCONFIG le. Verify data consistency. Run the database server in the appropriate mode. Plan for operator availability. Synchronize with other administrative tasks. Do not use background mode. Label tapes appropriately.

The following sections address each of these topics.


Backing Up with ontape 13-7

Preparing for a Backup

Avoid Using Temp Tables During Heavy Activity


When you create a temp table during a backup while using the ontape utility, that table is placed in DBSPACETEMP. When heavy activity occurs during the backup process, the temp table can keep growing and can eventually ll up DBSPACETEMP. When this situation occurs, the backup aborts and your monitor displays a NO FREE DISK error message.

Making Sure Enough Logical-Log Space Exists


When the total available space in the logical log amounts to less than half a single logical-log le, the database server does not create a backup. You must back up the logical-log les and attempt the backup again. You cannot add mirroring during a backup. Important: When you use only one available tape device, make sure you back up all your logical-log les before you start your backup to reduce the likelihood of lling the logical log during the backup.

Keeping a Copy of Your ONCONFIG File


Keep a copy of the current ONCONFIG le when you create a level-0 backup. You need this information to restore database server data from the backup tape.

Verifying Consistency Before a Level-0 Backup


To ensure the integrity of your backups, periodically verify that all database server data and overhead information is consistent before you create a fullsystem level-0 backup. You need not check this information before every level-0 backup, but Informix recommends that you keep the necessary tapes from the most recent backup created immediately after the database server was veried as consistent. For information on consistency checking, see your Administrators Guide.

13-8

IBM Informix Backup and Restore Guide

Preparing for a Backup

Using Online and Quiescent Backups


You can create a backup while the database server is online or in quiescent mode. The terminal you use to initiate the backup command is dedicated to the backup (displaying messages) until the backup completes. Once you start a backup, the database server must remain in the same mode until the backup nishes; changing the mode terminates the backup activity.

What Is an Online Backup?


You can use an online backup when you want your database server accessible while you create the backup. Some minor inconveniences can occur during online backups. An online backup can slow checkpoint activity, and that can contribute to a loss in performance. However, this decline in performance is far less costly than the time that you lose when users were denied access to the database server during a backup. During an online backup, allocation of some disk pages in storage spaces can temporarily freeze. Disk-page allocation is blocked for one chunk at a time until you back up the used pages in the chunk.

What Is a Quiescent Backup?


You create a quiescent backup while the database server is quiescent. Use quiescent backups when you want to eliminate partial transactions in a backup. Do not use quiescent backups when users need continuous access to the databases.

Ensuring That the Operator Is Available


Keep an operator available during a backup to mount tapes as prompted. A backup could take several reels of tape. When an operator is not available to mount a new tape when one becomes full, the backup waits. During this wait, when the backup is an online backup, the physical log space could ll up, and that causes the database server to abort the backup. Thus, make sure an operator is available.
Backing Up with ontape 13-9

Performing a Backup

Labelling Tapes Created with ontape


When you label tapes created with ontape, the label must include the following information:
s s s

Backup level Date and time Tape number that ontape provides

The following example shows what a label can look like:


Level 1: Wed Nov 27, 2001 20:45 Tape # 3 of 5

Each backup begins with its rst tape reel numbered 1. You number each additional tape reel consecutively thereafter. You number a ve-tape backup 1 through 5. (Of course, it is possible that you could not know that it is a vetape backup until it is nished.)

Performing a Backup
Before you begin a backup, perform the following steps:
s

Place a write-enabled tape on the tape-drive device that TAPEDEV species. Put the device online with the appropriate operating-system command. Place the database server in online or quiescent mode

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 -L 0 1 2

13-10

IBM Informix Backup and Restore Guide

Performing a Backup

-s -L

directs ontape to create a backup. Also prompts you to supply the backup level (0, 1, or 2) that you want to create. directs ontape to create a backup of the level specied. When you use the -L option to specify the backup level as part of the command, you can avoid being prompted for it.

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 lls, 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.

Backup Examples
Execute the following command to start a backup 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 13-1 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.

Figure 13-1 Example of a Simple Backup Created with ontape

Backing Up with ontape 13-11

When the Logical-Log Files Fill During a Backup

Backing Up Raw Tables


You can use ontape to back up a raw table. For more information, see Restoring Raw Tables on page 14-15.

When the Logical-Log Files Fill During a Backup


When the logical log lls during a backup, the console displays a message and the backup suspends normal processing. How you handle the logical-log lling depends on whether you can use one or two tape devices.

When You Can Use Two Tape Devices


When you can use two tape devices with the database server, log in as user informix at a free terminal. Verify that LTAPEDEV and TAPEDEV specify different pathnames that correspond to separate tape devices. When they do, back up the logical-log les. See Creating a Backup on page 13-6. When LTAPEDEV and TAPEDEV are identical, assign a different value to the logical-log tape device (LTAPEDEV) and initiate a logical-log-le backup. Otherwise, your options are to either leave normal database server processing suspended until the backup completes or cancel the backup.

When Only One Tape Device Is Available


When you create a backup with the only available tape device, you cannot back up any logical-log les until you complete the backup. When the logical-log les ll during the backup, normal database server processing halts. You can either abort the backup (using CTRL-C only) to free the tape device and back up the logical logs to continue processing, or leave normal processing suspended until the backup completes. You can take steps to prevent this situation. The section Starting an Automatic Logical-Log Backup on page 13-16 describes these steps.

13-12

IBM Informix Backup and Restore Guide

When a Backup Terminates Prematurely

When a Backup Terminates Prematurely


When you cancel or interrupt a backup, sometimes the backup progresses to the point where you can consider it complete. When listed in the monitoring information, as described in Monitoring Backup History Using oncheck on page 13-13, you know the backup completed.

Monitoring Backup History Using oncheck


You can monitor the history of your last full-system backup using oncheck. Execute oncheck -pr to display reserved-page information for the root dbspace. The last pair of reserved pages contains the following information for the most recent backup:
s s s

Backup level (0, 1, or 2) Effective date and time of the backup Time stamp describing when the backup began (expressed as a decimal)
ID number of the logical log that was current when the backup began

s s

Physical location in the logical log of the checkpoint record (that was written when the backup began)

The effective date and time of the backup equals the date and time of the checkpoint that this backup took as its starting point. This date and time could differ markedly from the time when the backup process was started. For example, when no one accessed the database server after Tuesday at 7 P.M., and you create a backup Wednesday morning, the effective date and time for that backup is Tuesday night, the time of the last checkpoint. In other words, when there has been no activity after the last checkpoint, the database server does not perform another checkpoint at the start of the backup.

Backing Up with ontape 13-13

Backing Up Logical-Log Files with ontape

Backing Up Logical-Log Files with ontape


You must only use ontape to back up logical-log les when you use ontape to make your backup tapes. In addition to backing up logical-log les, you can use ontape to switch to the next log le, move logical-log les to other dbspaces, or change the size of the logical log. Instructions for those tasks appear in your Administrators Guide.

Before You Back Up the Logical-Log Files


Before you back up the logical-log les, you need to understand the following issues:
s s s

Whether you need to back up the logical-log les When you need to back up the logical-log les Whether you want to perform an automatic or continuous backup

For more information on these issues, see What Is a Logical-Log Backup? on page 1-5.

Using Blobspace TEXT and BYTE Data Types and Logical-Log Files
You must keep the following two points in mind when you use TEXT and BYTE data types in a database that uses transaction logging:
s

To ensure timely reuse of blobpages, back up logical-log les. When users delete TEXT or BYTE values in blobspaces, the blobpages do not become freed for reuse until you free the log le that contains the delete records. To free the log le, you must back it up. When you must back up an unavailable blobspace, ontape skips it and makes it impossible to recover the TEXT or BYTE values when it becomes necessary. (However, blobpages from deleted TEXT or BYTE values do become free when the blobspace becomes available even though the TEXT or BYTE values were not backed up.)

13-14

IBM Informix Backup and Restore Guide

When Must You Back Up Logical-Log Files?

In addition, regardless of whether the database uses transaction logging, when you create a blobspace or add a chunk to a blobspace, the blobspace or new chunk is not available for use until the logical-log le that records the event is not the current logical-log le. For information on switching logicallog les, see your Administrators Guide.

Using /dev/null When You Do Not Need to Recover


When you decide that you do not need to recover transactions or administrative database activities between backups, you can set the database server conguration parameter LTAPEDEV to /dev/null. Warning: When you set LTAPEDEV to /dev/null, it has the following implications:
s

You can only restore the data that your database server manages up to the point of your most recent backup and any previously backed-up logical-log les. When you recover, you must always perform a full-system restore. (See A Full-System Restore on page 14-3.) You cannot perform partial restores or restore when the database server is online.

When you set LTAPEDEV to /dev/null, the database server marks a logical-log le as backed up (status B) as soon as it becomes full. The database server can then reuse that logical-log le without waiting for you to back it up. As a result, the database server does not preserve any logical-log records. Fast recovery and rolling back transactions are not impaired when you use /dev/null as your log-le backup device. For a description of fast recovery, see your Administrators Guide. For information about rolling back transactions, see the ROLLBACK WORK statement in the Informix Guide to SQL: Syntax.

When Must You Back Up Logical-Log Files?


You must attempt to back up each logical-log le as soon as it lls. You can tell when you can back up a logical-log le because it has a used status. For more information on monitoring the status of logical-log les, see your Administrators Guide.

Backing Up with ontape 13-15

Starting an Automatic Logical-Log Backup

Starting an Automatic Logical-Log Backup


The database server can operate online when you back up logical-log les. To back up all full logical-log les, use the -a option of the ontape command.

Requesting a Logical-Log Backup -a

The -a option backs up all full logical-log les and prompts you with an option to switch the logical-log les and back up the formerly current log. When the tape mounted on LTAPEDEV becomes full before the end of the logical-log le, ontape prompts you to mount a new tape. When you press the Interrupt key while a backup occurs, the database server nishes the backup and then returns control to you. Any other full logical-log les receive a used status. To back up all full logical-log les, execute the following command:
ontape -a

Starting a Continuous Logical-Log File Backup


When you do not want to monitor the logical-log les and start backups when the logical-log les become full, you can start a continuous backup. When you start a continuous backup, the database server automatically backs up each logical-log le as it becomes full. When you perform continuous logical-log le backups, the database server protects you against ever losing more than a partial logical-log le, even in the worst case media failure when a chunk that contains logical-log les fails. With continuous backups you also do not need to remember to back up the logical-log les, but someone must always make media available for the backup process. Also, you must dedicate the backup device and a terminal to the backup process.

13-16

IBM Informix Backup and Restore Guide

Ending a Continuous Logical-Log Backup

To start a continuous backup of the logical-log les, use the -c option of the ontape command.
Starting Continuous Backups -c

The -c option initiates continuous backup of logical-log les. The database server backs up each logical-log le as it becomes full. Continuous backup does not back up the current logical-log le. The database server can operate in online mode when you start continuous backups. To start continuous logging, execute the following command:
ontape -c

When the tape mounted on LTAPEDEV becomes full before the end of the logical-log le, the database server prompts the operator for a new tape.

Ending a Continuous Logical-Log Backup


To end continuous logical-log backup, press the Interrupt key (CTRL-C). When you press the Interrupt key while the database server backs up a logical-log le to a local device, all logs that were completely backed up before the interrupt are captured on the tape and are marked as backed up by the database server. When you press the Interrupt key while the database server waits for a logical-log le to ll (and thus is not backing up any logical-log les), all logs that were backed up before the interrupt reside on the tape and are marked as backed up by the database server. When you press the Interrupt key while the database server performs a continuous backup to a remote device, any logical-log les that were backed up during this operation can or cannot reside on the tape, and are not marked as backed up by the database server (a good reason why you should not do continuous remote backups). After you stop continuous logging, you must start a new tape for subsequent log backup operations.
Backing Up with ontape 13-17

What Device Must Logical-Log Backups Use?

You must explicitly request logical-log backups (using ontape -a) until you restart continuous logging.

What Device Must Logical-Log Backups Use?


The ontape utility uses parameters dened in the ONCONFIG le to dene the tape device for logical-log backups. However, consider the following issues when you choose a logical-log backup device:
s

When the logical-log device differs from the backup device, you can plan your backups without considering the competing needs of the backup schedule. When you specify /dev/null as the logical-log backup device in the ONCONFIG parameter LTAPEDEV, you avoid having to mount and maintain backup tapes. However, you can only recover data up to the point of your most recent backup tape. You cannot restore work done after the backup. See the warning about setting LTAPEDEV to /dev/null in Using /dev/null When You Do Not Need to Recover on page 13-15. When your tape device runs slow, the logical log could ll up faster than you can copy it to tape. In this case, you could consider performing the backup to disk and then copying the disk backup to tape.

13-18

IBM Informix Backup and Restore Guide

Chapter

Restoring with ontape

14
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3 14-3 14-3 14-4 14-4 14-4 14-5 14-5 14-6 14-7 14-7 14-7 14-7 14-8 14-8 14-8 14-9 14-9 14-9 14-10 14-10 14-10 14-12 . . . . . . . . . .

In This Chapter .

Choosing the Type of Physical Restore . . . . . . . . A Full-System Restore . . . . . . . . . . . . Restoring Selected Dbspaces, Blobspaces, and Sbspaces . Choosing a Cold, Warm, or Mixed Restore. A Cold Restore . . . . . . . . . A Warm Restore . . . . . . . . A Mixed Restore . . . . . . . . Performing a Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Restoring the Whole System. . . . . . . . . . . . . . . . Gathering the Appropriate Tapes . . . . . . . . . . . . Backup Tapes . . . . . . . . . . . . . . . . . . Logical-Log Tapes . . . . . . . . . . . . . . . . Deciding on a Complete Cold or a Mixed Restore . . . . . . . Verifying Your Database Server Conguration . . . . . . . . Setting Shared-Memory Parameters to Maximum Assigned Value . . . . . . . . . . . . . . . Setting Mirroring Conguration to Level-0 Backup State . . . Ensuring That Needed Devices Are Available . . . . . . . Performing a Cold Restore . . . . . . . . . . . . . . . Salvaging Logical-Log Files . . . . . . . . . . . . . Mounting Tapes During the Restore . . . . . . . . . . Restoring Logical-Log Files . . . . . . . . . . . . . Bringing the Database Server Online When the Restore Is Over .

Restoring Selected Storage Spaces . . . . . . Gathering the Appropriate Tapes. . . . . Backup Tapes . . . . . . . . . . Logical-Log Tapes . . . . . . . . Ensuring That Needed Device Are Available. Backing Up Logical-Log Files . . . . . . Performing a Warm Restore . . . . . . Restoring Raw Tables . . . . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . .

14-13 14-13 14-13 14-13 14-14 14-14 14-14

. 14-15

14-2

IBM Informix Backup and Restore Guide

IDS

In This Chapter
This section provides instructions for restoring data using ontape for the following procedures:
s s

A full-system restore A restore of selected dbspaces, blobspaces, and sbspaces

Before you start restoring data, you must understand the concepts in What Is a Restore? on page 1-8. As explained in that section, a complete recovery of database server data generally consists of a physical restore and a logical restore.

Choosing the Type of Physical Restore


If a failure causes the database server to go ofine, you must restore all the database server data. This type of restore is a full-system restore. When the failure did not cause the database server to go ofine, you can restore only the storage spaces that failed. For illustrations of the restore types, see What Are Warm, Cold, and Mixed Restores? on page 1-8.

A Full-System Restore
When your database server goes ofine because of a disk failure or corrupted data, it means that a critical dbspace was damaged. The following list shows critical dbspaces:
s s s

The root dbspace The dbspace that contains the physical log A dbspace that contains logical-log les
Restoring with ontape 14-3

Restoring Selected Dbspaces, Blobspaces, and Sbspaces

When you need to restore any critical dbspace, you must perform a full system restore to restore all the data that your database server manages. You must start a full-system restore with a cold restore. See Choosing a Cold, Warm, or Mixed Restore on page 14-4.

Restoring Selected Dbspaces, Blobspaces, and Sbspaces


When your database server does not go ofine because of a disk failure or corrupted data, the damage occurred to a noncritical dbspace, blobspace, or sbspace. When you do not need to restore a critical dbspace, you can restore only those storage spaces that contain a damaged chunk or chunks. When a media failure occurs in one chunk of a storage space that spans multiple chunks, all active transactions for that storage space must terminate before the database server can restore it. You can start a restore operation before the database server nishes the transactions, but the restore becomes delayed until the database server veries that you nished all transactions that were active at the time of the failure.

Choosing a Cold, Warm, or Mixed Restore


When you restore the database server data, you must decide whether you can do it while the database server is ofine or online. This decision depends in part on the data that you intend to restore.

A Cold Restore
Perform a cold restore while the database server is ofine. It consists of both a physical restore and a logical restore. You must perform a cold restore to restore any critical dbspaces. The database server is ofine when you begin a cold restore but it goes into recovery mode after it restores the reserved pages. From that point on it stays in recovery mode until either a logical restore nishes (after which it works in quiescent mode) or you use the onmode utility to shift it to another mode.

14-4

IBM Informix Backup and Restore Guide

A Warm Restore

A Warm Restore
A warm restore restores noncritical storage spaces while the database server is in online or quiescent mode. It consists of one or more physical restore operations (when you restore multiple storage spaces concurrently), a logical-log backup, and a logical restore. During a warm restore, the database server replays backed-up logical-log les for the storage spaces that you restore. To avoid overwriting the current logical log, the database server writes the logical-log les that you designate for replay to temporary space. Therefore, a warm restore requires enough temporary space to hold the logical log or the number of log les being replayed, whichever is smaller. For information on how the database server looks for temporary space, see the discussion of DBSPACETEMP in your Administrators Guide. Warning: Make sure enough temporary space exists for the logical-log portion of the warm restore; the maximum amount of temporary space that the database server needs equals the size of all the logical-log les.

A Mixed Restore
A mixed restore is a cold restore followed by a warm restore. A mixed restore restores some storage spaces during a cold restore (the database server is ofine) and some storage spaces during a warm restore (the database server is online). You could do a mixed restore when you perform a full-system restore, but you need to provide access to a particular table or set of tables as soon as possible. In this case, perform a cold restore to restore the critical dbspaces and the dbspaces that contain the important tables. A cold restore takes less total time to restore all your data than a mixed restore, even though the database server is online during part of a mixed restore because a mixed restore requires two logical restores (one for the cold restore and one for the warm restore). A mixed restore, however, requires the database server to go ofine for less time than a cold restore. The dbspaces not restored during the cold restore do not become available until after the database server restores them during a warm restore, even though a critical dbspace possibly did not damage them.

Restoring with ontape 14-5

Performing a Restore

Performing a Restore
Use the -r ontape option to perform a full physical and logical restore of the database server data. Use the -D ontape option to restore selected storage spaces.
Performing a Data Restore -r -D dbspace

-r

directs ontape to perform a data restore (both physical and logical). The -r option restores data from the backup tape and the logical-log backup tapes you created after (and including) your last level-0 backup. directs ontape to restore only the storage spaces you specify. The database server must go into online or quiescent mode to do a warm restore. When you use the -D option, you can restore selected storage spaces. is the name of a storage space to restore.

-D

dbspace

When you do not specify the -D option, ontape performs a full-system restore. The database server must go ofine to do a full-system restore. For more information, see Restoring Selected Storage Spaces on page 14-13.

14-6

IBM Informix Backup and Restore Guide

Restoring the Whole System

Restoring the Whole System


This section outlines the steps you need to perform to restore your entire database server with ontape. The following list describes the main steps in a full-system restore:
1. 2. 3. 4.

Gather the appropriate tapes. Decide on a complete cold or a mixed restore. Verify your database server conguration. Perform a cold restore.

Familiarize yourself with these instructions before you attempt a full-system restore.

Gathering the Appropriate Tapes


Gather the appropriate backup and logical-log tapes.

Backup Tapes
Before you start your restore, gather together all the tapes from your latest level-0 backup that contain the storage spaces you are restoring and any subsequent level-1 or level-2 backups. Identify the tape that has the latest level-0 backup of the root dbspace on it; you must use this tape rst.

Logical-Log Tapes
Gather together all the logical-log tapes from the backup after the latest level-0 backup of the storage spaces you are restoring.

Restoring with ontape 14-7

Deciding on a Complete Cold or a Mixed Restore

Deciding on a Complete Cold or a Mixed Restore


As mentioned in Choosing a Cold, Warm, or Mixed Restore on page 14-4, when you restore your entire database server, you can restore the critical dbspaces (and any other storage spaces you want to come online quickly) during a cold restore, and then restore the remaining storage spaces during a warm restore. Decide before you start the restore if you want a completely cold, or mixed, restore.

Verifying Your Database Server Conguration


During a cold restore, you cannot reinitialize shared memory, add chunks, or change tape devices. Thus, when you begin the restore, the current database server conguration must remain compatible with, and accommodate, all parameter values assigned after the time of the most recent backup. For guidance, use the copies of the conguration le that you create at the time of each backup. However, do not set all current parameters to the same values as were recorded at the last backup. Pay attention to the following three groups of parameters:
s s s

Shared-memory parameters Mirroring parameters Device parameters

Setting Shared-Memory Parameters to Maximum Assigned Value


Make sure that you set your current shared-memory parameters to the maximum value assigned after the level-0 backup. For example, when you decreased the value of USERTHREADS from 45 to 30 sometime after the level-0 backup, you must begin the restore with USERTHREADS set at 45, and not at 30, even though the conguration le copy for the last backup could register the value of USERTHREADS set at 30. (When you do not possess a record of the maximum value of USERTHREADS after the level-0 backup, set the value as high as you think necessary. You could reassign values to BUFFERS, LOCKS, and TBLSPACES as well because the minimum values for these three parameters are based on the value of USERTHREADS.)

14-8

IBM Informix Backup and Restore Guide

Performing a Cold Restore

Setting Mirroring Conguration to Level-0 Backup State


Verify that your current mirroring conguration matches the conguration that was in effect at the time of the last level-0 backup. Because Informix recommends that you create a level-0 backup after each change in your mirroring conguration, this creates no problems. The most critical parameters are the mirroring parameters that appear in the ONCONFIG conguration le, MIRRORPATH and MIRROROFFSET.

Ensuring That Needed Devices Are Available


Verify that the raw devices or les that you used for storage (of the storage spaces being restored) after the level-0 backup are available. For example, when you dropped a dbspace or mirroring for a dbspace after your level-0 backup, you must make the dbspace or mirror chunk device available to the database server when you begin the restore. When the database server attempts to write to the chunk and cannot nd it, the restore does not complete. Similarly, when you added a chunk after your last backup, you must make the chunk device available to the database server when it begins to roll forward the logical logs.

Performing a Cold Restore


To perform a cold restore, the database server must be ofine. You must log in as user informix or root to use ontape. Execute the following ontape command to restore all the storage spaces:
ontape -r

When you perform a mixed restore, you restore only some of the storage spaces during the cold restore. You must restore at least all the critical dbspaces, as the following example shows:
ontape -r -D rootdbs llogdbs plogdbs

Restoring with ontape 14-9

Performing a Cold Restore

Salvaging Logical-Log Files


Before the restore starts, the console prompts you to salvage the logical-log les on disk. To salvage the logical-log les, use a new tape. It saves log records that you did not back up and enables you to recover your database server data up to the point of the failure. The following example shows a log salvage:
... Continue restore? (y/n) y Do you want to back up the logs? (y/n) y Please mount tape 1 on /dev/ltapedev and press Return to continue. Would you like to back up any of logs 31 - 32? (y/n) y Logical logs 31 - 32 may be backed up. Enter the id of the oldest log that you would like to backup? 31 Please label this tape as number 1 in the log tape sequence. This tape contains the following logical logs: 31-32 Log salvage is complete, continuing restore of archive. Restore a level 1 archive (y/N) y Ready for level 1 tape ...

Mounting Tapes During the Restore


During the restore, ontape prompts you to mount tapes with the appropriate backup les.

Restoring Logical-Log Files


When you perform a mixed restore, you must restore all the logical-log les backed up after the last level-0 backup. When you perform a full restore, you can choose not to restore logical-log les. When you do not back up your logical-log les or choose not to restore them, you can restore your data only up to the state it was in at the time of your last backup. For more information, see Backing Up Logical-Log Files with ontape on page 13-14.

14-10

IBM Informix Backup and Restore Guide

Performing a Cold Restore

The following example shows a full restore:


ontape -r Please mount tape 1 on /dev/tapedev and press Return to continue. Archive Tape Information Tape type: Archive Backup Tape Online version: Informix Dynamic Server, Version 9.30.UC1 Archive date: Mon Nov 07 08:32:22 2000 User id: informix Terminal id: /dev/pts/14 Archive level: 0 Tape device: /dev/tapedev Tape blocksize (in k): 50 Tape size (in k): 10000 Tape number in series: 1 Spaces to restore: 1 [rootdbs] Archive Information ... Initialization Time System Page Size Version Archive CheckPoint Time Dbspaces number flags name 1 1 rootdbs

09/21/2000 15:41:47 2048 12 11/07/2000 08:32:25

fchunk 1

nchunk 1

flags N

owner informix

Chunks chk/dbs offset size free bpages 1 1 50 25000 13512 /dev/raws/rootdbs

flags PO-

pathname

Continue restore? (y/n) y Do you want to back up the logs? (y/n) n Restore a level 1 archive (y/n) y Ready for level 1 tape Please mount tape 1 on /dev/tapedev and press Return to continue. ... Archive Level: 1 Tape device: /dev/tapedev Tape blocksize (in k): 50 Tape size (in k): 10000 Tape number in series: 1 Restore a level 2 archive (y/n) y

Restoring with ontape 14-11

Performing a Cold Restore

Ready for level 2 tape Please mount tape 1 on /dev/tapedev and press Return to continue. ... Archive Level: 2 Tape device: /dev/tapedev Tape blocksize (in k): 50 Tape size (in k): 10000 Tape number in series: 1 Do you want to restore log tapes? (y/n) y Roll forward should start with log number 31 Please mount tape 1 on /dev/ltapedev and press Return to continue. Do you want to restore another log tape? (y/n) y Please mount tape 2 on /dev/ltapedev and press Return to continue. Do you want to restore another log tape? 9y/n) n Program over.

Bringing the Database Server Online When the Restore Is Over


At the end of the cold restore, the database server is in quiescent mode. You can bring the database server online at this point and continue processing as usual. When you restored only some of your storage spaces during the cold restore, you can start a warm restore of the remaining storage spaces after you bring the database server online.

14-12

IBM Informix Backup and Restore Guide

Restoring Selected Storage Spaces

Restoring Selected Storage Spaces


This section outlines the steps that you must perform during a restore of selected storage spaces with ontape while the database server is in online or quiescent mode (a warm restore). During a warm restore, you do not need to worry about shared-memory parameters as you do for cold restores. The following list describes the main steps in a warm restore:
1. 2. 3. 4.

Gather the appropriate tapes. Verify your database server conguration. Back up logical-log les. Perform a warm restore.

Before you attempt a restore, familiarize yourself with these instructions.

Gathering the Appropriate Tapes


Gather the appropriate backup and logical-log tapes.

Backup Tapes
Before you start your restore, gather together all the tapes from your latest level-0 backup that contain the storage spaces you are restoring and any subsequent level-1 or level-2 backups.

Logical-Log Tapes
Gather together all the logical-log tapes from the logical-log backup after the latest level-0 backup of the storage spaces you are restoring.

Restoring with ontape 14-13

Ensuring That Needed Device Are Available

Ensuring That Needed Device Are Available


Verify that storage devices and les are available before you begin a restore. For example, when you drop a dbspace or mirroring for a dbspace after your level-0 backup, you must ensure that the dbspace or mirror chunk device is available to the database server when you begin the restore. If the storage device is not available, the database server cannot write to the chunk and the restore fails. When you add a chunk after your last backup, you must ensure that the chunk device is available to the database server when it rolls forward the logical logs.

Backing Up Logical-Log Files


Before you start a warm restore (even when you perform the warm restore as part of a mixed restore), you must back up your logical-log les. See Backing Up Logical-Log Files with ontape on page 13-14. After the warm restore, you must roll forward your logical-log les to bring the dbspaces that you are restoring to a state of consistency with the other dbspaces in the system. Failure to roll forward the logical log after restoring a selected dbspace results in the following message from ontape:
Partial system restore is incomplete.

Performing a Warm Restore


To perform a warm restore, the database server must operate in online or quiescent mode. You must log in as user informix or root to use ontape. To restore selected storage spaces, execute the ontape command, with the options that the following example shows:
ontape -r -D dbspace1 dbspace2

You cannot restore critical dbspaces during a warm restore; you must restore them as part of a cold restore, described in Restoring the Whole System on page 14-7.

14-14

IBM Informix Backup and Restore Guide

Restoring Raw Tables

During the restore, ontape prompts you to mount tapes with the appropriate backup les. At the end of the warm restore, the storage spaces that were down go online.

Restoring Raw Tables


When you use ontape to restore a raw table, it contains only data that existed on disk at the time of the backup. Because raw tables are not logged, any changes that occurred since the last backup cannot be restored. For more information, see Backing Up Raw Tables on page 13-12 and the Administrators Guide.

Restoring with ontape 14-15

Restoring Raw Tables

14-16

IBM Informix Backup and Restore Guide

Appendix

Migration

Using Data-Migration Tools for Recovery


If ON-Bar and ontape are not working, you can use datamigration utilities, such as onunload, the High-Performance Loader (HPL), onpladm, or dbexport, as a substitute for a backup. For more information on these utilities, see the Informix Migration Guide. Important: None of the data-migration utilities are coordinated with the information stored in the logical-log les and, unlike backups, they do not save a copy of system-overhead information important to the database server.

Preparing for a Database Server or Storage-Manager Upgrade


Important: The database server conversion software automatically re-creates the sysutils database when you upgrade to the latest version of the database server. All backup and restore information from the old database server version is lost. Backups that you make under the older version of the database server are not compatible with the newer version of the database server. To prepare for an upgrade
1.

Use ON-Bar to perform a level-0 backup of all your data before you upgrade your database server, ISM, or change storage-manager vendors. Save these backups so that you can restore the data in case you need to revert to the old database server version. Before you upgrade, back up the administrative les. After you upgrade the database server, back up all storage spaces and logical logs. For more information on database server migration, see the Informix Migration Guide.

2. 3. 4.

Upgrading Your Storage Manager


If you install a new version of a third-party storage manager, install it before you bring up the database server. Update the sm_versions le with the new storage-manager denition. If you have continuous logical-log backup set up on the database server, ON-Bar can start backing up the logical logs soon after the database server comes online. Also make sure that the new storagemanager version is able to read media written with your old version. Make sure that the storage manager can nd the backup objects that ON-Bar requests. Use the onsmsync utility to expire old backup history in the sysutils database and emergency boot les.
XPS

In Extended Parallel Server only, ensure that the BAR_SM parameters in the ONCONFIG le match the new storage-manager denition.

A-2 IBM Informix Backup and Restore Guide

Changing Storage-Manager Vendors


When you switch storage-manager vendors, the transition can be difcult. Ensure that the new data formats are identical, that a reversion utility is provided, or that you do not use new features that change the data formats. Differences usually occur in the following areas:
s

The new storage manager might support different storage devices. If you also upgrade a storage device, make sure the old storage device is available until you successfully back up and restore on the new storage device. If you change physical connectivity, such as moving a storage device from a local connection to a network server, make sure the storage manager can still move the data across the network. If you use software compression or encryption, make sure all versions of the compression or encryption algorithms are available for restores. Ensure that the storage manager can send multiple data streams to storage devices. It also might use a different version of XBSA.

You can switch between certain storage managers more easily than others. For details, contact Informix Technical Support or your vendor.

Migration A-3

IDS

Migrating from ontape to ON-Bar


You cannot back up data with ontape and restore it using ON-Bar, or conversely because the data storage formats and backup capabilities are different. You can use ontape with the database server in online or quiescent mode. To migrate to ON-Bar
1.

Use ontape to perform a full backup. For details, see Chapter 13, Backing Up with ontape. Take the backup media ofine to prevent possible reuse or erasure. Congure the storage manager to be used with ON-Bar. For details, see Chapter 3, Conguring the Storage Manager and ON-Bar.

2. 3.

4.

Congure your ON-Bar environment:


a. b.

Set ONCONFIG parameters. Create the sm_versions le with the storage-manager denition. For details, see Chapter 9, Setting ON-Bar Conguration Parameters, and Updating the sm_versions File on page 3-5.

5. 6.

Use ON-Bar (onbar -b or onbar -b -w) to perform a full backup. Verify the backup with onbar -v. For details, see Chapter 5, Verifying Backups.

A-4 IBM Informix Backup and Restore Guide

Migrating Private ON-Bar Scripts


This section describes the procedures for migrating private ON-Bar scripts after you upgrade the database server version. If your script searches for ON-Bar process IDs, be aware that the relationship between the onbar-driver and the onbar_d child processes or onbar-worker processes is quite different for Dynamic Server and Extended Parallel Server.
IDS

If you reuse a private script for Extended Parallel Server on Dynamic Server, remove the following ON-Bar options that Dynamic Server does not support:
s s

-q (session name) -b -p (physical-only backup)

XPS

If you reuse a private script for Dynamic Server on Extended Parallel Server, remove the following ON-Bar options that Extended Parallel Server does not support:
s s s s

-w (whole-system backup) -c (current log backup) -C (continuous-log backup) -RESTART (restartable restore)

Migration A-5

Appendix

GLS Support

Using GLS with ON-Bar


ON-Bar supports Global Language Support (GLS), which allows

users to work in their native language. The language that the client application uses is called the client locale. The language that the database uses for its server-specic les is called the server locale.
ON-Bar must run on the same computer as the database server. However, you can run ON-Bar in any locale for which you have

the supporting message and localization les. For example, if the server locale is English and the client locale is French, you can issue ON-Bar commands in French. The following command performs a level-0 backup of the dbspaces specied in the le, tomb:
onbar -b -L 0 -f tomb WIN NT/2000

On Windows NT and Windows 2000, you cannot use multibyte lenames in backup or restore commands because they are not supported. The sysutils database, the emergency boot les, and the storagemanager boot le are created with the en_us.8859-1 (default English) locale. The ON-Bar catalog tables in the sysutils database are in English. Change the client and database locales to en_us.8859-1 before you attempt to connect to the sysutils database with DB-Access or third-party utilities.

Identiers That Support Non-ASCII Characters


The Informix Guide to GLS Functionality describes the SQL identiers that support non-ASCII characters. Non-ASCII characters include both 8-bit and multibyte characters. You can use non-ASCII characters in the database names and lenames with the ON-Bar, ondblog, and onutil commands, and for lenames in the ONCONFIG le. For example, you can specify a non-ASCII lename for the ON-Bar activity log in BAR_ACT_LOG and a non-ASCII pathname for the storage-manager library in BAR_BSALIB_PATH.

Identiers That Require 7-Bit ASCII Characters


You must use 7-bit ASCII characters for the following identiers:
s s

Storage-space names Database server names

Locale of ON-Bar Messages


All ON-Bar messages appear in the activity log in the client locale except the messages that the database server issues. For example, the part of the message that tells you that a database server error occurred appears in the client locale, and the server-generated part appears in the server locale.

B-2 IBM Informix Backup and Restore Guide

Using GLS with ontape

Using the GL_DATETIME Environment Variable with ON-Bar


The database server must know how to interpret and convert the end-user formats when they appear in date or time data that the client application sends. You can use the GL_DATE and GL_DATETIME environment variables to specify alternative date and time formats. If you do not set these environment variables, ON-Bar uses the date and time format of the client locale. If you perform a point-in-time restore, enter the date and time in the format specied in the GL_DATETIME environment variable if it is set.

Point-in-Time Restore Example


For example, the default date and time format for the French locale, fr_fr.8859-1, uses the format "%A %.1d %B %iY %H:%M:%S." The ON-Bar command for a point-in-time restore is as follows:
onbar -r -t "Lundi 9 Juin 1997 11:20:14"

You can set GL_DATETIME to a different date and time format that uses the date, month, two-digit year, hours, minutes, and seconds.
%.1d %B %iy %H:%M:%S

The ON-Bar command for a point-in-time restore is as follows:


onbar -r -t "9 Juin 97 11:20:14"

Tip: For more information on how to use GLS and the GL_DATE and GL_DATETIME environment variables, refer to the Informix Guide to GLS Functionality.

Using GLS with ontape


The ontape utility supports GLS in the same way as ON-Bar does. You can specify the database name in the national locale.

GLS Support B-3

B C

N O

V W

Index

Index

Numerics
9.3 features, overview Intro-6

A
Activity log, ON-Bar checking restore status 6-30 described 2-17 diagnosing failed verification 5-13 error messages 11-5 to 11-8 finding backup time 6-21 message format 11-3 message numbers 11-4 monitoring backups 4-10 overview 2-17 return codes 11-9 to 11-15 skipped dbspace message 6-15 specifying location 3-10, 3-13, 9-8 specifying progress messages 3-11, 3-14, 9-16 status of archecker 5-5, 5-6, 9-28 verification message 5-11 warning about /dev/null 9-26 AC_CONFIG environment variable 5-6, 5-13, 9-5 to 9-6 ac_config.std file 5-6, 9-5 to 9-6 AC_MSGPATH parameter 9-4, 9-5, 9-28 ac_msg.log. See archecker message log. AC_STORAGE directory 5-13 AC_STORAGE parameter 9-4, 9-5 AC_VERBOSE parameter 9-4, 9-6

Administrative files backing up 4-6 copying before cold restore 6-19, 6-25 external backup 7-5, 7-7 Administrative tasks backing up after changing schema 4-14, 13-7 using ISA 4-16 ALARMPROGRAM parameter description 3-10, 9-7 setting log_full.sh or log_full.bat 4-25 no_log.sh or no_log.bat 4-25 Altering table type 4-15, 6-32 ANSI compliance level Intro-17 archecker message log 9-5 archecker utility AC_CONFIG parameters 9-5 blobspaces 5-10 estimating temporary space 5-8 fixing verification problems 5-13 to 5-14 interpreting verification messages 5-11 messages 5-11, 9-5 onsmsync 5-13, 5-14 point-in-time verification 5-10 preparing to verify backups 5-6 sbspaces 5-10 sbspaces and blobspaces 5-9 syntax diagram 5-7 temporary files 5-8, 9-6 verification failure, causes of 5-12 verifying expired backups 5-14 whole-system backup 5-10

Autochangers 3-21 Automatic backups. See Continuous log backup.

B
Backup physical, XPS 4-7 Backup Scheduler definition 2-10 how it works 4-33 monitoring status 8-17 SMI tables overview 10-11 sysbuobject table 10-12 sysbuobjses table 10-13 sysbusession table 10-14 sysbusm table 10-14 sysbusmdbspace table 10-15 sysbusmlog table 10-15 sysbusmworker table 10-16 sysbuworker table 10-16 Backup, ON-Bar assigning a session name 4-21 automatic log backups 9-7 changing database logging 4-15 checking data consistency 4-10 complete, example of 4-17 current log 2-5, 7-8 detailed description 4-10 to 4-22 external 2-5, 7-5 fake backups 2-4, 4-19 imported restore 6-26 to 6-29 incremental, example of 4-17 ISM catalog 4-15 large chunk files 4-5 list of storage spaces 4-17 logical log 1-5, 2-5, 4-22 to 4-28 monitoring progress 2-17 -O option 2-4, 4-13, 4-20 operational tables 4-22 physical-only 2-4, 4-13, 4-21 raw tables 4-22 salvaging logs 1-6, 4-24, 4-29 sbspaces, example of 4-19 scratch tables 4-22 sequence Dynamic Server 4-31 Extended Parallel Server 4-33

standard backup 2-4 standard tables 4-22 static tables 4-22 storage-manager installation 4-7 syntax 4-11 table types 4-15, 4-22 temp tables 4-22 verification 2-5, 5-3 to 5-14 whole system 2-4 See also Continuous log backup; Storage spaces; Whole-system backup. Backup, ontape before you create 13-7 creating 13-11 if interrupted 13-13 if logical log fills 13-12 if terminates prematurely 13-13 labelling the tape 13-10 large chunk files 13-3 levels 13-6 monitoring 13-13 one device 12-5 Backup, overview creating a plan 1-17 levels 1-4 planning 1-18 schedule 1-19, 2-13 bargroup group 3-7 bar_action table 10-3 BAR_ACT_LOG parameter 2-17, 3-10, 3-13, 9-8 BAR_BOOT_DIR parameter 3-13, 9-9 BAR_BSALIB_PATH parameter 3-9, 3-10, 3-13, 9-10 BAR_DBS_COSVR parameter 3-13, 9-11 BAR_HISTORY parameter 3-10, 3-13, 9-12 BAR_IDLE_TIMEOUT parameter 3-13, 4-33, 9-13 bar_instance table 10-5 BAR_LOG_COSVR parameter 3-13, 9-13 BAR_MAX_BACKUP parameter 3-11, 4-31, 9-14 BAR_NB_XPORT_COUNT parameter 3-11, 9-15

bar_object table 10-7 BAR_PROGRESS_FREQ parameter 3-11, 3-14, 9-16 BAR_RETRY parameter 3-11, 3-14, 9-17 bar_server table 10-8 BAR_SM parameter 3-14, 9-19 BAR_SM_NAME parameter 3-14, 9-19 bar_version table 10-9 BAR_WORKER_COSVR parameter 3-14, 9-20 BAR_WORKER_MAX parameter 3-14, 3-16, 9-21 BAR_XFER_BUFSIZE parameter description of 3-14, 9-23 page size 9-24 BAR_XFER_BUF_SIZE parameter 3-11, 9-22 BAR_XPORT_COUNT parameter description of 3-14, 9-24 page size 9-24 Bixbar.hostname.servernum file 2-16 bldutil.process_id file 9-28 Blobspaces availability for backing up 4-20, 13-15 backing up 1-4 backing up offline 4-20 optical platters 4-6 temp space for archecker 5-9 Block size, ontape parameter 12-7 tape device 12-9 Blocking, database server 7-5, 7-9 Boldface type Intro-9

C
Child process, ON-Bar 4-31 Chunks, larger than 2 GB 13-3 Client locale B-1 Cold restore defined 1-9 ON-Bar example of 6-18 sequence 6-42, 6-46 setting mode 6-4

IBM Informix Backup and Restore Guide

ontape description of 14-4 mixed restore 14-5 performing 14-9 See also Restoring. Command-line conventions elements of Intro-12 example diagram Intro-13 how to read Intro-13 Comment icons Intro-10 Compliance with industry standards Intro-17 Components, ON-Bar Dynamic Server 2-6 Extended Parallel Server 2-9 Configuration file AC_CONFIG 9-5 ONCONFIG 9-7 Configuration parameters AC_MSGPATH 9-4, 9-5, 9-28 AC_STORAGE 9-4, 9-5 AC_VERBOSE 9-4, 9-6 ALARMPROGRAM 3-10, 4-25, 9-7 BAR-WORKER_MAX 3-14 BAR_ACT_LOG 2-17, 3-10, 3-13, 9-8 BAR_BOOT_DIR 3-13, 9-9 BAR_BSALIB_PATH 3-9, 3-10, 3-13, 9-10 BAR_DBS_COSVR 3-13, 9-11 BAR_HISTORY 3-10, 3-13, 9-12 BAR_IDLE_TIMEOUT 3-13, 4-33, 9-13 BAR_LOG_COSVR 3-13, 9-13 BAR_MAX_BACKUP 3-11, 4-31, 9-14 BAR_NB_XPORT_COUNT 3-11, 9-15 BAR_PROGRESS_FREQ 3-11, 3-14, 9-16 BAR_RETRY 3-11, 3-14, 9-17 BAR_SM 3-14, 9-19 BAR_SM_NAME 3-14, 9-19 BAR_WORKER_COSVR 3-14, 9-20 BAR_WORKER_MAX 3-16, 9-21 BAR_XFER_BUFSIZE 3-14, 9-23, 9-24

BAR_XFER_BUF_SIZE 3-11, 9-22 BAR_XPORT_COUNT 3-14, 9-24 DBSERVERNAME 10-8 Extended Parallel Server 3-12 to 3-15 global 3-12 ISM_DATA_POOL 3-9, 3-11, 3-15, 9-24 ISM_LOG_POOL 3-9, 3-11, 3-15, 9-25 LTAPEDEV 3-11, 9-26 OFF_RECVRY_THREADS 6-15 ON_RECVRY_THREADS 6-15 RESTARTABLE_RESTORE 6-33, 9-27 setting, ontape 12-3 storage-manager section 3-12 Configuring ISM 3-4 third-party storage manager 3-3 Contact information Intro-17 Continuous log backup example 2-5 pausing 8-14 specifying 1-6, 4-22, 4-27 using ALARMPROGRAM 9-7 Controlling ON-Bar sessions 8-14 Cooked chunks backing up 4-10 restoring 6-11, 6-23 Critical dbspaces, defined 4-5 cron command 2-12 Current log, backup 2-5

D
Data consistency, verifying 4-10 Data migration tools A-1 Data recovery defined 1-4 See also Restoring. Data usage 1-16 Database logging backups 4-15 log backups 4-23 Database server blocking 7-5, 7-9 evaluating 1-18 to 3-24

imported restore 6-26 migration A-2 storage-manager communication 2-9 unblocking 7-9 upgrading 6-26, A-2 versions with ON-Bar 2-3 Database-logging status, ontape, changing 13-5 DBSERVERNAME parameter 10-8 Dbslice backing up 1-4 restoring 6-16 Dbspaces backing up 1-4 critical 4-5 restore selected, ontape 14-4 Default locale Intro-4 Dependencies, software Intro-4 Device, ontape /dev/null 13-18 logical-log backup 13-18 LTAPEDEV parameter 13-18 /dev/null, ontape as a tape device 12-7 for logical-log backup 13-18 Disaster recovery, imported restore 6-26 Documentation notes Intro-15 Documentation notes, program item Intro-16 Documentation, types of Intro-14 backup and restore tasks 2-4 documentation notes Intro-15 machine notes Intro-15 release notes Intro-15

E
Emergency boot file backing up 4-6 how used 2-15 ixbar 2-15 Environment variables AC_CONFIG 5-6, 5-13, 9-5 to 9-6 GL_DATE B-3 GL_DATETIME B-3 INFORMIXSQLHOSTS 10-8

Index 3

ISM_DATA_POOL 3-8 ISM_LOG_POOL 3-8 typographical conventions Intro-9 en_us.8859-1 locale Intro-4, B-1 Evaluating backup and restore time 1-18 hardware and memory usage 1-18 logging and transaction activity 1-19, 3-23 Event alarms ex_alarm.sh script 4-25, 9-7 setting ALARMPROGRAM 4-25, 9-7 External backup blocking database server 2-5, 7-9 description of 7-5 procedure 7-7 tracking backup objects 7-15 unblocking database server 7-9 External restore cold restore procedure 7-19 examples 2-5, 7-21 syntax diagram 7-17 warm restore procedure 7-20 ex_alarm.sh script 4-25, 9-7

H
Hardware resources, evaluating 1-18 HDR. See High-Availability Data Replication. Help Intro-14 High-Availability Data Replication imported restore 6-26 initializing 6-26 to 6-31

I
Icons feature Intro-10 Important Intro-10 platform Intro-10 product Intro-10 Tip Intro-10 Warning Intro-10 Important paragraphs, icon for Intro-10 Importing a restore description 6-6 initializing HDR 6-31 Incremental backup defined 1-17 example 4-17 level 1 4-8 level 2 4-8 Industry standards, compliance with Intro-17 Informix Server Administrator backing up data 4-16 restoring data 6-14 Informix Storage Manager (ISM) backup requests 4-15 configuring 3-4 devices supported 3-22 ISM catalog 4-5, 4-15 overview 2-13 requirements 3-20 sm_versions file 3-5 upgrading A-2 Version 2.2 support Intro-3 volume pool names 3-9 Informix-Admin group 4-3

INFORMIXDIR/bin directory Intro-5 INFORMIXSQLHOSTS environment variable 10-8 Initializing High-Availability Data Replication with ON-Bar 6-29 ISA. See Informix Server Administrator. ISM catalog backing up 4-15 directory path 4-5 ISMData volume pool 3-8, 3-9 ISMLogs volume pool 3-8, 3-9 ISM. See Informix Storage Manager. ism_catalog command 4-15, 6-10 ism_chk.pl command 6-8 ISM_DATA_POOL parameter 3-9, 3-11, 3-15, 9-24 ISM_LOG_POOL parameter 3-9, 3-11, 3-15, 9-25 ism_startup command 3-5 ism_watch command 4-15, 6-10 ISO 8859-1 code set Intro-4 ixbar.servernum file. See Emergency boot file.

J
Jukeboxes 3-21

F
Fake backups 2-4, 4-19 Feature icons Intro-10 Features in 9.3 Intro-6 Files emergency boot 2-15 logical-log 1-5 finderr utility Intro-16, 2-17, 11-3

L
Large files, backup ON-Bar 4-5 ontape 13-3 Level-0 backup 1-4 Level-1 backup 1-4, 4-8 Level-2 backup 1-4, 4-8 Light appends 6-32 Locale description of Intro-4 using GLS with ON-Bar B-1 Logging activity, evaluating 1-19, 3-23 Logical log, ON-Bar automatic backup 4-25, 9-7 blobspace issues 4-20 checking available space 4-9

G
Global Language Support (GLS) Intro-4, B-1 GL_DATE environment variable B-3 GL_DATETIME environment variable B-3

IBM Informix Backup and Restore Guide

completion messages 4-28 continuous backup 1-6, 4-22 current log backup 2-5 manual backup 4-22, 4-25, 4-27 replaying records in parallel 6-15 salvage 2-5 salvaging 6-17 skipping replay 4-29 status of backup 4-22 when to back up 4-22 Logical log, ontape automatic backup, starting 13-16 backed-up status 13-15 backup changing parameters 12-10 device to use 13-18 if tape fills 13-12 on another computer 12-6 procedure 13-14 separate devices 12-5 to /dev/null 13-18 when 13-15 blobspace blobs 13-14 continuous backup 13-16 importance of backing up 1-5 used status 13-15 Logical log, overview description of 1-5 manual backup 1-6 salvaging 1-6 Logical restore description of 1-10, 2-5 ontape cold restore 14-4 warm restore 14-5 See also Restoring. Logical-log backup current log 7-8 description 1-5, 4-22 to 4-28 -O option 4-20 stopping 4-24 syntax, IDS 4-23 syntax, XPS 4-25 logs_full.sh script 4-25, 9-7 LTAPEBLK parameter, ontape 12-4 LTAPEDEV parameter, ON-Bar 3-11, 9-26 LTAPEDEV parameter, ontape changing to /dev/null 12-9

if two tape devices 13-12 purpose 13-18 setting 12-4 LTAPESIZE parameter 12-4, 12-8

M
Machine notes Intro-15 Manual log backup example 4-25, 4-27 specifying 1-6, 4-22 Massively parallel-processing system 3-23 Memory resources, evaluating 1-18 Message file usage messages 11-5 to 11-8 See also Activity log, ON-Bar. Message file for error messages Intro-16 Migration database server A-2 ontape to ON-Bar A-4 storage managers A-2 Mixbar.hostname.servernum file 2-16 Mixed restore defined 1-9 ON-Bar 6-5 ontape 14-5 MPP system 3-23

O
Offline storage spaces, restoring 6-18 OFF_RECVRY_THREADS parameter 6-15 ON-Bar backup and restore time 1-18 backup sequence Dynamic Server 4-31 Extended Parallel Server 4-33 cold restore sequence 6-42, 6-46 compared to ontape 1-12 components on Dynamic Server 2-6 Extended Parallel Server 2-9

configuration parameters 3-12 to 3-15, 9-7 to 9-27 database servers supported 2-3 migrating from ontape A-4 -O option backup 4-13, 4-20 restore 6-11, 6-22 whole-system restore 6-20 operations supported 1-12 planning recovery strategy creating backup plan 1-17 data loss 1-14 data usage 1-16 failure severity 1-15 progress feedback 2-17 starting and stopping sessions 8-14 usage messages 11-5 to 11-8 warm restore sequence 6-40, 6-44 where to find information 2-4 XBSA interface 2-14 See also Configuration parameters; Emergency boot file; ON-Bar tables; Storage manager. ON-Bar activity log. See Activity log. ON-Bar return codes 11-9 to 11-15 onbar script description 2-12 usage and examples 8-3 ON-Bar tables bar_action 10-3 bar_instance 10-5 bar_object 10-7 bar_server 10-8 bar_version 10-9 described 2-15 map 10-9, 10-10 onbar-driver child process 4-31 description 2-7, 2-12 onbar_d utility purpose 4-33 See also onbar-driver. onbar_m utility defined 2-12 ON-Bar diagram 2-11 purpose 4-33

Index 5

onbar_w utility defined 2-5, 2-12 ON-Bar diagram 2-11 purpose 4-33 starting onbar-workers 8-7 oncfg file 4-6, 4-9 ONCONFIG file. See Configuration parameters. oninit -m command 6-19 Online help Intro-14 Online manuals Intro-14 Online storage spaces, restoring 6-22 onmode -c block command 7-9 onmode -c unblock command 7-9 onmode -d command 6-30 onmode -ky command 6-19 onmode -l command 4-20, 4-27 onmode -m command 6-20, 6-34 onmode -sy command 6-20 onsmsync utility archecker 5-13, 5-14 defined 2-5 usage 8-8 onstat -d command 4-30, 6-9 onstat -g bus command 4-34, 8-17 onstat -g bus_sm command 4-34, 8-18 onstat -l command 4-20, 4-28 ontape utility backing up logical log 13-14 backup levels 13-6 backups and modes 13-9 changing database logging status 13-5 LTAPEDEV to /dev/null 12-9 parameters 12-10 TAPEDEV to /dev/null 12-9 checking configuration parameters 12-8 compared to ON-Bar 1-12 configuration parameters 12-3 creating an archive 13-6 example 13-11 exit codes 13-4 if backup terminates prematurely 13-9 labelling backup tapes 13-9 migrating to ON-Bar A-4 operations supported 1-12

option -D 14-6 -L 13-11 -r 14-6 -s 13-11 parameters, changing 12-8, 12-9 physical restore, choosing type 14-3 precautions, one tape device 12-5 restore, choosing mode 14-4 restoring data 14-3 starting continuous backup 13-16 syntax, full backup 13-3 syntax, logical-log backup 13-16 ON_RECVRY_THREADS parameter 6-15 Operational table backing up 4-22 restoring 6-32 Override internal checks backup 2-4 restore 2-5 Overriding internal checks backup 4-13, 4-20 restore 6-11, 6-22 whole-system restore 6-20

Processes, ON-Bar 4-31, 4-33 to 6-47 Product icons Intro-10 Program group Documentation notes Intro-16 Release notes Intro-16 Progress, backup or restore 2-17

R
Raw chunks backing up 4-10 restoring 6-23 Raw table backing up 4-22 restoring 6-32 Recovery strategy planning creating backup plan 1-17 data loss 1-14 data usage 1-16 failure severity 1-15 Recovery system comparing ON-Bar and ontape 1-3, 1-12 description of 1-4 invalid tools 6-17 Release notes Intro-15 Release notes, program item Intro-16 Remote device, ontape and interrupt key 13-17 syntax to specify 12-6 tape size for 12-8 Replaying log records 1-7, 6-15 RESTART option 6-12 Restartable restore example 6-33 example of 2-5 overview 6-7 usage 6-33 RESTARTABLE_RESTORE parameter 6-33, 9-27 Restoring, ON-Bar cold example of 6-18 setting mode 6-4 cooked chunks 6-11, 6-23 dbslices 6-16 external 2-5, 7-17 to 7-22

P
Parallel restore example of 2-5 Physical backup 4-7 description of 4-13 example of 2-4, 4-21 Physical restore description of 1-10 ON-Bar, example 2-5 ON-Bar, procedure 6-17 ontape, cold restore 14-4 types of 1-11 See also Restoring. Planning a backup system 1-18 Platform icons Intro-10 pload utility 4-22 Point-in-log restore 2-5, 6-22 Point-in-time restore described 6-6 example of 2-5, 6-21, B-3

IBM Informix Backup and Restore Guide

imported 6-6 logical, example 2-5 mixed 6-5 monitoring progress 2-17 -O option 2-5, 6-11, 6-22 offline storage spaces 6-18 online storage spaces 6-22 operational tables 6-32 parallel 2-5 physical, example 2-5 point-in-log 2-5, 6-22 point-in-time example 6-21, B-3 raw chunks 6-23 raw tables 6-32 restartable 2-5, 6-33 to 6-39 scratch tables 6-32 selected spaces, example 6-15 standard tables 6-32 static tables 6-32 syntax 5-7, 6-13 table types 6-32 temp tables 6-32 using ISA 6-14 warm 6-14 whole system 2-5 Restoring, ontape full-system 14-3 selected storage spaces 14-4, 14-13 whole system, steps 14-7 Restoring, overview description of 1-8, 1-10 logical phase 1-10, 1-11 physical phase 1-10, 1-11 Return codes 11-9 to 11-15 Rewindable tape device 12-7 Rixbar.hostname.servernum file 2-16 Root dbspace, when to back up 4-14, 13-7

S
Salvaging logs defined 1-6 example of 2-5, 6-17 skipping 6-17 Save sets creating 4-11

restoring 6-10 Sbspaces backing up 1-4, 4-19 temp space for archecker 5-9 Scheduling backups 1-19, 2-13 Scratch table backing up 4-22 restoring 6-32 Server locale B-1 Session name, assigning to backup 4-21 Severity of data loss 1-15 Shared library, XBSA default location 3-9 specifying location 3-9, 9-10 Silos 3-21 Skipping log salvage 6-17 logical replay 4-29 storage spaces 4-18 Smart large objects, backing up 4-19 SMI tables. See Backup Scheduler. sm_versions file backing up 4-6, 4-9 defining storage manager 3-5 Software dependencies Intro-4 sqlhosts file copying 4-6, 4-9 server name 10-8 Standard backup. See Backup. Standard table backing up 4-22 restoring 6-32 start_worker.sh script 2-12 Static table backing up 4-22 restoring 6-32 Storage devices backups 5-7, 6-13 continuous log backups 4-24 ISM support 3-22 ISM volume pools 4-15, 6-10 requirements 3-22 Storage manager communication with ON-Bar 2-9 configurations 3-15 to 3-19 migration A-2 requirements 3-20, 4-7

role in ON-Bar system 2-13 sm_versions file 3-5 Storage spaces backing up a list of 4-17 backing up all 4-7, 4-16 defined 2-6 offline, restoring 6-18 online, restoring 6-22 physical-only backup 4-21 restartable restore 6-33 restoring 1-10, 6-14, 6-15, 6-16 skipping during backup 4-18 when to back up 4-14, 13-7 stores_demo database Intro-5 superstores_demo database Intro-5 Symbolic links, ontape to specify tape devices 12-6 Syntax diagram backup verification 5-7 external backup IDS 7-9 XPS 7-10 external restore 7-17 logical-log backup 4-22, 4-23 onbar_w 8-15 onsmsync 8-10 restore 6-13 starting and stopping sessions 8-14 storage-space backup 4-12 summary 4-4 sysbuobject table 10-12 sysbuobjses table 10-13 sysbusession table 10-14 sysbusm table 10-14 sysbusmdbspace table 10-15 sysbusmlog table 10-15 sysbusmworker table 10-16 sysbuworker table 10-16 System requirements database Intro-4 software Intro-4 sysutils database, error messages 9-28

Index 7

T
Table altering to raw 6-32 standard 4-15 Table type backing up 4-15, 4-22 operational 4-22, 6-32 raw 4-22, 6-32 restoring 6-32 scratch 4-22, 6-32 standard 4-22, 6-32 static 4-22, 6-32 temp 4-22, 6-32 Tape autochangers 3-21 Tape device, ontape before opening and on closing 12-7 block-size parameters 12-7, 12-9 gathering for cold restore 14-7 warm restore 14-13 parameters, setting 12-4 precautions with only one 12-5 rewindable device 12-7 specifying symbolic links 12-6 using /dev/null 12-7 Tape libraries 3-21 Tape stackers 3-21 TAPEBLK parameter, ontape 12-4 TAPEDEV parameter, ontape changing to /dev/null 12-9 described 12-4 if two tape devices 13-12 TAPESIZE parameter, ontape 12-4 Task-documentation matrix 2-4 Temp table backing up 4-22 restoring 6-32 Temporary spaces 4-4, 4-6 Text editor, changing ontape parameters 12-10 Third-party storage manager configuring 3-3 functions 2-13 onbar script 8-4 Tip icons Intro-10

Transaction activity, evaluating 1-19, 3-23

Windows copying files 7-7 Informix-Admin group 4-3

U
Unblocking, database server 7-9 UNIX operating system bargroup 3-7 copying files 7-7 Upgrading the database server A-2 Usability enhancements Intro-6 Utility archecker 5-3 to 5-14 onsmsync 8-8 to 8-13

X
XBSA interface, described 2-14 XBSA shared library default location 3-9 specifying location 3-9, 9-10 xcfg file 4-6 X/Open compliance level Intro-17

V
Verification, backup 2-5, 5-3 to 5-14 Virtual processors and ONBar 1-18 Volume pools backup locations 4-15 default names 3-8

W
Warm restore, ON-Bar examples of 6-14 sequence 6-40, 6-44 Warm restore, ontape critical dbspaces 14-14 description of 14-5 in mixed restore 14-8 part of a mixed restore 14-5 performing a 14-14 steps to perform 14-13 Warm restore, overview of 1-9 Warning icons Intro-10 Whole-system backup defined 2-4 overview 4-7 specifying 4-13 Whole-system restore example 2-5, 6-20 -O option 6-20 restartable restore 6-7 syntax 6-12, 6-14

IBM Informix Backup and Restore Guide

You might also like