class Restic::Service::Targets::ResticFile

Public Class Methods

normalize_yaml(yaml) click to toggle source
# File lib/restic/service/targets/restic_file.rb, line 9
def self.normalize_yaml(yaml)
    if !yaml['dest']
        raise ArgumentError, "'dest' field not set in rest-file target"
    end
    super
end

Public Instance Methods

available?() click to toggle source
# File lib/restic/service/targets/restic_file.rb, line 5
def available?
    @dest.directory?
end
run() click to toggle source
Calls superclass method
# File lib/restic/service/targets/restic_file.rb, line 21
def run
    super('-r', @dest.to_path, 'backup')
end
setup_from_conf(conf, target_yaml) click to toggle source
# File lib/restic/service/targets/restic_file.rb, line 16
def setup_from_conf(conf, target_yaml)
    super
    @dest = Pathname.new(target_yaml['dest'])
end