Provide LWRP to install and use Backup gem
ubuntu
- backup has only been tested on ubuntu
Install backup via (omnibus-backup)[https://github.com/JonathanTron/omnibus-backup]
package. omnibus-backup
installs a self-contained Backup gem with all the
required dependencies: ruby 1.9.3-p448
, gnupg2
, openssl
, etc.
The package installs everything to /opt/omnibus-backup
.
Actions:
install
- installs omnibus-backup packageremove
- remove omnibus-backup package
Attributes parameters:
url
- String - specify URL of omnibus-backup package to install - default tohttps://github.com/JonathanTron/omnibus-backup/releases/download/4.4.0/omnibus-backup_4.4.0-1.amd64.deb
checksum
- String - SHA256 checksum for omnibus-backup package - default to3334aae0d1926244d1ef01155fd6dcfcbc0ffb68444d1a3761bb7341d7907eec
Generate/Install backup config file.
Actions:
install
- generate a backup model fileremove
- remove the cron task and file corresponding to the backup model
Attributes parameters:
base_dir
- String - path to base directory for backup models - default to/opt/backup
logging_console_quiet
- Boolean - configureconsole_quiet
option - default tofalse
logging_logfile_enabled
- Boolean - configurelogfile.enabled
option - default totrue
logging_logfile_log_path
- String - configurelogfile.logpath
option - default tolog
logging_logfile_max_bytes
- Integer - configurelogfile.max_bytes
option - default to500_000
logging_syslog_enabled
- Boolean - configuresyslog.enabled
option - default tofalse
logging_syslog_ident
- String - configuresyslog.ident
option - default tobackup
logging_syslog_options
- String - configuresyslog.options
option - default toSyslog::LOG_PID
logging_syslog_facility
- String - configuresyslog.facility
option - default toSyslog::LOG_LOCAL0
logging_syslog_info
- String - configuresyslog.info
option - default toSyslog::LOG_INFO
logging_syslog_warn
- String - configuresyslog.warn
option - default toSyslog::LOG_WARNING
logging_syslog_error
- String - configuresyslog.error
option - default toSyslog::LOG_ERR
utilities
- Hash - configureBackup::Utilities
option - default to{gpg: "/opt/omnibus-backup/embedded/bin/gpg2", openssl: "/opt/omnibus-backup/embedded/bin/openssl"}
encryptor_defaults
- Hash - configure encryptor defaults (eg:{"OpenSSL": {}}
). see Backup Encryptors wiki for more information. - default to{}
storage_defaults
- Hash - configure storage defaults (eg:{"S3": {}}
). see Backup Storages wiki for more information. - default to{}
notifier_defaults
- Hash - configure notifier defaults (eg:{"Mail": {}}
). see Backup Notifiers wiki for more information. - default to{}
Generate/Install a backup model.
Actions:
install
- generate a backup model fileenable
- activate a cron task to run the backup modeldisable
- remove the cron task corresponding to the backup modelremove
- remove the cron task and file corresponding to the backup model
Attributes parameters:
name
- String - name to use in backup model - default to resource namedescription
- String - description to use in backup model - default tonil
hour
- String - cron task hour's parameter - default to "1"minute
- String - cron task minute's parameter - default to "*"day
- String - cron task day's parameter - default to "*"month
- String - cron task month's parameter - default to "*"weekday
- String - cron task weekday's parameter - default to "*"mailto
- String - cron task mailto's parameter - default to nilsplit_into_chunks_of
- Integer - specify value forsplit_into_chunks_of
inMB
set to nil to disable or anInteger
(eg:250
) to enable - default tonil
archives
- Hash - hash of archives sections to generate, (eg:{"etc_files" => {use_sudo: true, add: ["/etc"], exclude: ["/etc/passwd"]}}
) see Backup Archives wiki for more information - default to{}
databases
- Array - list of databases sections to generate (eg:[{kind: "PostgreSQL", options: {name: "my_db", host: "localhost", skip_tables: ["demo"], additional_options: ["-x"]}}]
) see Backup Databases wiki for more information - default to[]
compress_with
- Hash - configure compressor to use, set to nil to disable it (eg:{kind: "Bzip2", options: {level: 9}}
). See Backup Compressors wiki for more information. - default to{kind: "Gzip"}
encrypt_with
- Hash - configure encryptor to use, set to nil to disable it (eg:{kind: "OpenSSL", options: {password: "xxxXXX", base64: true, salt: true}}
). See Backup Encryptors wiki for more information. - default tonil
store_with
- Array - List of storage sections to generate (eg:[{kind: "S3", options: {access_key_id: "my_key", "secret_access_key": "secret_key", region: "us-east-1", bucket: "my_bucket", keep: 30}}]
). See Backup Storages wiki for more information. - default to[]
notify_by
- Array - List of notification section to generate (eg:[{kind: "Mail", options: {"on_success": false, from: "me@example.com", to: "me@example.com"}}]
). See Backup Notifiers wiki for more information. - default to[]
Author:: Jonathan Tron (jonathan@openhood.com)
Copyright 2013, Openhood S.E.N.C.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.