bitnami-gitlab备份与恢复
备份GITLAB_HOME="/home/data/gitlab-8.14.3-0"
PATH="$GITLAB_HOME/apps/gitlabci/gitlabci-runner:$GITLAB_HOME/apps/gitlab/gitlab-shell/bin:$GITLAB_HOME/redis/bin:$GITLAB_HOME/sqlite/bin:$GITLAB_HOME/python/bin:$GITLAB_HOME/perl/bin:$GITL
AB_HOME/git/bin:$GITLAB_HOME/ruby/bin:$GITLAB_HOME/mysql/bin:$GITLAB_HOME/apache2/bin:$GITLAB_HOME/common/bin:$GITLAB_HOME/nodejs/bin:$GITLAB_HOME/go/bin:$GITLAB_HOME/postgresql/bin:$PATH"
echo "backup gitlab to local storage begin.. "
cd $GITLAB_HOME/apps/gitlab/htdocs
bundle exec bin/rake gitlab:backup:create RAILS_ENV=production
cd $GITLAB_HOME/apps/gitlab/htdocs/tmp/backups
恢复
备份文件名为:1405247282_gitlab_backup.tar
cd /home/data/gitlab-8.14.3-0
./use_gitlab
cd /home/data/gitlab-8.14.3-0/apps/gitlab/htdocs
bundle exec bin/rakegitlab:backup:restore RAILS_ENV=production BACKUP=1405247282
chown git:git -R /home/data/gitlab-8.14.3-0/apps/gitlab/repositories
页:
[1]