@@ -11,7 +11,7 @@ dynamodump supports local DynamoDB instances as well (tested with [DynamoDB Loca
1111## Usage
1212
1313```
14- usage: dynamodump.py [-h] [-a {zip,tar}] [-b BUCKET]
14+ usage: dynamodump/dynamodump .py [-h] [-a {zip,tar}] [-b BUCKET]
1515 [-m {backup,restore,empty}] [-r REGION] [--host HOST]
1616 [--port PORT] [--accessKey ACCESSKEY]
1717 [--secretKey SECRETKEY] [-p PROFILE] [-s SRCTABLE]
@@ -96,73 +96,73 @@ As of v1.2.0, note that `--noConfirm` is required to perform data restores invol
9696Single table backup/restore:
9797
9898```
99- python dynamodump.py -m backup -r us-west-1 -s testTable
99+ python dynamodump/dynamodump .py -m backup -r us-west-1 -s testTable
100100
101- python dynamodump.py -m restore -r us-west-1 -s testTable
101+ python dynamodump/dynamodump .py -m restore -r us-west-1 -s testTable
102102```
103103
104104Multiple table backup/restore (assumes prefix of 'production-' of table names, use --prefixSeparator to specify a
105105different separator):
106106
107107```
108- python dynamodump.py -m backup -r us-west-1 -s production*
108+ python dynamodump/dynamodump .py -m backup -r us-west-1 -s production*
109109
110- python dynamodump.py -m restore -r us-west-1 -s production*
110+ python dynamodump/dynamodump .py -m restore -r us-west-1 -s production*
111111```
112112
113113The above, but between different environments (e.g. production-_ tables to development-_ tables):
114114
115115```
116- python dynamodump.py -m backup -r us-west-1 -s production*
116+ python dynamodump/dynamodump .py -m backup -r us-west-1 -s production*
117117
118- python dynamodump.py -m restore -r us-west-1 -s production* -d development*
118+ python dynamodump/dynamodump .py -m restore -r us-west-1 -s production* -d development*
119119```
120120
121121Backup all tables and restore only data (will not delete and recreate schema):
122122
123123```
124- python dynamodump.py -m backup -r us-west-1 -s "*"
124+ python dynamodump/dynamodump .py -m backup -r us-west-1 -s "*"
125125
126- python dynamodump.py -m restore -r us-west-1 -s "*" --dataOnly
126+ python dynamodump/dynamodump .py -m restore -r us-west-1 -s "*" --dataOnly
127127```
128128
129129Dump all table schemas and create the schemas (e.g. creating blank tables in a different AWS account):
130130
131131```
132- python dynamodump.py -m backup -r us-west-1 -p source_credentials -s "*" --schemaOnly
132+ python dynamodump/dynamodump .py -m backup -r us-west-1 -p source_credentials -s "*" --schemaOnly
133133
134- python dynamodump.py -m restore -r us-west-1 -p destination_credentials -s "*" --schemaOnly
134+ python dynamodump/dynamodump .py -m restore -r us-west-1 -p destination_credentials -s "*" --schemaOnly
135135```
136136
137137Backup all tables based on AWS tag ` key=value `
138138
139139```
140- python dynamodump.py -p profile -r us-east-1 -m backup -t KEY=VALUE
140+ python dynamodump/dynamodump .py -p profile -r us-east-1 -m backup -t KEY=VALUE
141141```
142142
143143Backup all tables based on AWS tag, compress and store in specified S3 bucket.
144144
145145```
146- python dynamodump.py -p profile -r us-east-1 -m backup -a tar -b some_s3_bucket -t TAG_KEY=TAG_VALUE
146+ python dynamodump/dynamodump .py -p profile -r us-east-1 -m backup -a tar -b some_s3_bucket -t TAG_KEY=TAG_VALUE
147147
148- python dynamodump.py -p profile -r us-east-1 -m backup -a zip -b some_s3_bucket -t TAG_KEY=TAG_VALUE
148+ python dynamodump/dynamodump .py -p profile -r us-east-1 -m backup -a zip -b some_s3_bucket -t TAG_KEY=TAG_VALUE
149149```
150150
151151Restore from S3 bucket to specified destination table
152152
153153```
154154## source_table identifies archive file in S3 bucket from which backup data is restored
155- python 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/dynamodump .py -a tar -b some_s3_bucket -m restore -r us-east-1 -p profile -d destination_table -s source_table
156156```
157157
158158## Local example
159159
160160The following assumes your local DynamoDB is running on localhost:8000 and is accessible via 'a' as access/secret keys.
161161
162162```
163- python dynamodump.py -m backup -r local -s testTable --host localhost --port 8000 --accessKey a --secretKey a
163+ python dynamodump/dynamodump .py -m backup -r local -s testTable --host localhost --port 8000 --accessKey a --secretKey a
164164
165- python dynamodump.py -m restore -r local -s testTable --host localhost --port 8000 --accessKey a --secretKey a
165+ python dynamodump/dynamodump .py -m restore -r local -s testTable --host localhost --port 8000 --accessKey a --secretKey a
166166```
167167
168168Multiple table backup/restore as stated in the AWS examples are also available for local.
0 commit comments