Reinstalling and rescuing a database

Hi everyone and thanks for your time!
I am a designer with some terminal skills and a limited understanding of the backgrounds so please do not kill me right away :wink:

My site was running fine on Ghost 1.25.x on a HostEurope VS on Ubuntu 14.04 without the Ghost CLI. The manual backup file exported from Ghost is corrupt (0kB) and I only have a MySQL dump. Now I have trouble reinstalling Ghost in that previous state in order to get an export done again.

When installing Ghost 1.25.5 or .4 I get knex-migrator errors asking me to init and migrate and then to init and migrate and init … So I am wondering whether there is a chance to work with the MySQL dump in any way? I have a Ghost locally on my Mac running 2.1.1 as well in dev mode (no MySQL) with the CLI.

After knex-migrator init and knex-migrator migrate I still get this error:

ERROR
NAME: DatabaseIsNotOkError
CODE: DB_NEEDS_MIGRATION
MESSAGE: Migrations are missing. Please run `knex-migrator migrate`.

In order to start from scratch / move over to Ghost(Pro) I wonder how I can get to a running installation again. is there a way to do this and you could point me to? Maybe there is someone willing to pair with me via screensharing in order to explain this as well. Most of the documentation and blog posts out there are not so self explanatory unfortunately and very specific. Let me know your price for a pairing :slight_smile:

In case this helps: A detailed output coming up when I start the blog with npm start --production

DatabaseIsNotOkError: Migrations are missing. Please run `knex-migrator migrate`.
    at DatabaseIsNotOkError.KnexMigrateError (/var/www/vhosts/website.de/v3ghost/node_modules/knex-migrator/lib/errors.js:7:26)
    at new DatabaseIsNotOkError (/var/www/vhosts/website.de/v3ghost/node_modules/knex-migrator/lib/errors.js:19:26)
    at /var/www/vhosts/website.de/v3ghost/node_modules/knex-migrator/lib/index.js:1066:27
    at /var/www/vhosts/website.de/v3ghost/node_modules/lodash/lodash.js:4925:15
    at baseForOwn (/var/www/vhosts/website.de/v3ghost/node_modules/lodash/lodash.js:3010:24)
    at /var/www/vhosts/website.de/v3ghost/node_modules/lodash/lodash.js:4894:18
    at Function.forEach (/var/www/vhosts/website.de/v3ghost/node_modules/lodash/lodash.js:9342:14)
    at /var/www/vhosts/website.de/v3ghost/node_modules/knex-migrator/lib/index.js:1063:15
    at tryCatcher (/var/www/vhosts/website.de/v3ghost/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/var/www/vhosts/website.de/v3ghost/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/var/www/vhosts/website.de/v3ghost/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/var/www/vhosts/website.de/v3ghost/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/var/www/vhosts/website.de/v3ghost/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/var/www/vhosts/website.de/v3ghost/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._resolveCallback (/var/www/vhosts/website.de/v3ghost/node_modules/bluebird/js/release/promise.js:432:57)
    at Promise._settlePromiseFromHandler (/var/www/vhosts/website.de/v3ghost/node_modules/bluebird/js/release/promise.js:524:17)

Thanks for your time and help in advance.
Jan

In addition to the question: Is there a chance to see from the MySQL dump what version of Ghost was used when the dump was created?

If you open up your migrations table, you’ll be able to see the last migration that ran. If you paste the content of that table one of us should be able to tell you which version of Ghost to try.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.