Skip to content

Latest commit

 

History

History
401 lines (234 loc) · 10.7 KB

REFERENCE.md

File metadata and controls

401 lines (234 loc) · 10.7 KB

Reference

Table of Contents

Classes

Defined types

Classes

profile_backup

See: https://wiki.ncsa.illinois.edu/display/ICI/NCSA+Server+Backup

This class should never be included. Only one of the following should be included, depending on the role:

  • backup client: include profile_backup::client
  • backup server: include profile_backup::server

Examples

include profile_backup::client

profile_backup::client

Configure backup client

Examples

include profile_backup::client

Parameters

The following parameters are available in the profile_backup::client class:

enabled

Data type: Boolean

Abitilty to enable/disable backups

encryption_passphrase

Data type: String

Encryption passphrase used by the client's backups

job_cron_schedule

Data type: Hash

Cron settings for backup jobs

prune_settings

Data type: Hash

Settings used for pruning client's backup data

server_user

Data type: String

User that client connects to backup server as

servers

Data type: Array[String]

List of backup servers that client can backup to

ssh_key_priv

Data type: String

The private ssh key itself; generally a very long string...

ssh_key_pub

Data type: String

The public ssh key itself; generally a long string...

ssh_key_type

Data type: String

The encryption type used in the ssh key.

verify_cron_schedule

Data type: Hash

Cron settings for backup verification

work_directory

Data type: String

Directory path where backup scripts and jobs are located

profile_backup::common

Configure common things for both backup clients and servers.

Examples

include profile_backup::common

Parameters

The following parameters are available in the profile_backup::common class:

packages

Data type: Hash

Packages to install to support the backup service.

pip_config

Data type: String

Path to pip config file

pip_proxy

Data type: String

Optional proxy server for pip configuration

profile_backup::server

Configure backup server

Examples

include profile_backup::server

Parameters

The following parameters are available in the profile_backup::server class:

additional_sshd_match_params

Data type: Hash

Hash of additional sshd match parameters. Passed to sshd::allow_from defined type from profile_backup::server::allow_client.

allow_client_requires

Data type: Array[String]

Optional list of resources requirements (e.g. mounts) that should be present before the allow_client type is ensured. Should be in the form that would be specified as a require array, e.g.:

- "File[file1]"
- "Package[package1]"
backup_directory

Data type: String

Directory path where backups are stored for each client.

clients

Data type: Hash

Some clients will need to be manually configured for access to the servers. Backup clients that are using the same PuppetDB server as used by the backup servers should not need to be added here as those are added via 'exported resources'. This is a hash that contains all the parameters for profile_backup::server::allow_client:

profile_backup::server::clients:
  client1:
    hostname: "client1.local"
    ip: "172.1.2.3"
    ssh_key_pub: "AAAAB..."  # PUBLIC KEY
    ssh_key_type: "ssh-rsa"  # ENCRYPTION TYPE
gid

Data type: String

Group id of user that owns backup files.

groupname

Data type: String

Groupname that owns backup files.

uid

Data type: String

User id of user that owns backup files.

username

Data type: String

Username that owns backup files and allowed access.

Defined types

profile_backup::client::add_cmd_job

The profile_backup::client::add_cmd_job class.

Parameters

The following parameters are available in the profile_backup::client::add_cmd_job defined type:

backup_command

Data type: String

filename

Data type: String

prehook_commands

Data type: Optional[Array[String]]

Default value: undef

posthook_commands

Data type: Optional[Array[String]]

Default value: undef

profile_backup::client::add_job

Add a service backup job to this backup client

Examples

profile_backup::client::add_job { 'jobname':
  paths             => [ '/directory1', '/tmp/directory2.tar', ],
  prehook_commands  => [ 'tar cf /tmp/directory2.tar /directory2', ],
  posthook_commands => [ 'rm -f /tmp/directory2.tar', ],
}

Parameters

The following parameters are available in the profile_backup::client::add_job defined type:

paths

Data type: Array[String]

List of directory paths for the job to backup. Can be a list of directories and/or specific files.

prehook_commands

Data type: Optional[Array[String]]

Optional list of commands to run before backup job

Default value: undef

posthook_commands

Data type: Optional[Array[String]]

Optional list of commands to run after the backup job

Default value: undef

profile_backup::server::allow_client

Enable backup client to access backup server

Examples

profile_backup::server::allow_client { 'allow host hostname access to backup servers':
  'hostname' => String,
  'ip' => String,
  'ssh_key_pub' => String,
  'ssh_key_type' => String,
}

Parameters

The following parameters are available in the profile_backup::server::allow_client defined type:

hostname

Data type: String

fqdn hostname of backup client.

ip

Data type: String

ip of backup client.

ssh_key_pub

Data type: String

The public ssh key itself; generally a long string...

ssh_key_type

Data type: String

The encryption type used in the ssh key.