所以我试图在这个脚本之后做一个Git备份(来自源代码):它似乎工作,直到弹出一个rake aborted消息,为什么会发生这种情况我需要改变什么?
root@gitlab-test git/gitlab$ git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
Unknown option: -H
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
root@gitlab-test git/gitlab$ git bundle exec rake gitlab:backup:create RAILS_ENV=production
error: could not open 'rake'
root@gitlab-test git/gitlab$ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
Dumping database ...
Dumping MySQL database gitlab_production ... [DONE]
done
Dumping repositories ...
* gitlab-admin/test ... [DONE]
* gitlab-admin/test.wiki ... [SKIPPED]
done
Dumping uploads ...
rake aborted!
Errno::ENOENT: No such file or directory @ realpath_rec - /home/git/gitlab/public/uploads
/home/git/gitlab/lib/backup/files.rb:9:in `realpath'
/home/git/gitlab/lib/backup/files.rb:9:in `initialize'
/home/git/gitlab/lib/backup/uploads.rb:7:in `initialize'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:126:in `new'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:126:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:13:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:backup:uploads:create
(See full trace by running task with --trace)