Forge Home

vios_backup

Schedule IBM Virtual I/O Server Backups

4,921 downloads

4,921 latest version

5.0 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.1.0 (latest)
released Dec 11th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'arden-vios_backup', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add arden-vios_backup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install arden-vios_backup --version 0.1.0

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

arden/vios_backup — version 0.1.0 Dec 11th 2018

vios_backup

Build Status Puppet Forge

Table of Contents

  1. Description
  2. Setup - The basics of getting started with vios_backup
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

This module configures a machine to remotely backup, retrieve, and then retain virtual and logical configuration backups from IBM Virtual I/O Servers (VIOS) in a PowerVM environment.

These are config-only backups performed using the viosbr command. Note that there may be cases which necessitate backupios - this module does not support those forms of backups.

Setup

What vios_backup affects

This module changes the following components

  • Script Creation - A backup script will be created in /usr/local/bin which will be used to execute the backup
  • User Creation - The specified user is created with the provided SSH private and public keys
  • Cron Job - One job will be scheduled to execute the overall backup process
  • Backup Directory - The target directory will be created

During the backup, an entry will be posted to the user syslog facility with either an info level for a success message or a err message for any kind of failure. Each entry will be tagged vios_backup.

Setup Requirements

Backup User & Group

It is assumed that the specified backup user and group are created on the target machine prior to the application of this module.

SSH Public Key Deployment

The public key provided during the configuration of this module must be added to the authorized keys file for each VIOS backed up by this instance.

  1. Transfer a copy of your public key to the target server

    VIOS="power1-vio0.example.org"
    PUBLIC_KEY="${HOME}/.ssh/id_rsa.pub"
    scp "${PUBLIC_KEY}" "padmin@${VIOS}:/tmp/"
    
  2. Log on to the VIOS and exit the restricted shell.

    ssh "padmin@${VIOS}"
    oem_setup_env
    
  3. Append the contents of your key to padmin's authorized_keys file.

    KEY_FILE="/tmp/id_rsa.pub"
    cat "${KEY_FILE}" >> /home/padmin/.ssh/authorized_keys
    

Required Applications

Nothing crazy:

  • /bin/logger - needed to append messages to the syslog
  • /bin/sh - the backup script is written targeting the borne shell
  • /bin/ssh - we need ssh to communicate with the VIOS

Beginning with vios_backup

Once the setup requirements are met, simply declare the class with all required parameters and you're good to go.

Usage

At the moment, all parameters are mandatory. Here's a standard example:

class { 'vios_backup':
  user           => 'padmin',
  group          => 'backup',
  base_directory => '/srv/backup/vios',
  days_retention => 90,
  target_vios    => [ 'host1-vio0.example.com', 'host1-vio1.example.com' ],
  cron_job       => {
    hour         => '1',
    minute       => '45',
    weekday      => '0',
  }
}

In the example above, two vio servers are backed up each week on Sunday at 1:45. After about two weeks of execution the directory may look similar to the following:

/srv/backup/vios
|-- host1-vio0.example.com
|   |-- 2018-12-02_0145.06.tar.gz
|   `-- 2018-12-09_0145.02.tar.gz
`-- host1-vio1.example.com
    |-- 2018-12-02_0145.26.tar.gz
    `-- 2018-12-09_0145.36.tar.gz

Reference

Limitations

  • This has only been tested with VIOS 2.2.6.x - Assuming the viosbr command exists and works, this should work on all subsequent VIOS versions.

Development

Submit a pull request.

Contributors

Check out the contributor list