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:
- Restore the backup to a new database in the same environment
- Dump that new database locally using the database utility of your choice
- Provision a second new database of a compatible type in your new environment
- Restore the dump to the database in #3
- 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!