Class: Martilla::Scp
- Defined in:
- lib/martilla/storages/scp.rb
Instance Attribute Summary
Attributes inherited from Storage
Instance Method Summary collapse
Methods inherited from Storage
#append_datetime_suffix, #config_error, create, #enforce_retention!, #initialize, #invalid_options_msg, #options_filename, #output_filename, #retention_limit, #suffix?, #timestamp_regex
Methods inherited from Component
Constructor Details
This class inherits a constructor from Martilla::Storage
Instance Method Details
#enfore_retention!(gzip:) ⇒ Object
9 10 11 |
# File 'lib/martilla/storages/scp.rb', line 9 def enfore_retention!(gzip:) puts 'WARNING: Retention is not implemented for SCP storage. More details: https://github.com/fdoxyz/martilla/issues/12' end |
#persist(tmp_file:, gzip:) ⇒ Object
3 4 5 6 7 |
# File 'lib/martilla/storages/scp.rb', line 3 def persist(tmp_file:, gzip:) `scp -i #{identity_file} #{user}@#{host}:#{output_filename(gzip)}` return nil if $?.success? raise Error.new("SCP storage failed with code #{$?.exitstatus}") end |