我按照https://about.gitlab.com/downloads/中的教程安装gitbal-7.1.1 我正在使用Centos 6.5。我创建了三个项目和一个用户进行备份:
Project:
private-project
test-Gitlab2
test-Gitlab
User:
Administrator
test
备份过程非常成功。
sudo gitlab-rake gitlab:backup:create
这是备份过程的输出:
Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... [DONE]
done
Dumping repositories ...
* root/test-gitlab ... [DONE]
* root/test-gitlab2 ... [SKIPPED]
* root/test-gitlab2.wiki ... [SKIPPED]
* root/private-project ... [SKIPPED]
* root/private-project.wiki ... [SKIPPED]
done
Dumping uploads ...
done
Creating backup archive: 1409819679_gitlab_backup.tar ... done
Deleting tmp directories ... done
Deleting old backups ... skipping
我删除了test-Gitlab项目。当我恢复
sudo gitlab-rake gitlab:backup:restore BACKUP=1409819679
我看到输出有些失败。这是输出的一部分:
Unpacking backup ... done
Restoring database ...
Restoring PostgreSQL database gitlabhq_production ... SET
SET
SET
SET
SET
CREATE EXTENSION
psql:/var/opt/gitlab/backups/db/database.sql:22: ERROR: must be owner of extension plpgsql
SET
SET
SET
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
ALTER SEQUENCE
...
CREATE INDEX
CREATE INDEX
psql:/var/opt/gitlab/backups/db/database.sql:2233: WARNING: no privileges could be revoked for "public"
REVOKE
psql:/var/opt/gitlab/backups/db/database.sql:2234: WARNING: no privileges could be revoked for "public"
REVOKE
psql:/var/opt/gitlab/backups/db/database.sql:2235: WARNING: no privileges were granted for "public"
GRANT
psql:/var/opt/gitlab/backups/db/database.sql:2236: WARNING: no privileges were granted for "public"
GRANT
[DONE]
done
Restoring repositories ...
root/test-gitlab ... [DONE]
root/test-gitlab2 ... [FAILED]
root/private-project ... [FAILED]
Put GitLab hooks in repositories dirs [DONE]
done
Restoring uploads ...
done
This will rebuild an authorized_keys file.
You will lose any data stored in authorized_keys file.
Do you want to continue (yes/no)? yes
.Deleting tmp directories ... done
但是当我检查gitlab时。我看到项目测试-Gitlab已经恢复。我不知道发生了什么。我不确定恢复是否成功。