Skip to main content

BACKUP (bSQL) | Blockpoint Docs

Backs up the specified database or blockchain. For examples, see Examples.

bSQL Syntax Conventions

Syntax​

BACKUP <database_object>
TO DISK "file_path"
[ENCRYPT = key_name]

<database_object> ::=
database_name
| database_name.blockchain_name

Arguments​

database_name
The name of the database to be backed up.

blockchain_name
The name of the blockchain to backed up.

file_path
The filepath inclusive of backup name to be compressed and written as a zip.

ENCRYPT key_name
The name of the encryption key to be used in the backup

NOTE: The current user must have ownership of the key specified.

[!IMPORTANT] Encrypted backups aren't currently supported.

Usage​

BACKUP and RESTORE commands should be used to revert corrupted files to their most recent uncorrupted backup.

Permissions​

MANAGEMENT permission required on the target blockchain.

MANAGEMENT permissions default to members of the admin and developer fixed database roles. Members of the admin role can transfer permissions to other users.

Examples​

A. Backing up a Database.​

The following example backs up the database financial demo database to the filename financial_backup.zip in the default backup directory which is the current directory in which the command was executed.

BACKUP financial 
TO DISK "financial_backup"

B. Backing up a Blockchain.​

The following example backs up the blockchain compaines in the financial demo database to the path C:\Users\JohnDoe\Desktop\companies_backup.

BACKUP financial.companies
TO DISK "C:\Users\JohnDoe\Desktop\companies_backup"

See Also​