How do I backup my FeatureBase Community installation?
You can create FeatureBase backups on the CLI using the featurebase-backup
command and suitable flags.
What’s included in the backup?
A featurebase backup
includes:
- schema
- key translation data
- indexes
- Allocated IDs
- Unaltered records
What’s excluded from the backups
- External lookup database (backup separately)
- IDs committed by the auto ID feature before the backup starts
- Node configurations
- Other FeatureBase components
Before you begin
- Obtain Administrator permissions to the FeatureBase cluster
Stop any jobs that create, alter or delete records before running a backup. Only existing, unaltered records are guaranteed to be backed-up.
Syntax
featurebase backup
{--host
[ {https://hostname:port --auth-token <token> <tls_flags>}
| hostname:port
]
[--concurrency <int_val>]
[--no-sync]
{[-o|--output] /backup-directory/path/}
Arguments
Backup flags
Argument | Description | Required? | Further information |
---|---|---|---|
-no-sync | Backup runs without the operating system moving data to persistent storage. | Optional | Override storage synchronization |
-o or -output | Backup output directory | Yes | |
/backup-directory/path/ | Backup directory which will be created if it does not exist | Yes | Backup process will fail if directory not empty |
Common Backup/Restore flags
Argument | Data type | Description | Required? | Further information |
---|---|---|---|---|
--host | Specify a FeatureBase node | Yes | ||
https://featurebase-hostname-or-ip:port | string | https is required for authenticated FeatureBase clusters. Requires auth-token | For authenticated clusters | |
featurebase-hostname-or-ip:port | string | Primary hostname of the FeatureBase cluster to be backed up. | Yes | Determine primary host settings |
--auth-token <token> | Authorization token required for authentication | For authenticated clusters | Generate an authentication token | |
--concurrency <int_val> | Integer | Define a concurrency value to increase the number of files backed up. Defaults to 1 . | Optional | Not applicable when restoring to new clusters. |
TLS authentication flags
Flag | Description | Required? | Further information |
---|---|---|---|
--tls.ca-certificate | TLS CA certitificate to use for verifying the server certificate (defaults to CA certs installed to system) | For TLS authentication |
Additional information
Determine primary host
The primary host is designated by isPrimary:true
in the results from the following command:
curl featurebase:10101/status
Override storage synchronization
- By default,
featurebase backup
will wait for all backup files to be committed to persistent storage before terminating. no-sync
overrides this setting
Use of no-sync
risks loss of backup date should the backup system lose power.
Examples
featurebase backup
overwrites any files in the destination folder. tar
the backup folder then move the file to a new location before performing a backup.
Increased backup speed
Increase backup speed by setting the concurrency value and turning off sync.
featurebase backup
--concurrency 2
--host featurebase-hostname-or-ip:10101
-o /path/to/backup/
--no-sync
Host backup
featurebase backup
--host featurebase-hostname-or-ip:10101
--output /backups/featurebase-backups
Authenticated backup
featurebase backup
--host https://featurebase-hostname-or-ip:10101
-o /backups/featurebase-backups
--auth-token <token>
Backup with TLS
featurebase backup
--host featurebase-hostname-or-ip:10101
-o /path/to/backup/
--tls.ca-certificate ca.crt
--tls.certificate client.crt
--tls.key client.key
No sync backup with manual backup to remote folder
featurebase backup --host featurebase-hostname-or-ip:10101 -o /path/to/backup/ --no-sync