Copying the Archive and Journal Directory of the Shutdown Storage Manager (SM)

To copy the archive of the shutdown SM, locate the SM’s archive directory.

To display the paths of different archives, run the nuocmd show archives command:

nuocmd show archives
[1] server0 : /var/opt/nuodb/production-archives/test @ db [journal_path = ] [snapshot_archive_path = ] RUNNING
[SM] ip-172-31-46-122/54.165.58.157:48004  [start_id = 1] [server_id = server0] [pid = 79655] [node_id = 1] [last_ack =  4.75] MONITORED:RUNNING
[2] server1 : /var/opt/nuodb/production-archives @ db [journal_path = ] [snapshot_archive_path = ] RUNNING
[SM] ip-172-31-40-24/107.23.52.10:48004  [start_id = 2] [server_id = server0] [pid = 79656] [node_id = 2] [last_ack =  4.76] MONITORED:RUNNING

In this example, the archive base directory is /var/opt/nuodb/production-archives and the journal directory is at the default location because journal_path =.

On the host of the shutdown SM, in the archive base directory, make a copy of the database directory with the same name as the database. Copy recursively and preserve the modes and permissions of all files in the directory.

The following example creates a copy of the database directory test.

cd /var/opt/nuodb/production-archives
cp -Rp test test_backup_oct16

The test_backup_oct16 directory is a copy of the test database’s state when the SM shut down.

If the journal_path was configured using nuocmd create archive --journal-path, make a copy of the journal directory called dbname_journal, where dbname is the name of the database, in the journal base directory. Copy recursively and preserve the modes and permissions of all files in the directory.

For example, if the archive for test database was created with nuocmd create archive --journal-path /var/opt/nuodb/production-archives/test_journal, then use the following commands to copy the journal directory test_journal to test_backup_oct16_journal directory.

cd /var/opt/nuodb/production-archives
cp -Rp test_journal test_backup_oct16_journal