项目作者: 4406arthur

项目描述 :
AWS dynamoDB backup to AWS S3
高级语言: Python
项目地址: git://github.com/4406arthur/dynamodb_backup.git
创建时间: 2016-11-08T02:48:53Z
项目社区:https://github.com/4406arthur/dynamodb_backup

开源协议:GNU General Public License v3.0

下载


README

its a backup script(Dynamodb to S3)

extend (https://github.com/bchew/dynamodump) lib.

requirement

  1. python dependency (python2.7, boto2, boto3)
  2. setting aws acccess key, secret in ~/.aws/credentials

Setup

If you need isolate python environment

You should use virtualenv https://virtualenv.pypa.io/en/stable/userguide/

Install package dependency by pip

  1. pip install boto boto3

Backup

update your s3 aws_region and bucket_name in sync.py and make sure you have created the bucket.

for backup which will generate a dump folder with everything under organized by table name SRCTABLE

  1. ./run REGION SRCTABLE

Restore

Caution!! This will delete DESTTABLE and restore data from the dump folder.

  1. python dynamodump/dynamodump.py -m restore -r REGION -s SRCTABLE -d DESTTABLE