gitlab备份-源码安装
来源:互联网 发布:抢演唱会门票软件 编辑:程序博客网 时间:2024/06/06 03:27
手动备份:
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production STRATEGY=copy
注:跳过某些内容sudo -u git -H bundle exec rake gitlab:backup:create SKIP=db,uploads RAILS_ENV=production
skip为:
db (database)
uploads (attachments)
repositories (Git repositories data)
builds (CI job output logs)
artifacts (CI job artifacts)
lfs (LFS objects)
registry (Container Registry images)
pages (Pages content)
2、自动备份:crontab学习可以看我另外一篇文章Linux定时任务cron和crontab
cd /home/git/gitlab
sudo -u git -H vim config/gitlab.yml # Enable keep_time in the backup section to automatically delete old backups
sudo -u git crontab -e # Edit the crontab for the git user
添加如下内容:
# Create a full backup of the GitLab repositories and SQL database every day at 4am
0 4 * * * cd /home/git/gitlab && PATH=/usr/local/bin:/usr/bin:/bin bundle exec rake gitlab:backup:creat
3、还原
cd /home/git/gitlab
bundle exec rake gitlab:backup:restore RAILS_ENV=productione RAILS_ENV=production CRON=1
如果备份目录下面有多个备份文件,则需加参数并指明时间戳
BACKUP=timestamp_of_backup (required if more than one backup exists)
force=yes (do not ask if the authorized_keys file should get regenerated)
4、备份注意事项:
还需要备份文件:/home/git/gitlab/config/secrets.yml(两步验证时用到:用户名密码登录及短信验证)
- gitlab备份-源码安装
- gitlab安装 备份 恢复
- gitlab 迁移 + 安装 + 备份还原
- gitlab服务器安装/配置/使用/备份/恢复
- gitlab备份
- gitlab 备份
- ubuntu下源码安装gitlab(可汉化)
- gitlab 安装 备份 恢复 邮箱配置 修改web端口
- gitlab 安装 备份 恢复 邮箱配置 修改web端口
- 一键安装Gitlab后的备份、迁移与恢复
- 一键安装Gitlab后的备份、迁移与恢复
- gitlab备份迁移
- Gitlab备份与恢复
- gitlab 备份与恢复
- Gitlab 创建备份
- gitlab备份及恢复
- 关于gitlab备份
- Gitlab备份、升级、恢复
- ubuntu搜狗输入法崩溃
- 异步消息机制源码分析
- python中str与list互换
- No module named win32api问题解决
- CNN-卷积反卷积
- gitlab备份-源码安装
- mysql COALESCE的作用
- 大白话讲解遗传算法
- 安装ansible时,报fatal error: Python.h: No such file or directory
- android如何客制化紧急号码?
- 微信小程序 判断接口是否可用并给出"弹出提示框"提示
- 记录一些makefile 的规则、变量函数使用
- IOS-DesignPattern-Singleton
- 【杂物间】