Search code examples
herokuheroku-postgres

Programmatically change database for heroku dataclips


We just upgraded our Heroku postgres database using the follower changeover method. We have over 50 dataclips attached to the old database, and now we need to move them over to the new database. However, doing them one by one will take a lot of time.

Is there a programatic way to update the database a dataclip is attached to, perhaps with the CLI tools?


Solution

  • At least once the old database has been deprovisioned, you can now (as of March 2016) reattach them to another database:

    Go to https://dataclips.heroku.com/clips/recoverable. It will display your old database and a set of 'orphaned' dataclips and you can choose to transfer them to another database (in my case the promoted follower from the changeover).

    Note that this only affects the dataclips that you created, it does not affect the dataclips one of your team members created and that you only had access to. So they will have to go through this process as well.

    Official devcenter article: https://devcenter.heroku.com/articles/dataclips#dataclip-recovery