Categorygithub.com/kishaningithub/dynamodb-backup-restore

# README

dynamodb-backup-restore

Build Status standard-readme compliant Go Report Card Downloads Latest release

A no sweat backup and restore tool for dynamodb

Table of Contents

Install

Using Homebrew

brew tap kishaningithub/tap
brew install dynamodb-backup-restore

Using Binary

# All unix environments with curl
curl -sfL https://raw.githubusercontent.com/kishaningithub/dynamodb-backup-restore/master/install.sh | sh -s -- -b /usr/local/bin

# In alpine linux (as it does not come with curl by default)
wget -O - -q https://raw.githubusercontent.com/kishaningithub/dynamodb-backup-restore/master/install.sh | sudo sh -s -- -b /usr/local/bin

Example

Backup

AWS_REGION=eu-west-1 AWS_SDK_LOAD_CONFIG=true dynamodb-backup-restore -t employee-details  -m backup -o employee-details.json

Restore

AWS_REGION=eu-west-1 AWS_SDK_LOAD_CONFIG=true dynamodb-backup-restore -t employee-details  -m restore -i employee-details.json

Backing up multiple tables at once

export AWS_REGION=eu-west-1 
export AWS_SDK_LOAD_CONFIG=true
cat tables | xargs -I {} dynamodb-backup-restore -t {} -m backup -o {}.json

Restoring up multiple tables at once

export AWS_REGION=eu-west-1 
export AWS_SDK_LOAD_CONFIG=true
cat tables | xargs -I {} dynamodb-backup-restore -t {}  -m restore -i {}.json

Usage

dynamodb-backup-restore -h
Usage:
  main [OPTIONS]

Application Options:
  -t, --table-name= Name of the dynamo db table
  -m, --mode=       Mode of operation (backup,restore)
  -o, --output=     Output file for backup
  -i, --input=      Input file for restore

Help Options:
  -h, --help        Show this help message

Maintainers

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2019 Kishan B