22
33![ Linting Status] ( https://github.com/bchew/dynamodump/workflows/Linting/badge.svg ) ![ Test Status] ( https://github.com/bchew/dynamodump/workflows/Test/badge.svg ) [ ![ DockerBuildstatus] ( https://img.shields.io/docker/build/bchew/dynamodump.svg )] ( https://hub.docker.com/r/bchew/dynamodump/ )
44
5- Simple backup and restore script for Amazon DynamoDB using boto to work similarly to mysqldump.
5+ Simple backup and restore script for Amazon DynamoDB using AWS SDK for Python (boto3) to work similarly to mysqldump.
66
77Suitable for DynamoDB usages of smaller data volume which do not warrant the usage of AWS Data Pipeline for backup/restores/empty.
88
@@ -87,9 +87,11 @@ optional arguments:
8787
8888Backup files are stored in a 'dump' subdirectory, and are restored from there as well by default.
8989
90- ## AWS example
90+ ## Script (unattended) usage
91+
92+ As of v1.2.0, note that ` --noConfirm ` is required to perform data restores involving deletions without any confirmation.
9193
92- The following examples assume your AWS access key and secret key is present in ~ /.boto
94+ ## AWS example
9395
9496Single table backup/restore:
9597
@@ -150,12 +152,12 @@ Restore from S3 bucket to specified destination table
150152
151153```
152154## source_table identifies archive file in S3 bucket from which backup data is restored
153- python2 dynamodump.py -a tar -b some_s3_bucket -m restore -r us-east-1 -p profile -d destination_table -s source_table
155+ python dynamodump.py -a tar -b some_s3_bucket -m restore -r us-east-1 -p profile -d destination_table -s source_table
154156```
155157
156158## Local example
157159
158- The following assume your local DynamoDB is running on localhost:8000 and is accessible via 'a' as access/secret keys.
160+ The following assumes your local DynamoDB is running on localhost:8000 and is accessible via 'a' as access/secret keys.
159161
160162```
161163python dynamodump.py -m backup -r local -s testTable --host localhost --port 8000 --accessKey a --secretKey a
@@ -164,3 +166,16 @@ python dynamodump.py -m restore -r local -s testTable --host localhost --port 80
164166```
165167
166168Multiple table backup/restore as stated in the AWS examples are also available for local.
169+
170+ ## Development
171+
172+ ```
173+ python3 -m venv env
174+ source env/bin/activate
175+
176+ # install dev requirements
177+ pip3 install -r requirements-dev.txt
178+
179+ # one-time install of pre-commit hooks
180+ pre-commit install
181+ ```
0 commit comments