Installation

Install with npm

npm install dabber -g

How to use

Dabber is two pieces: a CLI and a Lambda. The CLI can perform one-off backups and restores from your machine. It can also deploy a Lambda and create CloudWatch rules that trigger the lambda to perform scheduled backups. You only need to deploy one lambda for Dabber, per account; after that you can create as many backup schedules as you want against the same lambda, since each schedule is a trigger that describes the backup operation for the lambda.

Lambda Permissions

For the Dabber Lambda to work proprely it needs an IAM role with access to S3, Lambda, Events, and Dynamo. This role can be created with the CLI setup-iam-role command.

Restore

Options:
--help Show help [boolean]
-b, --s3Bucket S3 Bucket to store backup in [required]
-p, --s3Prefix The folder path to store the backup in (can be deep, e.g.
"app/data/backups"). Datestamp and table name will be
appended. [required]
-r, --s3Region Region of the S3 Bucket [required]
-t, --dbTable Dynamo Table to Restore to [required]
-T, --s3Table The name of the table that was backed up to s3. Will filter
the restore options [default: ""]
-R, --dbRegion Region of the dynamo table. Defaults to S3 region if ommited
-l, --list List available backups from the given prefix

Setup Iam Role

Options:
--help Show help [boolean]
-R, --region Region to setup the IAM role. [required]
-n, --name name for the dabber lambda [default: "dabber"]

Example

dabber setup-iam-role -R us-west-2

Deploy

Deploy the Dabber Lambda

Options:
--help Show help [boolean]
-n, --name name for the dabber lambda [default: "dabber"]
-p, --profile aws profile to use from the credentials chain
[default: "default"]
-R, --region Region to deploy the lambda. [required]
-r, --role IAM Role for the lambda. Can be full ARN or just Role Name
[required]

Example

dabber deploy -R us-west-2 -r dabber # this is an IAM role that you need to create, see the lambda permissions section