You are here: Database Administration > Backing Up and Restoring Databases > Using Online Backup > Command Format for Invoking Hot Copy to Obtain Current State

Command Format for Invoking Hot Copy to Obtain Current State

To create a copy of the current state of a running database, invoke the NuoDB Manager hotcopy command. For a given database, one hot copy operation at a time is allowed. The format is as follows:

hotcopy database db_name
   [host host[:port]]
   [pid {sm_id | ssm_id}]
   destinationArchiveDirectory archive_path
   [destinationJournalDirectory journal_path]
   [timeout timout_value]
Option Description
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 SM or SSM on which to run the hot copy. Required if more than one host is running an SM or SSM for this database. If the database is running only one SM or SSM, then specification of host_name is optional and it defaults to the host that is running the SM or SSM. If you specify the host then you can optionally specify the port on which the SM or SSM is listening.

pid {sm_id|ssm_id}

Specify the process ID of the SM or SSM on which to run the hot copy. If the database is running only one SM or SSM, then specification of pid is optional and it defaults to the process ID of the lone SM or SSM. Required if more than one SM or SSM for this database is running on the specified host. You can obtain the process ID by executing the nuodbmgr command show domain summary (see Show Domain).

destinationArchiveDirectory archive_path

Required. Specify the directory into which the hot copy operation copies the SM's or 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 SM or 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.

The destinationArchiveDirectory on every SM host must be empty. If it is not, hotcopy will generate an error and fail the operation.

destinationJournalDirectory journal_dir

Optional. You can specify the directory into which the hot copy operation copies the SM's or 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 file system of the host that is running the SM or 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.

The destinationJournalDirectory on every SM host must be empty. If it is not, hotcopy will generate an error and fail the operation.

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: ms, s, m, h, d 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 the NuoDB Manager commad 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.

The hotcopy command takes additional options that you might want to use when invoking hotcopy on a snapshot storage manager. See Command Format for Invoking Hot Copy to Obtain Snapshots.