puppet-gitlab icon indicating copy to clipboard operation
puppet-gitlab copied to clipboard

Documentation for enabling/configuring backups

Open cmseal opened this issue 6 years ago • 2 comments

Would it be possible to add to the documentation examples for enabling/configuring backups?

Thanks! :)

cmseal avatar Sep 25 '19 12:09 cmseal

Yeah, now that Gitlab has more functionality built into the backup command, we should probably document exactly what the cron support we have does, and does not do.

LongLiveCHIEF avatar Sep 26 '19 13:09 LongLiveCHIEF

in particular, i have found it does not backup the configuration which seems.... problematic, at best. we do this instead:

  file { '/usr/local/sbin/tpo-gitlab-backup':
    mode    => '0555',
    content => @(EOF),
      #!/bin/sh
      set -e
      
      umask 0077
      
      /usr/bin/gitlab-rake gitlab:backup:create CRON=1
      
      NOW=$(date +"%Y%m%dT%H%M")
      SNAPSHOT="/srv/gitlab-backup/config_backup-$NOW.tar.gz"
      tar -C /var/opt/gitlab -czf "$SNAPSHOT" gitlab-rails/etc/
      
      find /srv/gitlab-backup/config_backup* -mtime +1 -delete;
      | EOF
  }

anarcat avatar Jan 11 '21 16:01 anarcat