Database export/import
Published
Updated
MySQL databases move between a local machine and fortrabbit as a full dump: export with mysqldump or a GUI, then import on the other side. Upload once at setup, download from production now and then.
Get ready
Syncing a database between a local and a remote environment requires:
- Have a local development environment running.
- Be able to access the remote fortrabbit database.
A sync moves the complete database: a dump.sql file with structure and contents, exported from the source and imported into the destination. It works in both directions:
- Upload: Export from local and import to fortrabbit
- Download: Export from fortrabbit and import to local
At setup, the local database usually goes up once. Later, as editors add content in production, it comes down from time to time. The backup files hold a dump too.
Next
The commands may differ with the local development environment.