Export backup prior to migration

Closes #847
- Added logic to export database to the `core\server\data\` folder prior
to beginning a migration.
- Factored out versioning logic from migration to prevent circular
references
Merge pull request #2841 from gotdibbs/847

Export backup prior to migration