Version information
This version is compatible with:
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'tedivm-ghebackups', '0.5.2'
Learn more about managing modules with a PuppetfileDocumentation
ghebackups
Table of Contents
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.
Dependencies
- puppetlabs-stdlib (>= 1.0.0)
- puppetlabs/vcsrepo (>=1.0.0 <2.0.0)
The MIT License (MIT) Copyright (c) 2015 Robert Hafner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.