Skip to main content Link Menu Expand (external link) Document Search Copy Copied

How do I restore from a backup?

The featurebase-restore command is used to restore a backup to a new FeatureBase cluster of any size.

featurebase-restore should only be executed against an empty cluster. Data loss and/or instability will occur if this is attempted on a live cluster with data.

Before you begin

Syntax

featurebase restore
  {--host
    [ {https://hostname:port --auth-token <token> <tls_flags>}
      | hostname:port
    ]
  [--concurrency <int_val>]
  {[-s|-source]/directory/path/}

Restore flags

Argument Description Required?
-s or -source Source directory and backup file. Yes
/backup-directory/path/ Directory containing backups Yes

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

Concurrency

The exact number of optimal restore operations varies depending on network/disk speeds, and should be determined experimentally when doing a test-restore.

High concurrency values may exhaust system resources and impact applications using the cluster.

Use case Set concurrency  
N destination nodes concurrency = N
Production cluster Low or default of 1  
New cluster with no data Not applicable  

Examples

Use concurrency to increase restoration speed

featurebase restore
  --concurrency 8
  --host featurebase-hostname-or-ip:10101
  -s /path/to/backup/

Restore with TLS flags

featurebase restore
  --host featurebase-hostname-or-ip:10101
  -s /path/to/backup/
  --tls.ca-certificate ca.crt
  --tls.certificate client.crt
  --tls.key client.key