Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serbiant/heroku-db-clone
Simple bash script that clone database from one Heroku app to another one. Transfers schema & data. Useful for duplicating data from production to staging environments.
https://github.com/serbiant/heroku-db-clone
aws-cli aws-s3 database heroku heroku-apps postgres postgresql psql s3 transfer-data
Last synced: about 1 month ago
JSON representation
Simple bash script that clone database from one Heroku app to another one. Transfers schema & data. Useful for duplicating data from production to staging environments.
- Host: GitHub
- URL: https://github.com/serbiant/heroku-db-clone
- Owner: serbiant
- License: mit
- Created: 2017-02-01T21:53:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-01T22:17:53.000Z (almost 8 years ago)
- Last Synced: 2024-09-28T18:05:32.717Z (about 2 months ago)
- Topics: aws-cli, aws-s3, database, heroku, heroku-apps, postgres, postgresql, psql, s3, transfer-data
- Language: Shell
- Size: 2.93 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# heroku-db-clone
Simple bash script that clone **Postgres** database from one Heroku app to another one.## General purpose
Basically, this tiny bash script might be used for copying database from **production** environment to **staging** to be able to play with real data without any harmful actions. For this case, notice that you might need to copy **S3 bucket or other services** that DB entities point to as well.
Generally, you can use this script when setting up several heroku apps for different environments, or you just simply want to clone database to another app.
## Requirements
- [heroku-cli](https://devcenter.heroku.com/articles/heroku-cli) installed and authenticated.
- [aws-cli](https://aws.amazon.com/ru/cli/) installed and authenticated.
- You must be the **owner** or **collaborator** for both applications.## Usage
```!bash
$ sh transfer_databases.sh
```## Tips
In case you got a permission error, just make it `executable`:
```!bash
$ sudo chmod 755 transfer_databases.sh
```## Misc
For any suggestions, help requests and contributing, just contact **[email protected]**