README.md in sdbport-0.2.1 vs README.md in sdbport-0.3.0

- old
+ new

@@ -6,37 +6,66 @@ ## Installation gem install sdbport -## Usage +## Getting Started Set your AWS credentials: ``` -export AWS_ACCESS_KEY_ID=key -export AWS_SECRET_ACCESS_KEY=secret +export AWS_ACCESS_KEY_ID=your_aws_key +export AWS_SECRET_ACCESS_KEY=your_aws_secret ``` -Or create a config file (-a and -s can then be ommited): +Export SimpleDB domain from us-west-1: ``` +sdbport export -a $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY -r us-west-1 -n data -o /tmp/test-domain-dump +``` + +Import into domain in us-east-1 + +``` +sdbport import -a $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY -r us-west-1 -n data -i /tmp/test-domain-dump + +## Exporting and importing from multiple accounts. + +You can specify your credentials on the command line, however it is best to add them to a configuration file. + +By default, sdbport look for .sdbport.yml in your home directory. To get started, add you AWS keys. + +``` cat > ~/.sdbport.yml << EOF -access_key: your_aws_key -secret_key: your_aws_secert +default: + access_key: your_aws_key + secret_key: your_aws_secert EOF ``` -Export SimpleDB domain: +You can add multiple account credentials and specify the account with --account (-a). ``` -sdbport export -a $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY -r us-west-1 -n test -o /tmp/test-domain-dump +cat > ~/.sdbport.yml << EOF +prod: + access_key: your_aws_key + secret_key: your_aws_secert +preprod: + access_key: your_aws_key + secret_key: your_aws_secert +EOF ``` -Import into new domain: +Export SimpleDB domain data from prod account in us-west-1: ``` -sdbport import -a $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY -r us-west-1 -n new-domain -i /tmp/test-domain-dump +sdbport export -a prod -r us-west-1 -n data -o /tmp/data-domain-dump +``` + +Import into preprod account in us-east-1: + +``` +sdbport import -a preprod -r us-east-1 -n data -i /tmp/data-domain-dump ``` To list CLI subcommands: ```