Creating an Archive

Note: The following assumes that the Transparent Huge Pages (THP) setting is disabled on Linux operating systems. For more information on how to disable THP, see Notes on Using Transparent Huge Pages.

When creating a NuoDB database, you must first create a database storage archive entry.

In a NuoDB domain, an archive is a copy of the database on disk. To define the persistent disk storage archive properties within the NuoDB Durable State machine (DSM) for a particular database, run one of the following commands:

For a TAR installation

nuocmd create archive --db-name <database name> --server-id <server-id> --archive-path $NUODB_HOME/var/opt/production-archives/<database name>

Note: The create archive command is issued using NuoDB Command (nuocmd). For more information on NuoDB Command and other command line tools, see Command Line Tools.

For a RPM / DEB installation

 nuocmd create archive --db-name <database name> --server-id <server-id>  --archive-path /var/opt/nuodb/production-archives/<database name>

For a Windows installation

mkdir %NUODB_HOME%/archives
nuocmd create archive --db-name <database name> --server-id <server-id> --archive-path %NUODB_HOME%/archives/<database name>

Note: NuoDB does not enforce the location of the database archive directories; the locations documented in this section are recommendations.

About create archive Parameters

This section provides supporting information on parameters used with the create archive command.

Note: The create archive command doesn’t pre-allocate storage space to the archive.

Mandatory Parameters

The following table describes parameters that must be provided when using the create archive command.

Property

Description

Comments

--db-name The database this archive will be associated with. None.

--server-id

The Admin Service that is configured on the host machine the archive will exist.

This parameter is mandatory except when using the is-external option.

--archive-path The database archive directory location on disk. When specifying the location, include the full path. For example, $NUODB_HOME/var/opt/production-archives/<db-name>.

Optional Parameters

The following table describes optional parameters that can also be provided when using the create archive command.

Property

Description

Comments

--journal-path The database journal directory location on disk When specifying the location, include the full path. For example, $NUODB_HOME/var/opt/production-archives/<db-name-journal>.
--snapshot-archive-path The database snapshot archive directory location on disk When specifying the location, include the full path. For example, $NUODB_HOME/var/opt/production-archives/<db-name-snaphot>.
--restored Creates an archive entry based on an existing archive. None.
--archive-id Specifies the archive ID of an archive being restored that is currently a tombstone (no longer active but is still tracked in the system as previously existing.) None.