所以我想备份 git。我正在使用这个脚本来执行此操作(此处:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md)。但是创建 tar 文件最后总是失败。
root@gitlab-test git/gitlab# sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production --trace
** Invoke gitlab:backup:create (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:backup:create
** Invoke gitlab:backup:db:create (first_time)
** Invoke environment
** Execute gitlab:backup:db:create
Dumping database ...
Dumping MySQL database gitlab_production ... [DONE]
done
** Invoke gitlab:backup:repo:create (first_time)
** Invoke environment
** Execute gitlab:backup:repo:create
Dumping repositories ...
* gitlab-admin/test ... [DONE]
* gitlab-admin/test.wiki ... [SKIPPED]
done
** Invoke gitlab:backup:uploads:create (first_time)
** Invoke environment
** Execute gitlab:backup:uploads:create
Dumping uploads ...
done
** Invoke gitlab:backup:builds:create (first_time)
** Invoke environment
** Execute gitlab:backup:builds:create
Dumping builds ...
done
** Invoke gitlab:backup:artifacts:create (first_time)
** Invoke environment
** Execute gitlab:backup:artifacts:create
Dumping artifacts ...
done
** Invoke gitlab:backup:lfs:create (first_time)
** Invoke environment
** Execute gitlab:backup:lfs:create
Dumping lfs objects ...
done
Creating backup archive: 1469611232_gitlab_backup.tar ... tar: uploads.tar.gz: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
creating archive 1469611232_gitlab_backup.tar failed
Backup failed
我究竟做错了什么?
答案1
看起来它正在尝试包含 uploads.tar.gz (附件),但未找到。
尝试跳过它:
sudo -u git -H bundle exec rake gitlab:backup:create SKIP=uploads RAILS_ENV=production --trace