{"action":"created","issue":{"url":"https://api.github.com/repos/amplifylitco/asiaq/issues/38","repository_url":"https://api.github.com/repos/amplifylitco/asiaq","labels_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/38/comments","events_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/38/events","html_url":"https://github.com/amplifylitco/asiaq/pull/38","id":153492826,"number":38,"title":"Add clone command to disco_rds.py","user":{"login":"aoskotsky-amplify","id":15692902,"avatar_url":"https://avatars.githubusercontent.com/u/15692902?v=3","gravatar_id":"","url":"https://api.github.com/users/aoskotsky-amplify","html_url":"https://github.com/aoskotsky-amplify","followers_url":"https://api.github.com/users/aoskotsky-amplify/followers","following_url":"https://api.github.com/users/aoskotsky-amplify/following{/other_user}","gists_url":"https://api.github.com/users/aoskotsky-amplify/gists{/gist_id}","starred_url":"https://api.github.com/users/aoskotsky-amplify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aoskotsky-amplify/subscriptions","organizations_url":"https://api.github.com/users/aoskotsky-amplify/orgs","repos_url":"https://api.github.com/users/aoskotsky-amplify/repos","events_url":"https://api.github.com/users/aoskotsky-amplify/events{/privacy}","received_events_url":"https://api.github.com/users/aoskotsky-amplify/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-06T16:51:54Z","updated_at":"2016-05-10T17:26:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/amplifylitco/asiaq/pulls/38","html_url":"https://github.com/amplifylitco/asiaq/pull/38","diff_url":"https://github.com/amplifylitco/asiaq/pull/38.diff","patch_url":"https://github.com/amplifylitco/asiaq/pull/38.patch"},"body":"Add a `disco_rds.py clone --env target_env --source-env source_env --source-db source_db` command\r\n\r\nThis will copy the configuration and latest snapshot to create a new database in another environment. The current use case is copying databases into sandbox environments. This could also be used for mirroring the prod and staging databases.\r\n\r\nThis only supports cloning into a different environment. In the future we can add support for creating a copy in the source's environment.\r\n\r\n**Note**: I did some minor refactoring of the master password handling. We were previously storing the master password with a key that included the environment name like `ci-foodb` but the environment is already in the S3 bucket name so its redundant and causes  problems when using sandboxes. The new approach will look for either a `ci-foodb` key or a `foodb` key for backwards compatibility. \r\n\r\n**Future work for another PR:**\r\n* Cloning from a specific snapshot other than the latest one\r\n* Displaying a list of snapshots that can be cloned\r\n* Cloning into the same environment as the source database but with a different name"},"comment":{"url":"https://api.github.com/repos/amplifylitco/asiaq/issues/comments/218230089","html_url":"https://github.com/amplifylitco/asiaq/pull/38#issuecomment-218230089","issue_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/38","id":218230089,"user":{"login":"pchand-amplify","id":15693914,"avatar_url":"https://avatars.githubusercontent.com/u/15693914?v=3","gravatar_id":"","url":"https://api.github.com/users/pchand-amplify","html_url":"https://github.com/pchand-amplify","followers_url":"https://api.github.com/users/pchand-amplify/followers","following_url":"https://api.github.com/users/pchand-amplify/following{/other_user}","gists_url":"https://api.github.com/users/pchand-amplify/gists{/gist_id}","starred_url":"https://api.github.com/users/pchand-amplify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchand-amplify/subscriptions","organizations_url":"https://api.github.com/users/pchand-amplify/orgs","repos_url":"https://api.github.com/users/pchand-amplify/repos","events_url":"https://api.github.com/users/pchand-amplify/events{/privacy}","received_events_url":"https://api.github.com/users/pchand-amplify/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T17:26:57Z","updated_at":"2016-05-10T17:26:57Z","body":"Can't think of any major concerns. 👍 "}}