Anda di halaman 1dari 12

Operational Procedures Fragment

Metadata
Module Name Document Type Date Authors Fragment Version Notes

Description
Snap Creator 3.x Plug-in for MaxDB Operational Procedures 2012-01-02 Dietmar Ebert

For instructions on using the template, refer to the Modular Architecture Authoring Guidelines.

NOTES REGARDING THE OPERATIONAL PROCEDURES TEMPLATE: The Overview section is mandatory. The Guidelines and Additional Information sections are optional.

1. Test 2. Test

1.1

SNAP CREATOR 3.X PLUG-IN FOR MAXDB


Procedure
Back up a MaxDB database using the CLI Back up a MaxDB database using the GUI

Use Case
Create a backup of a database

Restore a backup of a database

Restore a MaxDB database using the CLI Restore a MaxDB database using the GUI

Recover a database

Recover a MaxDB database using the CLI Recover a MaxDB database using the GUI

Clone a database

Clone a MaxDB database using the CLI Clone a MaxDB database using the GUI

Activate automatic log backup mode

Activate automatic log backup mode using the CLI

BACK UP MAXDB DATABASE USING THE CLI To back up a MaxDB database by using the Snap Creator CLI, complete the following steps: 1. Make sure the database is online. 2. Back up the database using Snap Creator.
snapcreator --profile <profile_name> [--config <config_name>] --action snap --policy <policy> --verbose

Where: <profile_name> is the name of the profile where the configuration file is located. <config_name> is the name of the configuration file if the name is different from <profile_name>.conf. <policy> is one of the policies specified in the configuration file.

BACK UP MAXDB DATABASE USING THE GUI To back up a MaxDB database by using the Snap Creator GUI, complete the following steps: 1. Make sure the database is online. 2. Make sure the Snap Creator Framework GUI is started.

3. Log in to the GUI.

4. In the Backup Profiles pane, expand the profile and mark the configuration. The configuration context is loaded and displayed in the Configuration Context pane.

5. Select the

button (Actions menu), and then select Snapshot.

6. Specify additional parameters: policy and user-defined variables. Click Ok.

7. This process starts the backup operation; the output displays in the Console pane. RESTORE MAXDB DATABASE USING THE CLI To restore a MaxDB database from a previous backup by using the Snap Creator CLI, complete the following steps: 1. Make sure the database is offline or in admin mode. 2. Restore the database from a previous backup.
snapcreator --profile <profile_name> [--config <config_name>] --action restore --policy <policy>

Where: <profile_name> is the name of the profile where the configuration file is located. <config_name> is the name of the configuration file if the name is different from the <profile_name>conf. <policy> is one of the policies specified in the configuration file.

3. Go to the procedure to Recover MaxDB Database Using the CLI or Recover MaxDB Database Using the MaxDB GUI. RESTORE MAXDB DATABASE USING THE GUI To restore a MaxDB database from a previous backup by using the Snap Creator GUI, complete the following steps: 1. Make sure the database is online. 2. Make sure the Snap Creator Framework GUI is started. 3. Log in to the GUI.

4. In the Backup Profiles pane, expand the profile and mark the configuration. The configuration context is loaded and displayed in the Configuration Context pane.

5. Press the Actions button and select Restore.

6. The Snap Creator Framework Wizard is launched. Click Next.

7. Provide details for the restore operation. Select controller, volume name, policy, restore Snapshot name, and restore type from the drop-down lists. The example shows the Restore Details page with Volume Restore being selected. Click Next.

8. Review the information presented in the Summary page and verify that it is correct. Click Finish to initiate the restore operation.

9. On the Volume Restore pane, click Yes to accept the warning regarding the potential data loss.

10. After a short time, a progress bar displays indicating the progress of the selected restore operation. When the restore operation finishes, the following message displays. Click Ok.

11. Repeat the restore operation for each volume or file that is part of the backup and that is needed for the subsequent recovery procedure. 12. Go to the procedure to Recover MaxDB Database Using the CLI or Recover MaxDB Database Using the MaxDB GUI.

RECOVER MAXDB DATABASE USING THE CLI To recover a MaxDB database by using the Snap Creator CLI, complete the following steps: 1. Make sure all of the archive logs are in place if the database is configured to create archive logs and to perform a point-in-time recovery. 2. Place the database in admin mode.
dbmcli -d <DB_ID> -u <dbm_user>,<dbm_passwd> db_admin

Where: <DB_ID> is the name/identifier of the MaxDB database. <dbm_user> is the user name of the MaxDB database manager. <dbm_passwd> is the password of the MaxDB database manager user.

3. Verify whether the database is restartable.


dbmcli d <DB_ID> -u <dbm_user>,<dbm_passwd> db_restartinfo

This command returns recovery meta information.


OK Used LOG Page First LOG Page Restartable Id Restart Record Id LOG Info Consistent Log Volume Enabled Log Auto Overwrite Master Servernode Converter Version Oldest Compatible Version Queue Count Repository Imports 1284693 0 1 amdlinux2:PAX_20080118_121057 amdlinux2:PAX_20080118_121057 1 1 0 AMDLINUX2 27349 7.8.01.16 2 NO

The Restartable field indicates whether the database is restartable (1) or not restartable (0). The Consistent field indicates whether the database is consistent (1) or inconsistent (1). When these fields are used in combination, the database can immediately restart in online mode; otherwise, an archive log backup restore must first be performed. 4. If the database is restartable and consistent (both values are set to 1), the database can be restarted using the following command.
dbmcli d <DB_ID> -u <dbm_user>,<dbm_passwd> db_restart

Note:

For additional options using this command, refer to the MaxDB documentation.

5. If the database is not restartable and is inconsistent (both values are set to 0), perform an archive log restore. Depending on the MaxDB version, use either autorecover, or, if not available, use recover_start in combination with recover_replace to loop through the archived logs. Both methodologies recover the database to a specific point in time, as well as to the latest point in time. 6. When the recovery is finished, the database is returned to online mode. RECOVER MAXDB DATABASE USING THE MAXDB GUI To recover a MaxDB database by using the Snap Creator GUI, complete the following step: 1. Depending on the MaxDB version, use MaxDB Database Manager GUI or MaxDB Database Studio to perform a database recovery. Note: For more information about the preferred GUI, refer to the MaxDB documentation.

CLONE MAXDB DATABASE USING THE CLI To clone a MaxDB database by using the Snap Creator CLI, complete the following steps: 1. Make sure the following are properly configured: The source database is online. The configuration parameter SC_CLONE_TARGET is set. The Snap Creator agent specified in SC_CLONE_TARGET is running.

2. Clone the database using Snap Creator.


snapcreator --profile <profile_name> [--config <config_name>] --action clone_vol --policy <policy> --verbose

Where: <profile_name> is the name of the profile where the configuration file is located. <config_name> is the name of the configuration file if the name is different from <profile_name>.conf. <policy> is one of the policies specified in the configuration file.

CLONE MAXDB DATABASE USING THE GUI To clone a MaxDB database by using the Snap Creator GUI, complete the following steps: 1. Make sure the source database is online. 2. Make sure the Snap Creator Framework GUI is presented, and then log in.

3. In the Backup Profiles pane, expand the profile and mark the configuration. The configuration context is loaded and displayed in the Configuration Context pane.

4. Select the

button (Actions menu), and then select Volume Clone.

5. Specify additional parameters: policy and user-defined variables. Click Ok.

6. This process asynchronously starts the clone operation. The current progress displays in the Console pane. ACTIVATE AUTOMATIC LOG BACKUP MODE USING THE CLI To activate an an automatic log backup by using the Snap Creator CLI, complete the following steps: 1. Make sure there is at least one complete data backup for the database instance. 2. Create a backup template type as FILE and a backup type as AUTO.
dbmcli -d <DB_ID> -u <dbm_user>,<dbm_passwd> medium_put <medium_name> <location> <type> <backup_type>

Where: <medium_name> is the backup template identifier. <location> is the file (full qualified) for the log backups. This has a version number appended to it. <type> is the type of the backup template. <backup_type> is the type of backup.

3. Activate the automatic log backup.


dbmcli -d <DB_ID> -u <dbm_user>,<dbm_passwd> autolog_on <medium_name>

4. Archive backup files on a regular base. For example, use the Snap Creator Framework or OS commands.

Anda mungkin juga menyukai