Example of Invoking Hot Copy on a Storage Manager

Journal Hot Copy not enabled

Below is an example of how to make a copy of the test database. The database has a storage manager running on the host storage1.example.com, Run the hot copy on that target host and choose a destination directory in which to store the copy.

In the hot copy command:

The following example of a hot copy command that specifies test_archive_hotcopy050515 as the destination archive directory:

$ nuodbmgr --broker myHost --password myDomainPw
NuoDB host version: 3.1: Professional Edition
nuodb [domain] > hotcopy database test destinationArchiveDirectory 
     test_archive_hotcopy050515 host storage1.example.com
Hot copy to /var/opt/nuodb/production-archives/test_archive_hotcopy050515 
     completed on storage1.example.com, pid 12345
$ nuodb [domain] >

The hot copy operation does the following:

Journal Hot Copy enabled

Next is an example of how to make backups of the test database. If the database has a storage manager running on the storage1.example.com, run the hot copy on that target host and choose a backup set directory to store the full, incremental or journal backups.

Before running the Hot Copy command using either Incremental or Journal as the backup type, start the SM using the Journal Hot Copy option enabled.

To start SM using this option, use the following example:

$ nuodbmgr --broker myHost --password myDomainPw
NuoDB host version: 3.1: Professional Edition
nuodb [domain] > start process sm database test hot storage1.example.com archive 
/var/opt/nuodb/production-archives/test initialize true options '--journal-hot-copy enable'
[SM] storage1.example.com/127.0.0.1:48010 (DEFAULT_REGION) [ pid = 6603 ] [ db = backuptest ] [ nodeId = 1 ] ACTIVE
$ nuodb [domain] >

Note: The above example creates a new database with the initialize option set to ‘true’. Set the initial option to ‘false’ when you are not creating a new database.

Before Incremental or Journal Hot Copies can be invoked, you must run a full hot copy. First, find the pid and host of the desired SM for the backups by running the domain summary command. Then, run the hot copy command using its pid. See the following example:

$ nuodbmgr --broker myHost --password myDomainPw
NuoDB host version: 3.1: Professional Edition
nuodb [domain] > show domain summary
Started: [SM] storage1.example.com/127.0.0.1:48010 (DEFAULT_REGION) [ pid = 6603 ] [ db = test ]
 [ nodeId = 1 ] ACTIVE
nuodb [domain] > hotcopy database test host storage1.example.com pid 6603 backupSetDirectory 
'/var/opt/nuodb/production-archives/BackupSets' type full
Hot copy control node: host storage1.example.com pid 6603
Hot copy to Node 1 (host storage1.example.com pid 6603) /var/opt/nuodb/production-archives/BackupSets/12-11-2017
 completed: Hot copy successfully completed 
$ nuodb [domain] >

When a full copy successfully completes, the user can run Incremental or Journal hot copies.

$ nuodbmgr --broker myHost --password myDomainPw
NuoDB host version: 3.1: Professional Edition
nuodb [domain] > hotcopy database testbck host storage1.example.com pid 6603 backupSetDirectory 
'/var/opt/nuodb/production-archives/BackupSets' type journal
Hot copy to Node 1 (host storage1.example.com pid 6603) /var/opt/nuodb/production-archives/BackupSets/12-11-2017
 completed: Hot copy successfully completed
nuodb [domain] > hotcopy database testbck host storage1.example.com pid 6603 backupSetDirectory 
'/var/opt/nuodb/production-archives/BackupSets' type incremental
Hot copy to Node 1 (host storage1.example.com pid 6603) /var/opt/nuodb/production-archives/BackupSets/12-11-2017
 completed: Hot copy successfully completed
$ nuodb [domain] >

Hot Copy operation with type Full:

Hot Copy operation with type Incremental:

Hot Copy operation with type Journal: