Now that we have established that the prerequisites are in order, we will perform the actual functions.
The Trove command line with the backup-create
option helps us create a full backup of the database.
Please note that backup/restore may turn off (or pause) the database service for a brief moment to ensure that data is not corrupted. So, caution should be exercised while taking backups or performing restores of production databases.
The command format is trove backup-create <instance-id> <backup-name>
. Please remember that we can check the instance ID using the trove list
command.
So, in order to back up the test12 database, we would execute:
trove backup-create 723c048e-bd5b-4e1a-84cd-836be970d7db myfirstbackup-1
The details of the backup are shown on the screen. The backup command also backs up the metadata, which is especially useful while restoring or creating another database from the current backup.