简体   繁体   中英

Gitlab backup secrets

I have docker ce v9.3.5 running inside a docker container.

I want to backup gitlab secrets as descrited here

I used this command to perform the backup of the secrets and configuration, but it gave me an error:

docker exec -t <your container name> /bin/sh -c 'umask 0077; tar cfz /secret/gitlab/backups/$(date "+etc-gitlab-\%s.tgz") -C / etc/gitlab'

在此处输入图片说明

I am not sure if the documentation is updated or my docker version is outdated, but looks like there is no "/secret/gitlab/backups" folder inside the container.

My question is:

1) which command do I need to run exactly?

1) can i just copy the container folder "/etc/gitlab" , which includes gitlab-secrets.json?

ps: I do have volumes mounted at "/etc/gitlab" , "/var/log/gitlab" and "/var/opt/gitlab"

Please make sure that gitlab_rails['backup_path'] option is indeed /secret/gitlab/backups/ and the path exists. The idea is that if you set an different folder for backups then you will have to adjust the command as you have it set in gitlab configuration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM