6

Heroku has a "releases" feature that allows you to roll back to a specific deployment release. I've seen a lot of info about rolling back, but how do you roll forward again after rolling back?

Basically, I'd like to roll back to a particular release to see if it was the one that introduced some bugs. I have a feeling it isn't, so I'm pretty sure I'll be reverting back (rolling forward) to the latest release as soon as I find out.

And if it's not doable with Heroku releases, I imagine it is with Git. That said, if I use Git to do this, I don't want my local Git repo's history to be touched. I'd only want the Heroku repo to be rolled back/forward.

So... how?

XåpplI'-I0llwlg'I -
  • 21,649
  • 28
  • 102
  • 151

2 Answers2

6

This seems very doable with the heroku client from their toolbelt.

heroku releases:info

and then

heroku rollback v502

to the forward version you want

winfred
  • 3,053
  • 1
  • 25
  • 16
  • 1
    This actually works. Silly me, I was trying to roll forward to the most recent release, which itself was a rollback to a previous release. Worked once I rolled "forward" to the release just prior to the rollback release. – Eben Geer Mar 17 '15 at 18:21
0

Not possible at the moment.

Here is Heroku Release API:

https://api-docs.heroku.com/releases

Options:

  • List releases for an app
  • Get info for a release
  • Rollback to a release

You need to do it via Git, witch i think it is the better way in general.

/Edit:

The Git way:

git reset --hard <tag/branch/commit id>
SG 86
  • 6,974
  • 3
  • 25
  • 34
  • 1
    Thanks for the API info, didn't know about that. I ended up doing `git push -f heroku HEAD~N:master`, which rolls back Heroku by `N` commits, but leaves your local working copy completely untouched. I then used `git ls-remote heroku` to double-check that it reverted back to the right commit. When I was ready to fast-forward to the latest commit again, I simply did a `git push heroku master` to send my local working copy's HEAD back to Heroku. And then my spirit joined the Mighty Ones in Valhalla. – XåpplI'-I0llwlg'I - Jan 09 '13 at 22:20