Open topic with navigation
Using Full Hot Copy
A full hot copy creates a transactionally-consistent copy of an SM. This copy includes every storage group that SM serves (note, this may not be every storage group in the database, use the plan syntax to coordinate hot copy across multiple SMs to ensure that every storage group is included in a hot copy when using table partitions and storage groups).
A full hot copy of an SM is approximately the same size as the archive of the SM being hot copied at the time the hot copy finishes, plus the size of the journal of the SM at the time the hot copy finishes.
To request a full hot copy, specify type full when executing the hot copy. The type option is required when hot copying into a backup set.
When performing full hot copy into a backup set, full hot copy must create a new (empty) backup set. This means that the backupSetDirectory of the full hot copy must be empty or must not exist.
A full hot copy in a backup set must be restored into a new archive in order to use that full hot copy to start an SM. Restoring an archive from a full hot copy in a backup set is accomplished via the NuoDB Archive utility (nuoarchive). This will extract the full hot copy from the backup set and copy it to a new archive directory.
Prior to version 3.1, all hot copies were full hot copies. When executing a hot copy with a destinationArchiveDirectory, the type option is optional and defaults to full.
Restore an archive from a backup set using NuoDB Archive with the --restore-dir option.
NuoDB Archive options relevant to restoring a full hot copy from a backup set:
nuoarchive restore [<restore options>] [<nuodb options>] <location>
restore options are:
--restore-dir Restore into this destination directory
Running full hot copy on a single host into a backup set. This command will create the /tmp/hotcopy/2017-12-18 backup set directory.
--type option is
nuocmd hotcopy database --db-name test --type full --backup-dirs 1 /tmp/hotcopy/2017-12-18
Running a coordinated full hot copy on multiple hosts into backup sets is similar. Note that while the SMs on which to perform hot copy are specified in the plan, the
--type full option is unchanged from the previous example.
nuocmd hotcopy database --db-name test --type full --backup-dirs 1 /tmp/hotcopy/2017-12-18 2 /tmp/hotcopy/2017-12-18l
f each host has the same directory structure for storing backup sets, then defaultBackupSetDir can be used to simplify the plan syntax.
nuocmd hotcopy database --db-name test --type full --default-backup-dirs /tmp/hotcopy/2017-12-18
A plan file can also be specified instead of issuing the plan as a string. See the hotcopy command syntax reference for more details.
Specify the directory to copy the restored archive to with the
--restore-dir option. The directory given to
--restore-dir must not exist or must be empty.
Restore from the backup set created in the previous example to archive directory /tmp/restore.
nuoarchive restore -restore-dir /tmp/restore /tmp/hotcopy/2017-12-18