所以我试图用这个脚本从源代码中备份git:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md(和命令:sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV = production) 它在开始时工作,但在转储存储库时停止。 我该怎么办?
Dumping repositories ...
rake aborted!
Errno::EEXIST: File exists @ dir_s_mkdir - /home/git/gitlab/tmp/backups/repositories
/home/git/gitlab/lib/backup/repository.rb:136:in `prepare'
/home/git/gitlab/lib/backup/repository.rb:8:in `dump'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:69:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:backup:repo:create
(See full trace by running task with --trace)
root@gitlab-test gitlab/public#
答案 0 :(得分:0)
信息很清楚!看起来该目录已经存在!
将其移除或移至临时位置。
移动它
mv /home/git/gitlab/tmp/backups/repositories /home/git/gitlab/tmp/backups/repositories.old