Restore database to different environment?

I am migrating our staging app to a new environment since we are currently on the old infrastructure. What is the best way to migrate the data from our existing environment to the new one. Can I use aptible backups:restore to restore a database from one environment to another?

Hi Ruth,

You are correct, aptible backup:restore only restores to the same environment. To restore to a different environment, you’d:

  1. Restore the backup to a new database in the same environment
  2. Dump that new database locally using the database utility of your choice
  3. Provision a second new database of a compatible type in your new environment
  4. Restore the dump to the database in #3
  5. Clean up: delete the dump locally, deprovision the original restored database

- Chas

Hi Ruth,

As an update to this question, we recently released support for cross-environment backup:restore: https://www.aptible.com/changelog/restore-database-backups-across-environments

We hope this helps your workflow, but please let us know if you have further questions!