Creating backup archive: 1659683091_2022_08_05_13.8.4_gitlab_backup.tar ... done Uploading backup archive to remote storage ... skipped Deleting tmp directories ... done done done done done done done done Deleting old backups ... skipping Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data and are not included in this backup. You will need these files to restore a backup. Please back them up manually. Backup task is done.
root@gitlab:/var/opt/gitlab/backups# gitlab-rake gitlab:backup:restore BACKUP=1659683091_2022_08_05_13.8.4 Unpacking backup ... done Be sure to stop Puma, Sidekiq, and any other process that connects to the database before proceeding. For Omnibus installs, see the following link for more information: https://docs.gitlab.com/ee/raketasks/backup_restore.html#restore-for-omnibus-gitlab-installations
Before restoring the database, we will remove all existing tables to avoid future upgrade problems. Be aware that if you have custom tables in the GitLab database these tables and all data will be removed.
Do you want to continue (yes/no)? yes
询问 恢复数据库之前,我们将删除所有现有的 表,以避免将来的升级问题。 输入 yes
This task will now rebuild the authorized_keys file. You will lose any data stored in the authorized_keys file. Do you want to continue (yes/no)? yes
Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data and are not included in this backup. You will need to restore these files manually. Restore task is done. root@gitlab:/var/opt/gitlab/backups#
这个任务现在将重建authorized_keys文件。
您将丢失存储在authorized_keys文件中的所有数据。
是否继续(是/否)?
输入 yes
克隆地址修改
进入容器
docker-compose exec gitlab bash
or
docker exec -it gitlab bash
编辑配置
vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
root@gitlab:/var/opt/gitlab/backups# gitlab-rake 1659683091_2022_08_05_13.8.4_gitlab_backup.tar rake aborted! Don't know how to build task '1659683091_2022_08_05_13.8.4_gitlab_backup.tar' (See the list of available tasks with `rake --tasks`) /opt/gitlab/embedded/bin/bundle:23:in `load' /opt/gitlab/embedded/bin/bundle:23:in `<main>' (See full trace by running task with --trace)
PG::ConnectionBad: could not connect to server: No such file or directory
PG::ConnectionBad: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"? /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:27:in `block (3 levels) in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:69: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:db:drop_tables (See full trace by running task with --trace)