good morning, I’m trying to make a migration from gitlab 9.3.11 with mysql to 9.3.11 with postgresql.
When i transfer schema i get the following error:
sudo -u gitlab-psql pgloader /tmp/commands.load
2019-04-24T14:36:21.119000Z LOG Migrating from #<MYSQL-CONNECTION mysql://root@172.22.0.99:3306/gitlab_production {1006D938B3}>
2019-04-24T14:36:21.123000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://gitlab-psql@unix://var/opt/gitlab/postgresql:5432/gitlabhq_production {1006D95113}>
2019-04-24T14:36:24.714000Z WARNING Source column “public”.“abuse_reports”.“id” is casted to type “bigserial” which is not the same as “integer”, the type of current target database column “public”.“abuse_reports”.“id”.
2019-04-24T14:36:24.714000Z WARNING Source column “public”.“abuse_reports”.“reporter_id” is casted to type “bigint” which is not the same as “integer”, the type of current target database column “public”.“abuse_reports”.“reporter_id”.
2019-04-24T14:36:24.714000Z WARNING Source column “public”.“abuse_reports”.“user_id” is casted to type “bigint” which is not the same as “integer”, the type of current target database column “public”.“abuse_reports”.“user_id”.
2019-04-24T14:36:24.715000Z WARNING Source column “public”.“abuse_reports”.“created_at” is casted to type “timestamptz” which is not the same as “timestamp without time zone”, the type of current target database column “public”.“abuse_reports”.“created_at”.
2019-04-24T14:36:24.715000Z WARNING Source column “public”.“abuse_reports”.“updated_at” is casted to type “timestamptz” which is not the same as “timestamp without time zone”, the type of current target database column “public”.“abuse_reports”.“updated_at”.
more lines
2019-04-24T14:36:26.714000Z LOG report summary reset
table name errors rows bytes total time
fetch meta data 0 87 0.182s
Truncate 0 87 0.942s
public.abuse_reports 0 0 0.027s
public.appearances 0 0 0.038s
public.application_settings 0 1 0.4 kB 0.027s
public.award_emoji 0 0 0.020s
public.broadcast_messages 0 1 0.3 kB 0.035s
public.chat_teams 0 0 0.073s
public.ci_pipelines 0 0 0.091s
public.ci_runners 0 0 0.101s
public.ci_stages 0 0 0.106s
public.ci_trigger_requests 0 0 0.116s
public.container_repositories 0 0 0.140s
public.deployments 0 0 0.155s
public.audit_events 0 166 25.4 kB 0.039s
public.emails 0 0 0.166s
public.events 0 3976 4.2 MB 0.863s
public.boards 0 1 0.0 kB 0.050s
public.chat_names 0 0 0.068s
public.ci_builds 0 0 0.073s
public.ci_pipeline_schedules 0 0 0.092s
public.ci_runner_projects 0 0 0.104s
public.ci_triggers 0 0 0.121s
public.ci_variables 0 0 0.137s
public.conversational_development_index_metrics 0 0 0.147s
public.deploy_keys_projects 0 0 0.152s
public.environments 0 0 0.174s
public.features 0 0 0.203s
public.forked_project_links 0 0 0.217s
public.issues 0 9 3.1 kB 0.244s
public.issue_metrics 0 2 0.1 kB 0.261s
public.labels 0 3 0.3 kB 0.279s
public.label_priorities 0 0 0.292s
public.lfs_objects_projects 0 0 0.311s
public.members 0 898 83.0 kB 0.385s
public.merge_requests_closing_issues 0 0 0.385s
public.merge_request_metrics 0 0 0.394s
public.namespaces 0 48 5.3 kB 0.421s
public.notification_settings 0 901 56.8 kB 0.439s
public.oauth_access_tokens 0 0 0.406s
public.oauth_openid_requests 0 0 0.421s
public.personal_access_tokens 0 0 0.414s
public.project_authorizations 0 884 7.6 kB 0.445s
public.project_group_links 0 0 0.425s
public.project_statistics 0 158 4.9 kB 0.438s
public.protected_branch_merge_access_levels 0 1 0.0 kB 0.440s
public.protected_tags 0 0 0.445s
public.redirect_routes 0 0 0.453s
public.routes 0 206 18.0 kB 0.466s
public.sent_notifications 0 0 0.463s
public.snippets 0 0 0.466s
public.subscriptions 0 0 0.482s
public.taggings 0 3 0.1 kB 0.472s
public.timelogs 0 0 0.496s
public.trending_projects 0 0 0.510s
public.uploads 0 0 0.514s
public.users_star_projects 0 3 0.1 kB 0.531s
public.web_hooks 0 0 0.522s
public.feature_gates 0 0 0.002s
public.identities 0 0 0.023s
public.issue_assignees 0 8 0.0 kB 0.040s
public.keys 0 18 14.4 kB 0.058s
public.label_links 0 3 0.2 kB 0.080s
public.lfs_objects 0 0 0.082s
public.lists 0 2 0.1 kB 0.114s
public.merge_requests 0 0 0.135s
public.merge_request_diffs 0 0 0.152s
public.milestones 0 2 0.2 kB 0.173s
public.notes 0 9 1.3 kB 0.188s
public.oauth_access_grants 0 0 0.211s
public.oauth_applications 0 0 0.224s
public.pages_domains 0 0 0.230s
public.projects 0 158 31.8 kB 0.270s
public.project_features 0 161 10.0 kB 0.275s
public.project_import_data 0 0 0.274s
public.protected_branches 0 1 0.1 kB 0.278s
public.protected_branch_push_access_levels 0 1 0.0 kB 0.293s
public.protected_tag_create_access_levels 0 0 0.280s
public.releases 0 0 0.298s
public.schema_migrations 0 776 11.4 kB 0.298s
public.services 0 2 0.3 kB 0.296s
public.spam_logs 0 0 0.300s
public.system_note_metadata 0 0 0.307s
public.tags 0 3 0.1 kB 0.297s
public.todos 0 0 0.314s
public.u2f_registrations 0 0 0.304s
public.users 0 17 7.8 kB 0.324s
public.user_agent_details 0 0 0.314s
public.web_hook_logs 0 0 0.321s
COPY Threads Completion 0 4 0.819s
Reset Sequences 0 84 0.058s
Install Comments 0 0 0.000s
Total import time ? 8422 4.4 MB 0.877s
when trying to recover the data from the backup I get the following error:
root@gitlab /tmp# sudo gitlab-rake gitlab:backup:restore BACKUP=1556101742_2019_04_24_9.3.11
Unpacking backup … done
Before restoring the database we recommend removing all existing
tables to avoid future upgrade problems. Be aware that if you have
custom tables in the GitLab database these tables and all data will be
removed.
Do you want to continue (yes/no)? yes
Removing all tables. Press Ctrl-C
within 5 seconds to abort
Cleaning the database …
done
Restoring database …
Restoring PostgreSQL database gitlabhq_production … ERROR: syntax error at or near “" LINE 1: DROP TABLE IF EXISTS
abuse_reports; ^ ERROR: syntax error at or near "
”
LINE 1: CREATE TABLE abuse_reports
(
more lines
ERROR: syntax error at or near “" LINE 1: LOCK TABLES
events WRITE; ^ invalid command \' invalid command \' invalid command \' invalid command \' invalid command \' ERROR: syntax error at or near "
”
LINE 1: INSERT INTO events
VALUES (8943,NULL,NULL,NULL,’—\n:befo…
^
[DONE]
done
Restoring repositories …
rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation “projects” does not exist
LINE 5: WHERE a.attrelid = ‘“projects”’::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = ‘“projects”’::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
/opt/gitlab/embedded/service/gitlab-rails/app/models/project.rb:225:in block in <class:Project>' /opt/gitlab/embedded/service/gitlab-rails/lib/backup/repository.rb:73:in
restore’
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:83:in block (4 levels) in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:56:in
block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:22:in load' /opt/gitlab/embedded/bin/bundle:22:in
’
PG::UndefinedTable: ERROR: relation “projects” does not exist
LINE 5: WHERE a.attrelid = ‘“projects”’::regclass
^
/opt/gitlab/embedded/service/gitlab-rails/app/models/project.rb:225:in block in <class:Project>' /opt/gitlab/embedded/service/gitlab-rails/lib/backup/repository.rb:73:in
restore’
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:83:in block (4 levels) in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:56:in
block (3 levels) in <top (required)>’
/opt/gitlab/embedded/bin/bundle:22:in load' /opt/gitlab/embedded/bin/bundle:22:in
’
Tasks: TOP => gitlab:backup:repo:restore
(See full trace by running task with --trace)
can i help me? Thanx