Forge Home

ghebackups

Github Enterprise Backups Controlled Using Puppet

15,295 downloads

6,507 latest version

4.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.5.2 (latest)
  • 0.5.1
  • 0.5.0
released May 18th 2017
This version is compatible with:
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'tedivm-ghebackups', '0.5.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add tedivm-ghebackups
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install tedivm-ghebackups --version 0.5.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

tedivm/ghebackups — version 0.5.2 May 18th 2017

ghebackups

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations
  7. Development

Overview

This module installs and configures the Github Enterprise Backup Utilities.

Module Description

The fine folks at Github have a set of tools for backing up Github Enterprise installations. This tool is available in a git repository.

This module installs this tools and keeps it up to date. It creates the needed configuration files as well as the cronjobs that run the backups. It also provides sane default configurations to make backups more reliable.

Setup

What ghebackups affects

  • A git repository will be installed and kept up to date.
  • Cronjobs to run the backups will be added to the system.

Setup Requirements

  • This module requires that rsync be installed to properly run.
  • The backup user's SSH key needs to be installed on the GHE instance to run.

Beginning with ghebackups

This module is rather simple to use- simply include the 'ghebackups' file and the default settings should work (assuming your local GHE instance is named 'github' and dns is working).

class { 'ghebackups': }

A more complete example including custom hostname would look like this.

class { 'ghebackups':
  ghe_hostname      => 'github.example.net',
  ghe_data_dir      => '/backups/github',
  ghe_num_snapshots => 72,
}

Reference

####install_location Defines the location to install the ghe-backup-utils repository. Defaults to '/opt/ghe-backup-utils'

####log_location Defines the directory to place log files in. Defaults to '/opt/ghe-backup-utils'.

####log_backup Defines the name of the backup log file. Defaults to 'backup.log'

####log_restore Defines the name of the restore log file. Defaults to 'restore.log'

####restore If true backups will be synced to a standby host (ghe_restore_host). Defaults to false.

####user The user that the script will run as. Must have write access to ghe_data_dir. Defaults to root.

####cron_hour Defines the time to run backups. This takes the cron format. Defaults to '*', which means it runs hourly.

####ghe_hostname Defines the host to backup. Defaults to 'github'.

####ghe_data_dir Defines the location to store backups. Defaults to the "data" directory in the install_location.

####ghe_create_data_dir Defines whether to create the data directory or not if it doesn't exist. This should be disabled when saving to NAS or ISCSI drives, otherwise the mount point could be overwritten while the drive is unavailable. Defaults to yes.

####ghe_num_snapshots Defines the number of snapshots to keep. Defaults to 48.

####ghe_restore_host Defines the host to restore to. Defaults to null.

####ghe_extra_ssh_opts Defines any custom ssh settings, such as disabling host key checks. Defaults to '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'

####ghe_backup_utils_repo Defines the location of the backup-utils repository. Defaults to https://github.com/github/backup-utils.git.

####revision Defines the branch name or a commit SHA or tag of the backup-utils repo. Defaults to master.

Development

Contributions are always welcome! Please visit this module's home on Github.