gitlab本体恢复备份

时间:2019-09-03 10:11:47

标签: linux ubuntu gitlab

大家好,我使用gitlab ce 12.0.6&我的操作系统是Ubuntu 19.04 我创建备份,但是当我想将备份导入gitlab时 我运行此命令

sudo gitlab-rake gitlab:backup:restore BACKUP=1567495766_2019_09_03_12.0.6_gitlab_backup.tar

它向我显示此错误:

rake aborted!
 Permission denied @ dir_chdir - /home/ima/gitbackups/gitlab
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:114:in `chdir'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:114:in `unpack'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:36:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:backup:restore
(See full trace by running task with --trace)

作为一个新手,我到处搜索过,但没有一个在我的问题上不起作用。 请帮助我

1 个答案:

答案 0 :(得分:1)

错误的相关部分是:

Columns=3

此目录应由用户Permission denied @ dir_chdir - /home/ima/gitbackups/gitlab 拥有。要更改此设置,请运行git

这还假定该目录上的目录对所有用户都具有读/执行权限。也就是说,如果在路径上运行chown -R git:git /home/ima/gitbackups/gitlab,依此类推,则所有内容都应显示为ls -la /home/ima/gitbackups之类的内容,其中结尾处为drwxr-xr-x