Command Format for Invoking Hot Copy to Obtain Snapshots

To obtain the snapshot that provides the data you want to restore, invoke the Hotcopy command on a snapshot storage manager. The hot copy operation returns the data required to create a database archive that contains the state reflected in a snapshot. For a given database, one hot copy operation at a time is allowed. The command line format is as follows:

hotcopy database db_name 
   [host host[:port]]
   [pid ssm_id]
   [snapshot number[-number]]
   [album number[-number]]
   destinationArchiveDirectory archive_path
   [destinationJournalDirectory journal_path]
   [destinationSnapshotDirectory snapshot_path]
   [timeout timeout_value] 
Option Database
database db_name Required. Specify the name of the database on which to perform the hot copy.
host host[:port]

Specify the host machine of the SSM on which to run the hot copy. Required if more than one host is running an SM or SSM for this database. Defaults to localhost. If you specify the host then you can optionally specify the port on which the SSM is listening.

pid ssm_id

Optional. The default is the process ID of the SSM that is running on the default or specified host. You can omit this option only when there is exactly one SSM and no SMs running on the specified host. When more than one SSM or SM is running on a host then you must specify the process ID of the SSM on which to run the hot copy. You can obtain the process ID by executing the nuodbmgr show domain summary command.

snapshot number[-number]

Optionally specify the ID of a snapshot to include in the hot copy result. The hot copy result includes the albumA snapshot storage manager uses albums to efficiently manage snapshots. An album refers to a set of snapshots taken during some period of time. Also, an album provides a place to store additional state required to use snapshots. that contains the specified snapshot.

To obtain several snapshots, specify a range of snapshot IDs that reflects the order in which they are listed in the SYSTEM.SNAPSHOTS table. The hot copy result will contain every snapshot in the range you specify but you should be aware that the range you specify does not always contain every snapshot according to the numeric order of transaction IDs. This is because snapshot IDs are not necessarily in numeric order.

When you specify a range of snapshot IDs the result of the hot copy includes the first snapshot in the range, the last snapshot in the range, and all snapshots that were saved between those two snapshots.

The hot copy operation copies a set of one or more consecutively generated albums to the specified directory. In that set, the oldest album contains the snapshot that has the first ID you specified for the snapshot option. If the snapshot with the second specified ID is not in the same album, then the copied set includes the album that contains the snapshot with the second specified ID. In addition, the copied set also contains all albums, if any, that were generated between the earliest (oldest) album and the album that contains the second specified snapshot.

You cannot specify the snapshot option and also the album option. If you omit specification of both options then the hot copy operation returns the current state as well as all of its snapshots. Or, you can specify 0 for either option to explicitly request everything.

album number[-number]

Optionally specify the ID of an album to include in the hot copy result. The hot copy operation returns the specified album.

To obtain several albums, specify a range of album IDs with the earlier album first. The hot copy operation returns a set of consecutively generated albums. The oldest album in the returned set has the first ID you specified for the album option. The most recent album in the returned set has the second ID you specified for the album option.

You cannot specify the album option and also the snapshot option. If you omit specification of both options then the hot copy operation returns the current state as well as all of its snapshots. Or, you can specify 0 for either option to explicitly request everything.

destinationArchiveDirectory archive_path

Required. Specify the directory into which the hot copy operation copies the SSM's archive. The directory you specify must not exist. The user that NuoDB runs as must have read, write and execute permission on the parent directory.

The location you specify must be in the file system of the host that is running the SSM. The location cannot be in S3.

NuoDB Manager returns an error if the directory you specify already exists or if the permissions are too restrictive.

destinationJournalDirectory journal_path

Optional. You can specify the directory into which the hot copy operation copies the SSM's journal. The directory you specify must not exist. The default is the journal directory inside the specified archive directory. The user that NuoDB runs as must have read, write and execute permission on the parent directory.

A location you specify must be in the SSM's file system. The location cannot be in S3.

NuoDB Manager returns an error if the directory you specify already exists or if the permissions are too restrictive.

destinationSnapshotDirectory snapshot_path

Optional. You can specify the directory into which the hot copy operation copies the SSM's snapshots. The directory you specify must not exist. The default is that the albums are copied to the specified archive directory. The user that NuoDB runs as must have read, write and execute permission on the parent directory.

A location you specify must be in the SSM's file system. The location cannot be in S3.

NuoDB Manager returns an error if the directory you specify already exists or if the permissions are too restrictive.

timeout timeout_value

Optional. Specify an amount of time to wait for the hotcopy command to complete. The default is 3600000 milliseconds. Specify a timeout value in milliseconds, seconds, minutes, hours, days or weeks and append the appropriate suffix: mssmhd or w. For example: 5m.

The default behavior is that nuodbmgr waits for the hotcopy operation to complete. If you do not specify a timeout value when you invoke hotcopy then the length of time that nuodbmgr waits is set by the nuodbmgr property hotcopyTimeout, whose default setting is 3600000 milliseconds. To change the value of the hotcopyTimeout property, invoke nuodbmgr set property.

The time it takes to perform a hot copy depends on how much information is being copied. It can take a while for a very large database. To invoke hotcopy without blocking nuodbmgr, specify 0s as the timeout value or set the hotcopyTimeout property to 0. If you do this then you can monitor the progress of the hot copy.