When I try to restore data from the backup, from the server, where the gitlab was installed from sources (sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production ; gitlab version 8.7.0) to other server (sudo gitlab-rake gitlab:backup:restore ; gitlab version 8.7.0) I get the error:
ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'keys' at line 1: DROP TABLE keys
If I try to drop the database, I get the error:
Mysql2::Error: Table 'gitlabhq_production.schema_migrations' doesn't exist: TRUNCATE schema_migrations
What should I do in this situation?