Fork Your Application's Data (Not Just Your Code)
November 08, 2012 by Craig Kerstiens
Git and Github revolutionized software development by letting you fork your source repository with a single click. Wouldn't it be great to be able to do the same thing with your database?
In the same way you can fork your code you can now fork your data. Fork changes the way you can work with your data, making it a snap to provision a clone of your production database. The technology is simple, safe, and robust, and thanks to Heroku Postgres' cloud architecture, places no load on your primary database. Today, we’re announcing the release of this functionality into General Availability.
Forking your data opens up whole new ways of developing software. We've seen our users finding all kinds of use-cases including:
- Easier load testing
- Worry-free migrations
- Trivial cloning of data to development/staging
How many times have you run a migration that went wrong in production but worked perfectly against your testing data? With Heroku Postgres, you can simply fork your production database and test the migration against real data. After it finishes, if the result looks good, you can promote it, fix it, or throw it away. If there's a problem, you still have your original database.
This kind of fearless interaction is the product of a new way of thinking about data. By shifting the focus away from database servers and towards your data, Heroku Postgres gives you tools to work risk-free throughout the entire software lifecycle: in development, staging, and production.
Creating forks is supported from both the CLI and through the Heroku Postgres dashboard. From within the Heroku Postgres dashboard, you can make a fork with one click:
You can also use a single command with the Heroku CLI to fork your data:
$ heroku addons:add heroku-postgresql:crane --fork HEROKU_POSTGRESQL_LAVENDER Adding heroku-postgresql:crane on sushi... done, v113 ($50/mo) Attached as HEROKU_POSTGRESQL_VIOLET_URL ...
Heroku Postgres features like fork empower you to focus on what really matters – building your application and business. By choosing Heroku Postgres as your database-as-a-service provider you get the benefit of constant improvement, and new functionality which gives you the ability to build better software faster and more safely.
Fork is available immediately on every Heroku Postgres production database. To learn more about forking your data, you can read the dev center article, go to the Heroku Postgres dashboard and click the fork button on one of your existing databases, or simply create one from the command-line. As always with Heroku, you only pay for what you use, so give it a try today and see how easy it is and then let us know how you're using it at email@example.com.