Copying the Archive and Journal of the Shutdown Storage Manager

To copy the archive and journal of the shutdown storage manager (SM), locate the SM's archive and journal directories

NuoDB Command's show archives command can be used to display the paths of the different archives:

nuocmd show archives
[1] server0 : /var/opt/nuodb/production-archives @ 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

For more information on NuoDB Command and other NuoDB command line utilities, see Command Line Tools.

On the host of the shutdown SM, in the archive_base directory, make a copy of the database directory, which has the same name as the database. Copy recursively and preserve the modes and permissions of all files in the directory. In the journal_base directory, make a copy of the journal directory. This directory will have the name dbname_journal, where dbname is the name of the database. Again, copy recursively and preserve the modes and permissions of all files in the directory. The following example creates a copy of the database test in the test_backup_oct16 and test_backup_oct16_journal directories. These directories have the same structure as the source test and test_journal directories. The example is for Linux and Max OS X. For Windows it would be something similar.

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

You now have a copy of a database's state at the time you shut down the SM. Remember to edit the requirements of your database to increment the number of SMs required.