Class: Restic::Service::Targets::ResticFile
- Inherits:
-
Restic
- Object
- Base
- Restic
- Restic::Service::Targets::ResticFile
show all
- Defined in:
- lib/restic/service/targets/restic_file.rb
Constant Summary
Constants inherited
from Restic
Restic::Service::Targets::Restic::FORGET_DURATION_KEYS, Restic::Service::Targets::Restic::FORGET_KEYS
Instance Attribute Summary
Attributes inherited from Base
#name
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Restic
#initialize, #one_filesystem?, #parse_forget_setup, #run_backup, #run_forget, #run_restic
Methods inherited from Base
#initialize, #nice_commands
Class Method Details
.normalize_yaml(yaml) ⇒ Object
9
10
11
12
13
14
|
# 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
|
Instance Method Details
#available? ⇒ Boolean
5
6
7
|
# File 'lib/restic/service/targets/restic_file.rb', line 5
def available?
@dest.directory?
end
|
#run ⇒ Object
21
22
23
|
# 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) ⇒ Object
16
17
18
19
|
# 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
|