Class: Restic::Service::Targets::ResticB2
- Includes:
- B2
- Defined in:
- lib/restic/service/targets/restic_b2.rb
Overview
A target that backs up to a SFTP target using Restic
See README.md for the YAML configuration file format
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
Class Method Summary collapse
Instance Method Summary collapse
Methods included from B2
#available?, #initialize, #setup_from_conf
Methods inherited from Restic
#initialize, #one_filesystem?, #parse_forget_setup, #run_backup, #run_forget, #run_restic, #setup_from_conf
Methods inherited from Base
Class Method Details
.normalize_yaml(yaml) ⇒ Object
10 11 12 13 |
# File 'lib/restic/service/targets/restic_b2.rb', line 10 def self.normalize_yaml(yaml) yaml = B2.normalize_yaml(yaml) super(yaml) end |
Instance Method Details
#forget ⇒ Object
20 21 22 23 |
# File 'lib/restic/service/targets/restic_b2.rb', line 20 def forget run_forget(Hash['B2_ACCOUNT_ID' => @id, 'B2_ACCOUNT_KEY' => @key], '-r', "b2:#{@bucket}:#{@path}", 'forget') end |
#run ⇒ Object
15 16 17 18 |
# File 'lib/restic/service/targets/restic_b2.rb', line 15 def run run_backup(Hash['B2_ACCOUNT_ID' => @id, 'B2_ACCOUNT_KEY' => @key], '-r', "b2:#{@bucket}:#{@path}", 'backup') end |