我正在使用以下指南将 Gitlab 服务器迁移到 Omnibus 版本:http: //theterminallife.com/migrating-gitlab-to-gitlab-omnibus/
一切正常,直到备份还原时的 rake 脚本,我在反引号上遇到几个语法错误。
@GitLabVM:~$ sudo gitlab-rake gitlab:backup:restore BACKUP=1452260428
Unpacking backup ... 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` (
^
ERROR: syntax error at or near "`"
LINE 1: LOCK TABLES `abuse_reports` WRITE;
^
ERROR: syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
^
ERROR: syntax error at or near "`"
LINE 1: DROP TABLE IF EXISTS `application_settings`;
^
ERROR: syntax error at or near "`"
LINE 1: CREATE TABLE `application_settings` (
^
ERROR: syntax error at or near "`"
LINE 1: LOCK TABLES `application_settings` WRITE;
^
ERROR: syntax error at or near "`"
LINE 1: INSERT INTO `application_settings` VALUES (1,10,1,1,1,NULL,'...
^
ERROR: syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
^
ERROR: syntax error at or near "`"
LINE 1: DROP TABLE IF EXISTS `audit_events`;
我检查了 sql 文件,它没有我收到错误的反引号。
-- Converted by db_converter
START TRANSACTION;
SET standard_conforming_strings=off;
SET escape_string_warning=off;
SET CONSTRAINTS ALL DEFERRED;
DROP TABLE IF EXISTS "abuse_reports";
CREATE TABLE "abuse_reports" (
"id" integer NOT NULL,
"reporter_id" integer DEFAULT NULL,
"user_id" integer DEFAULT NULL,
"message" text ,
"created_at" timestamp with time zone DEFAULT NULL,
"updated_at" timestamp with time zone DEFAULT NULL,
PRIMARY KEY ("id")
);
DROP TABLE IF EXISTS "application_settings";
CREATE TABLE "application_settings" (
"id" integer NOT NULL,
"default_projects_limit" integer DEFAULT NULL,
"signup_enabled" int4 DEFAULT NULL,
"signin_enabled" int4 DEFAULT NULL,
"gravatar_enabled" int4 DEFAULT NULL,
.....
.....
Gitlab 中有一个相关的错误报告,但它已被弃用,我似乎无法找到此错误发生的位置。我将不胜感激任何帮助追踪这一点。谢谢你。