class Object
Public Instance Methods
build_storage_local(local, options)
click to toggle source
helpers
# File lib/optimacms_backups/backup/init.rb, line 40 def build_storage_local(local, options) b = options local.path = "#{b['path']}" local.keep = 30 # local.keep = Time.now - 2592000 # Remove all backups older than 1 month. end
build_storage_s3(s3, opts)
click to toggle source
# File lib/optimacms_backups/backup/init.rb, line 66 def build_storage_s3(s3, opts) b = opts s3_config = $backup_config['s3'] s3.access_key_id = b['access_key_id'] || s3_config['access_key_id'] s3.secret_access_key = b['secret_access_key'] || s3_config['secret_access_key'] s3.region = b['region'] || s3_config['region'] s3.bucket = b['bucket'] || s3_config['bucket'] s3.path = b['path'] || s3_config['path'] end
build_storage_scp(server, opts)
click to toggle source
# File lib/optimacms_backups/backup/init.rb, line 48 def build_storage_scp(server, opts) b = opts server.username = b['username'] server.password = b['password'] server.ip = b['ip'] server.port = b['port'] server.path = b['path'] # Use a number or a Time object to specify how many backups to keep. server.keep = 30 # Additional options for the SSH connection. # server.ssh_options = {} end
init()
click to toggle source
# File lib/optimacms_backups/backup/config.rb, line 11 require_relative 'init'