Timering

Purp

Migrate Heroku Region from US to EU

There is no option to set or change Heroku region. You can set it when you create the App. But you don't want to build an App from scratch. But you can Fork the App with or without the database with all settings, and it's ready to run.

This is the command to fork from sourceapp to targetapp with region:

$ heroku fork --from sourceappname --to targetappname --region eu

If the App has paid postgresql and not hobby version, you can't fork it, just with a foloower. But actually it's easier to use the --skip pg command, and after that you can copy the database.

$ heroku fork --from sourceappname --to targetappname --skip-pg --region eu

$ heroku pg:copy sourceappname::SOURCEAPP_DATABASE_URL TARGETAPP_DATABASE_URL -a targetappname

For the local version, you can create the app in local with git clone from the sourceapp. Than add the new heroku app remote to it, and push it.

$ git clone https://git.heroku.com/sourceapp.git -o old targetapp
$ cd targetapp
$ heroku git:remote -a targetappname
$ git push heroku master

Finally, don't forget to set the custom domain at the new heroku app.