I ended up using Heroku’s bundles feature a fair bit today. For those who have not played with this yet, a bundle is essentially a zip/tar file containing all the code from your application along with a dump of your database. From the help file:
bundles # list bundles for the app
bundles:capture [<bundle>] # capture a bundle of the app’s code and data
bundles:download # download most recent app bundle as a tarball
bundles:download <bundle> # download the named bundle
bundles:animate <bundle> # animate a bundle into a new app
bundles:destroy <bundle> # destroy the named bundle
In general its pretty intuitive. The commands do what you expect; “bundles:capture” captures a bundle, while “bundles:download mybundle” downloads the bundle named mybundle. With my expectations set by using the other commands I tried out bundles:animate
mike@sleepycat:~/projects/myapp$ heroku bundles
2010-03-16 complete 03/17/2010 14:25
mike@sleepycat:~/projects/myapp$ heroku bundles:animate 2010-03-16
Animated myapp 2010-03-16 into http://myapp-2010-03-16.heroku.com/ | git@heroku.com:myapp-2010-03-16.git
Given the description “animate a bundle into a new app” I was expecting a fully functional copy of my application waiting for me at that new address, based on the code and the database dump contained in the bundle. Instead I get:
mike@sleepycat:~/projects/myapp$ heroku console –app myapp-2010-03-16
! myapp-2010-03-16 has an empty code repository. Push and try again.
When I log in and look at my account, sure enough the repository is empty and even more surprising:
Data size
0 Bytes in 0 tables
So if it does not load any of the code from my bundle, and doesn’t use the database dump to create a database, how does this differ from creating a new app?