Skip to main content

Backup Restore Scenarios

Backup Restore Scenarios

There are many scenarios where a backup restore is performed, often with unique sets of requirements and restore procedures. This section describes the following general restore scenarios, including variations for different backup strategies:

  • Full System Restore — All or most of the storage used by InterSystems IRIS or the system as a whole has been rendered unusable. The full system backup has been restored from the backup media and now InterSystems IRIS must be recovered to a production-ready state.

  • Database-Only Restore — Some or all InterSystems IRIS databases have been rendered unusable and must be recovered from backup.

  • Restore/Migrate Database to Different Systems — One or more databases are being restored to a different system. The target system may be newer hardware, a different platform, or another instance of the database on the same hardware. The target system may have a different file system layout. This may be used to add databases to a backup or async mirror member (see Mirroring).

Important:

To avoid data incompatibility, the following requirements must be met when restoring or migrating a database to a different database instance than the one in which the backup was created:

  • The target instance must use the same character width (8-bit or Unicode; see Character Width Setting in the Installation Guide) and the same locale (see Using the NLS Settings Page of the Management Portal) as the source instance.

    The one exception to this requirement is that an 8-bit instance using a locale based on the ISO 8859 Latin-1 character set is compatible with a Unicode instance using the corresponding wide character locale. For example, a database created in an 8-bit instance using the enu8 locale can be used in a Unicode instance using the enuw locale.

  • If the source and target instances are on systems of different endianness (see Platform Endianness), the database must be converted to the endianness of the target instance before being used; see Restoring to a Target of Different Endianness for procedures.

Note:

If you have auto-start configured, you may want to prevent the instance from starting automatically when the host OS restarts. This can only be done at the OS level and is dependent on your configuration.

Full System Restore

This scenario assumes the following starting point:

  • The system where the restore is being performed is the same as, or identical to, the system that generated the backup.

  • All filesystems (or at least all files backed up) have been restored from the backup media and the path names at the operating system level are unchanged.

  • InterSystems IRIS is down and has not been started since the restore.

Full System Restore from External Backup or Cold Backup

If you used External Backup or Cold Backup procedures, your databases have been restored to a physically consistent state, but require at least transaction rollback to restore transactional consistently. You may also have journal files from after the time of the backup that you wish to apply before rolling back transactions. This section provides two recommended procedures, one of which you should use (depending on the details of the backup and restore you performed) for the required journal restore and transaction rollback.

If the image of the system that was restored is a snapshot of all elements of InterSystems IRIS, including the IRIS.WIJ file and journal files, from a single moment in time—that is, a crash-consistent image—and you have no newer journal files to apply, you can simply start InterSystems IRIS normally; InterSystems IRIS automatically performs journal recovery and transaction rollback. This is also true if you start InterSystems IRIS in maintenance mode, as described in Starting InterSystems IRIS for Maintenance.

Note:

The preceding recommendation applies after a crash-consistent snapshot of the entire system is restored even if normal external backup procedures (as described in External Backup and Cold Backup) were not used. In that case, the database files in the restored image may not be physically consistent, but are recovered automatically from the IRIS.WIJ file before automatic journal recovery and transaction rollback. For details on recovery, see Fundamental Data Integrity Protection and the sections that follow it.

If the restored image does not includes all elements of InterSystems IRIS — that is, the IRIS.WIJ file, the journal files, and other InterSystems IRIS files — from a single moment in time, or if you have newer journal files to apply, you must use the following procedure to perform journal restore manually, which includes transaction rollback.

Important:

This procedure assumes that the IRIS.WIJ file was backed up as part of the backup snapshot and restored along with the databases and other files and file systems, which is the recommended way to plan your backup and restore procedures. If the IRIS.WIJ file is not included in your backup, see Starting InterSystems IRIS Without Automatic WIJ and Journal Recovery for information about how to start InterSystems IRIS.

  1. Start InterSystems IRIS in maintenance mode as described in Starting InterSystems IRIS for Maintenance to perform a journal restore before users are allowed to access the system. If the instance is already running, you should stop it first and then start it again in maintenance mode.

    Note:

    If the system is down and you have auto-start configured, you may want to prevent the instance from starting automatically, so that you can start the instance in maintenance mode directly. This can only be done at the OS level and is dependent on your configuration.

  2. Restore the journals as described in Journal Restore Following Backup Restore.

  3. After the journal restore is complete, you can perform application validation or additional maintenance as needed.

  4. Restart InterSystems IRIS normally to allow users to access the system.

Full System Restore from Online Backup or Concurrent External Backup

The remainder of this section discusses the full system restore for users of Online Backup or concurrent external backup. You must perform an online backup restore to restore the databases from the backup output file. For online backup, the backup output file is written to the backup media as part of the full system backup, as described in Online Backup.

The online backup restore operation must be executed on a running instance, but the target of a full system restore cannot be running during the operation. Therefore, you must have a separate, secondary instance of InterSystems IRIS installed and available on which to execute the full system online backup restore operation. The databases being restored do not need database or namespace definitions in the secondary instance.

The secondary instance (IrisDB-2) can be installed as part of this restore procedure by running the installer and selecting an instance name and installation directory that is different from the target instance (IrisDB-1). Alternatively, to avoid this step at restore time, install the secondary “restore” instance when you decide to use the online backup strategy. This secondary instance should be shut down at all times and its installation directory backed up as part of the full system backup (that is, it would be a Cold Backup for the secondary instance). It could simply be started during a full system restore in order to run the online backup restore of the target instance.

To restore from an online backup or concurrent external backup after a full system restore:

  1. Using the secondary instance of the database (IrisDB-2), follow the instructions in Online Backup Restore Utility to:

    1. Restore the last full backup (if using concurrent external backup, the full backup was already restored externally during the filesystem restore) of the target instance.

    2. If you have done cumulative backups since the full backup, restore the last one; otherwise, continue with the next step.

    3. Restore all incremental backups done since the last cumulative backup (if there is one), or the last full backup (if there is no cumulative), in the order in which the backups were run.

  2. Using the secondary instance of the database (IrisDB-2), follow the instructions in Journal Restore Following Backup Restore.

  3. Shut down the secondary instance of the database (IrisDB-2).

  4. Start the target instance (IrisDB-1) as described in InterSystems IRIS Without Automatic WIJ and Journal Recovery. This step leaves the InterSystems IRIS database running in maintenance mode, which lets you perform application validation or additional maintenance.

  5. Restart the target instance (IrisDB-1) normally to allow users to access the system.

Important:

If you used concurrent external backup on a mirrored database on an async mirror member, you must activate the database once the mirror has started.

Database-Only Restore

This scenario assumes the following starting point:

  • The system where the restore is being performed is the system that generated the backup and the databases are to be restored to their original location.

  • You have identified the set of databases that require restoration.

  • InterSystems IRIS may be up and users may be accessing other databases normally; the databases requiring restoration may not be required for startup.

  • InterSystems IRIS may be unable to start fully; the databases requiring restoration may be required for startup, or damaged in a way that is preventing startup from completing.

Note:

If you used External Backup or Cold Backup and you have many database that need to be restored, a simpler procedure may be to shut down InterSystems IRIS, restore ALL IRIS.DAT files, and perform the restore procedures described in Full System Restore. This is especially true if the IRISSYS database must be restored.

To perform a database-only restore:

  1. If the database is not started already, start it as described in Starting InterSystems IRIS for Maintenance. Starting the database ensures that any pending automatic recovery to existing databases occurs immediately and does not conflict with the databases that you are about to restore on subsequent startup.

    If the system is already started and you are restoring databases that users may attempt to access during the restore process, InterSystems recommends that you shut down and restart as described in Starting InterSystems IRIS for Maintenance.

    The following table describes recommended procedures to resolve the problems that prevent a successful start of the database.

    Problem Solution
    1. InterSystems IRIS fails to start

    Starting InterSystems IRIS in maintenance mode allows the system to start even if a database that is required for startup cannot be mounted. However, if there is automatic journal recovery pending for a database that is marked as required for startup, the database does not skip it.

    Therefore, if damaged databases are still preventing the system from starting:

    1. Rename the IRIS.DAT files to make the database completely inaccessible.

    2. Change the configuration to mark those databases as not required for startup,

    3. Try again to start the system as described in Starting InterSystems IRIS for Maintenance.

    2. If InterSystems IRIS cannot start due to a damaged IRISSYS database

    Temporarily replace the IRISSYS database with a copy from an External Backup, or from a new install of the same version of InterSystems IRIS. This is temporary solution to get the system started to complete the restore procedure.

    3. InterSystems IRIS still does not start

    You may need to restore all databases following the procedure in Full System Restore.

    For additional help, contact InterSystems Worldwide Response Center (WRC)Opens in a new tab.

  2. Depending on the strategy you used to back up the database, restore each database as follows:

    Backup Strategy Used Database Restoration Sub-procedure
    External Backup or Cold Backup

    For all databases except IRISSYS:

    1. Dismount the database from InterSystems IRIS.

    2. Copy the IRIS.DAT files from the backup media to their original locations.

    3. Remount the database.

    If you are restoring the IRISSYS database, restore it to an alternate directory temporarily.

    Online Backup

    Follow the instructions in theOnline Backup Restore Utility to:

    1. Restore the last full backup.

    2. If you have done cumulative backups since the full backup, restore the last one; otherwise, continue with the next step.

    3. Restore all incremental backups done since the last cumulative backup (if there is one), or the last full backup (if there is no cumulative), in the order in which the backups were run.

    concurrent external backup

    Perform the same steps as documented for External Backup (in this table) to restore the “dirty” copy of the IRIS.DAT files, then apply the incremental backup as documented for Online Backup (in this table).

  3. Follow the instructions in Journal Restore Following Backup Restore.

  4. If you started InterSystems IRIS as described in Starting InterSystems IRIS for Maintenance, and you are ready to allow users on the system, stop and restart InterSystems IRIS normally. You can perform application validation or additional maintenance before restarting.

    Note:

    If you restored the IRISSYS database from External Backup or Cold Backup to a temporary alternate directory as described in the table in step 2 of this procedure, you must replace the existing IRISSYS database with the IRIS.DAT file from the temporary directory after shutting down (before restarting) InterSystems IRIS.

Restore/Migrate Database to Different Systems

This scenario assumes the following starting point:

  • One or more databases are being restored to a target system that is different than the system that generated the backup.

  • The target system may be newer hardware, a different platform, or simply a different instance of InterSystems IRIS on the same hardware.

  • The target system may have a different filesystem layout than the source.

  • InterSystems IRIS is already installed on the target system (you cannot copy an InterSystems IRIS installation or its IRISSYS database to a target machine that is not identical to the source).

The purpose of this type of restore includes, but is not limited to:

  • Hardware migration

  • Adding databases to a backup or async mirror member (see Mirroring)

  • Copying databases to another system for development, testing, or deployment

To restore/migrate databases to a different system:

Important:

Do not attempt to replace the IRISSYS database on the destination system with a restore of the IRISSYS database from the source unless it is part of a full system restore. Any data needed from the source IRISSYS database can be exported and then imported into the destination IRISSYS database.

If the source and target systems use a different endianness, see Restoring to a Target of Different Endianness. If the source or target systems use database encryption, see the “Considering Database Encryption” subsection following this procedure.

  1. Start InterSystems IRIS if not started already. Starting InterSystems IRIS ensures that any pending automatic recovery to existing databases occurs immediately and does not conflict with the databases that you are about to restore.

    If you are restoring databases that users may attempt to access during the restore process, you should start as described in the as described in Starting InterSystems IRIS for Maintenance.

  2. Depending on the strategy you used to back up the database, restore each database as follows:

    Backup Strategy Used Database Restoration Sub-procedure
    External backup or cold backup

    To restore databases:

    1. Dismount any databases being restored if they are mounted on the target instance.

    2. Copy the IRIS.DAT files from the backup media to the desired locations.

    3. Add any new databases to the configuration.

    4. Remount the database that you dismounted.

    Online backup

    Follow the instructions in the Online Backup Restore Utility to:

    1. Restore the last full backup.

    2. If you have done cumulative backups since the full backup, restore the last one; otherwise, continue with the next step.

    3. Restore all incremental backups done since the last cumulative backup (if there is one), or the last full backup (if there is no cumulative), in the order in which the backups were run.

    Concurrent External Backup

    Perform the same steps as documented for External Backup (in this table) to restore the “dirty” copy of the IRIS.DAT files, then apply the incremental backup as documented for Online Backup (in this table).

    Important:

    If the database(s) being restored are mirrored and from a different system, you must either activate them in the mirror, or remove them from the mirror (if this is your intention), before applying the incremental backup.

  3. Follow the instructions in Journal Restore Following Backup Restore.

    Note:

    If you are restoring from Online Backup to add databases to a backup or async mirror member (see Mirroring), skip this step; journals are applied automatically in these cases.

  4. If you started the system as described in Starting InterSystems IRIS for Maintenance, and you are ready to allow users on the system, stop and restart the system normally.

Restoring to a Target of Different Endianness

Depending on the strategy you used to back up the database, an extra step is required to restore a backup on a target system whose endianness (big-endian vs. little-endian) is different from the source system. For information about the endianness of supported platforms, see Platform Endianness.

Considering Database Encryption

When you restore a database on a target system, it may be necessary to change the database encryption key for the restored database. Depending on the strategy you used to back up the database, you may have to convert the key on the restored database, as follows:

  • For Online Backup — Online backup stores the database contents unencrypted. When restoring an online backup file to an existing encrypted database on a target system, the online backup restore utility encrypts the file dynamically on the target system; otherwise the restored database is unencrypted.

  • For External Backup, Cold Backup or Concurrent External Backup — Depending on the state of the IRIS.DAT file on the source system, you may need to manage the database’s encryption after restoring it on the target system; for example, if the database files on the source and target systems use different encryption keys, you activate the key from the source on the target (see Key Management Tasks), or convert the restored database to use the key on the target (see Convert an Encrypted Database to Use a New Key).

FeedbackOpens in a new tab