• No results found

Performing Lotus database recovery with the nsrnotesrc command

You can run the nsrnotesrc command from the command line to restore and recover Lotus databases and DAOS files.

On UNIX or Linux, you must run the nsrnotesrc command as the Lotus user that starts the Domino server. Do not run the command as the root user.

You must set NSR_BACKUP_PATHS or NSR_RECOV_LIST_FILE, not both parameters, in the NMDA configuration file to specify the Lotus database files or the directories for restore.

You must also set the mandatory parameters Notes_ExecDirectory,

NSR_NOTES_INI_PATH, and PATH for the restore. You can set other optional parameters as appropriate.

Note

File paths are case-sensitive for all operating systems, including Windows. The file paths must match the case of the entries in the NetWorker client index. If you are uncertain about the case of file paths, use the nsrinfo command to verify the backup entries in the NetWorker client file index.

Ensure that you set all the parameters required for recovery in the configuration file as described in NMDA Parameters and Configuration File on page 355.

To perform the Lotus database recovery, run the nsrnotesrc command from the command line:

nsrnotesrc(.exe) -z configuration_file_path

where configuration_file_path is the complete pathname of the NMDA configuration file that contains the recovery parameter settings.

Performing Lotus database recovery with the nsrnotesrc command 179

If the nsrnotesrc command prompts with a message that an existing file has the same name as a file being recovered, reply with the value n, N, y, Y, r, or R, as described in NSR_RECOV_INTERACT on page 382.

The following examples describe the parameters set in the NMDA configuration file for different types of Lotus database recoveries. After you set the parameters, you can run the nsrnotesrc -z command to perform the recovery.

Example 13 Recovery of a database to a specific point-in-time

By default, the NMDA software restores the most recent Lotus backup available. NMDA requests that Domino apply the logs up to the current time if both of these conditions are true:

l You have enabled archived transaction logging.

l The required transaction logs are on the Domino system or are available from a backup.

The NSR_RECOVER_TIME parameter enables you to recover the database to a point-in-time before the current point-in-time. If transaction logs are available, NMDA recovers the

database to the time set by the parameter. Otherwise, NMDA restores the database to the last backup before or equal to the time set by the parameter. The parameter value is the time in nsr_getdate format. For example:

NSR_RECOVER_TIME = "Wed June 23 2012 14:23"

Setting the NSR_RECOVER_TIME parameter on page 385 describes how to determine the recovery point-in-time.

Example 14 Recovery of specific Lotus data files or directories

Use the NSR_BACKUP_PATHS parameter to specify a list of files and directories to recover. When you specify a directory, NMDA recovers all the files in that directory and its subdirectories that you backed up. You can include both data files and directories in a single list. For example:

l On UNIX:

NSR_BACKUP_PATHS = /lotusdata/account.nsf, /lotusdata/mail/

l On Windows:

NSR_BACKUP_PATHS = C:\Lotus\Domino\data\account.nsf, C:\Lotus

\Domino\data\mail\

Example 15 Recovery of all Lotus database files

The following parameter setting in the NMDA configuration file specifies the recovery of all the Lotus database files that you backed up from the given NetWorker client:

NSR_BACKUP_PATHS = NOTES:

Example 15 Recovery of all Lotus database files (continued) NOTICE

Use the NOTES: option with caution. NMDA attempts to restore the data for all partitions of a partitioned Domino server, or for all Domino installations when there are multiple Domino installations on the client.

Example 16 Relocated data restore

By default, NMDA restores data files to the same location from which you backed them up. Set the NSR_RELOCATION_DEST parameter to specify a different destination directory.

For example:

NSR_RELOCATION_DEST = /newdata/

The relocation of multiple files with NSR_RELOCATION_DEST preserves the relative directory structure of the files. When you use NSR_RELOCATION_DEST to specify the new location /newdata, NMDA restores the files /olddata/mail1/file1.nsf and /olddata/

mail2/file2.nsf to /newdata/olddata/mail1/file1.nsf and /newdata/olddata/mail2/

file2.nsf.

If you also set NSR_RECOVER_OPTIONS=REMOVE_COMMON_PATH for the relocated restore, NMDA removes the common path from the original file pathnames during the file restore to the new directory. If you set the parameter in this example, NMDA removes the common directory path, olddata, and restores the files to /newdata/mail1/file1.nsf and / newdata/mail2/file2.nsf.

Note

If you recover logged databases, set the NSR_DBIID parameter to change the DBIID of the recovered files. Example 19 on page 182 describes NSR_DBIID.

NOTICE

During a restore to a different directory, the nsrnotesrc command does not prompt when an existing file has the same name as the recovered file. Instead, the restore overwrites the existing file.

Example 17 Restore of a logged database without applying transaction logs

By default, NMDA restores and recovers a logged Domino database to the current time or to a time set through the NSR_RECOVER_TIME parameter. Set the NSR_APPLY_LOGS parameter to FALSE if you want to restore a logged database only withoutapplying the transaction logs:

NSR_APPLY_LOGS = FALSE

Example 18 Relocation of a linked database during Lotus recovery

Performing Lotus database recovery with the nsrnotesrc command 181

Example 18 Relocation of a linked database during Lotus recovery (continued)

By default, when the nsrnotesrc command recovers a Lotus link file, the command also recovers the database or directory that the link points to. The recovery occurs to the location from where the database or directory was backed up.

If the NSR_RELOCATION_DEST parameter is set in the NMDA configuration file, the database file that a link points to is recovered to the specified relocation directory.

For example, the link file /space1/notes/data/link.nsf points to the database file / space2/notes/data.nsf. A backup includes both the link file and the database.

NSR_RELOCATION_DEST is set to /space3/new.

The recovery relocates the link file and database file to these locations:

l Recovered link file: /space3/new/space1/notes/data/link.nsf

l Recovered database file (pointed to by the link file): /space3/new/space2/notes/

data.nsf

Example 19 PIT recovery of a database with a change of DBIID to a new directory

The following parameter settings in the NMDA configuration file specify the point-in-time (PIT) recovery of the logged database named budget2010.nsf to a new directory C:\Lotus

\Domino\Data\tmpdir. The operation requires a change of the DBIID if the original database exists on the system:

LOTUS {

Notes_ExecDirectory = C:\Lotus\Domino\Data

NSR_BACKUP_PATHS = C:\Lotus\Domino\Data\budget2010.nsf NSR_DBIID = 1

NSR_RELOCATION_DEST = C:\Lotus\Domino\Data\tmpdir NSR_RECOVER_TIME = "Wed June 23 2012 14:23"

}

Since the DBIID of the database changes after the recovery, you must back up the new database if you plan to use it.

Setting the NSR_RECOVER_TIME parameter on page 385 describes how to determine the recovery point-in-time.

Related documents