这篇文章主要讲解了“GitLab中怎么对数据进行备份”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“GitLab中怎么对数据进行备份”吧!
1,全备份
集成包安装:# gitlab-rake gitlab:backup:create源码安装# git -H bundle exec rake gitlab:backup:create RAILS_ENV=productiondocker安装# docker exec -t gitlab-rake gitlab:backup:create
2,部分备份
db (数据库) uploads (附件) repositories (代码库) builds (CI作业输出日志) artifacts (CI工件) lfs (LFS对象) registry (注册图片) pages (页面内容)
集成包安装:# gitlab-rake gitlab:backup:create SKIP=uploads,repositories,builds,artifacts,lfs,registry,pages源码安装# git -H bundle exec rake gitlab:backup:create SKIP=uploads,repositories RAILS_ENV=productiondocker安装# docker exec -t gitlab-rake gitlab:backup:create SKIP=uploads,registry,pages
3,crontab
集成包安装:0 7 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1源码安装0 7 * * * cd /gitlab目录 && PATH=/usr/local/bin:/usr/bin:/bin bundle exec rake gitlab:backup:create RAILS_ENV=production CRON=1docker安装0 7 * * * /bin/docker exec -t /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1
感谢各位的阅读,以上就是“GitLab中怎么对数据进行备份”的内容了,经过本文的学习后,相信大家对GitLab中怎么对数据进行备份这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!