#gitlab backup
$sudo gitlab-rake gitlab:backup:create
$sudo ls /var/opt/gitlab/backups
#backup 위치 변경
$sudo vi /etc/gitlab/gitlab.rb
gitlab_rails['backup_path'] = '변경될 위치'
$sudo gitlab-ctl reconfigure
# limit backup lifetime to 7 days - 604800 seconds
$sudo vi /etc/gitlab/gitlab.rb
gitlab_rails['backup_keep_time'] = 604800
$sudo gitlab-ctl reconfigure
# restoring backup
$sudo cp 1393513186_gitlab_backup.tar /var/opt/gitlab/backups/
# Stop processes that are connected to the database
$sudo gitlab-ctl stop unicorn
$sudo gitlab-ctl stop sidekiq
# This command will overwrite the contents of your GitLab database!
$sudo gitlab-rake gitlab:backup:restore BACKUP=1393513186
# Start GitLab
$sudo gitlab-ctl start
# Create satellites
$sudo gitlab-rake gitlab:satellites:create
# Check GitLab
$sudo gitlab-rake gitlab:check SANITIZE=true
#scheduling a backup
$crontab -e
0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1
0 개의 댓글:
댓글 쓰기