All Projects → sund → Auto Gitlab Backup

sund / Auto Gitlab Backup

Licence: gpl-2.0
A simple script to backup your Gitlab data. This script will copy the backup archives of your gitlab installation via rsync, or scp. Also, you can copy backups to Backblaze’s B2 Cloud Storage service.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Auto Gitlab Backup

sicksync
Don’t accept the available as the preferable. Go the extra mile with extra speed.
Stars: ✭ 67 (-76.98%)
Mutual labels:  backup, rsync
BaNG
Backup Next Generation for Linux & Mac using rsync (support hardlinks and btrfs snapshots), Web-Frontend, Statistics, History-Merger)
Stars: ✭ 28 (-90.38%)
Mutual labels:  backup, rsync
planb
PlanB - automating remote backups and snapshots with zfs/rsync
Stars: ✭ 24 (-91.75%)
Mutual labels:  backup, rsync
Rsnapshot
a tool for backing up your data using rsync (if you want to get help, use https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss)
Stars: ✭ 2,335 (+702.41%)
Mutual labels:  backup, rsync
cephgeorep
An efficient unidirectional remote backup daemon for CephFS.
Stars: ✭ 27 (-90.72%)
Mutual labels:  backup, rsync
Rsync Time Backup
Time Machine style backup with rsync.
Stars: ✭ 2,572 (+783.85%)
Mutual labels:  backup, rsync
adlibre-backup
High performance rsync backup utilising BTRFS / ZFS filesystem features
Stars: ✭ 35 (-87.97%)
Mutual labels:  backup, rsync
Hactar
📃 An incremential daily backup script using rsync
Stars: ✭ 34 (-88.32%)
Mutual labels:  backup, rsync
irsync
rsync on interval, via command line binary or docker container. Server and IOT builds for pull or push based device content management.
Stars: ✭ 19 (-93.47%)
Mutual labels:  backup, rsync
rbackup
Shell script for encrypted backups with rsync and GnuPG
Stars: ✭ 22 (-92.44%)
Mutual labels:  backup, rsync
System Tar And Restore
Backup and Restore your system using tar or Transfer it with rsync
Stars: ✭ 170 (-41.58%)
Mutual labels:  backup, rsync
Raspibackup
Backup and restore your running Raspberry
Stars: ✭ 268 (-7.9%)
Mutual labels:  backup, rsync
Rsync Incremental Backup
Configurable bash script to send incremental backups of your data to a local or remote target
Stars: ✭ 150 (-48.45%)
Mutual labels:  backup, rsync
Elkarbackup
Open source backup solution for your network
Stars: ✭ 247 (-15.12%)
Mutual labels:  backup, rsync
Backintime
Back In Time - A simple backup tool for Linux
Stars: ✭ 1,066 (+266.32%)
Mutual labels:  backup, rsync
time-travel
An rsync based backup script which only transfers modified files. Smooth integration into OSX Notification Center.
Stars: ✭ 43 (-85.22%)
Mutual labels:  backup, rsync
Rdiff Backup
Reverse differential backup tool, over a network or locally.
Stars: ✭ 510 (+75.26%)
Mutual labels:  backup, rsync
Rsyncosx
A macOS GUI for rsync
Stars: ✭ 780 (+168.04%)
Mutual labels:  backup, rsync
btrfs-backup
A simple, flexible script for versioned backups using btrfs and rsync
Stars: ✭ 59 (-79.73%)
Mutual labels:  backup, rsync
netbackup
A frontend for various backup programs (rsync, rdiff-backup, rclone) that simplifies local and remote backups.
Stars: ✭ 15 (-94.85%)
Mutual labels:  backup, rsync

Auto GitLab Backup

AGB Logo


Synopsis

A simple script to backup your Gitlab data. This script will copy the backup archives of your gitlab installation via rsync, or scp. Also, you can copy backups to Backblaze’s B2 Cloud Storage service. There is also a restore script available (see below.)

It can backup and copy the gitlab.rb config file, if configured.

This script is now more omnibus-gitlab centric. Compare your config file with the template! Usage with a source install is possible but not expressly shown here.

Installation

Prerequisites

Deploy a working GitLab Omnibus installation and verify you can back it up with the rake task as documented in the GitLab Documents.

For Backblaze usage, configure your system for the Backblaze Command-Line Tool Also, see the wiki page on B2.

Set up gitlab to expire backups

Change /etc/gitlab/gitlab.rb to expire backups

# backup keep time
gitlab_rails['backup_keep_time'] = 604800

Installation

Clone to your directory of choice. I usually use /usr/local/sbin

git clone [email protected]:sund/auto-gitlab-backup.git

Updates

Compare the auto-gitlab-backup.conf.sample file with your own copy. Make changes as needed to ensure no errors are encountered.

Configure

cp auto-gitlab-backup.conf.sample auto-gitlab-backup.conf

edit auto-gitlab-backup.conf

## user account on remote server
#  likely 'git' user
remoteUser=""

## remote host
#  a backup gitlab server?
remoteServer=""

## path to an alternate ssh key, if needed.
sshKeyPath=""

## $remoteServer path for gitlab backups
remoteDest="/var/opt/gitlab/backups"

## backup gitlab configs
# change to 1 to enable
backupConfigs=“0”

## rake quietly
# change to 1 to enable quiet rake job
quietRake=0

## enable backblaze b2 sync
# change to 1 to enable
# and set bucket name
# and change b2keepDays if other than 5 days is desired
b2blaze=0
b2Bucketname=“”
b2keepDays=“5”

## set $localConfDir
# blank disables conf backups
# you can create /var/opt/gitlab/backups/configBackups --
# gitlab doesn't seem to complain with a subfolder
# in there. Plus it will rsync up with the backup.
# So you won't need to enable a separate rsync run
localConfDir="/var/opt/gitlab/backups/configBackups"

## set $remoteServer path for gitlab configs
# blank disables remote copy
# unless $localConfDir is outside /var/opt/gitlab/backups/configBackups
# you can leave this blank
remoteConfDest=""

## ssh port or 873 for rsyncd port
remotePort=22

## git user home.
#  Only change the below setting if you have git's home in a different location
gitHome="/var/opt/gitlab"

## only set below if rvm is in use and you need to source the rvm env file
# echo $(rvm env --path)
RVM_envPath=""

## only use the below settings if your destination is using rsync in daemon mode
remoteModule=""
rsync_password_file=""

## only change if configs are in different locations. (unlikely)
localConfig="/etc/gitlab"
localsshkeys="/var/opt/gitlab/.ssh"

## Check remote quota
#  change to true or 1 to enable
checkQuota="0"

cron settings

Example for crontab to run at 5:05am everyday.

5 5 * * * /usr/local/sbin/auto-gitlab-backup/auto-gitlab-backup.sh

Restore

Still under development but useful

run ./restoreGitLab.sh -r and it will attempt to restore a backup. You may have to run some rake commands manually.

Help

See the Wiki for more detailed instructions or submit a Issue.

Contribute

See Contribution Guide to improve this script.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].