| 
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982 | # File 'lib/bitferry.rb', line 964
def restore(hash)
  task = hash.fetch(:task)
  begin
    modified = hash.fetch(:modified)
  rescue
    modified = nil
    log.warn("modified key missing - flagging task #{task} out of date")
  end
  initialize(
    restore_endpoint(hash.fetch(:source)),
    restore_endpoint(hash.fetch(:destination)),
    tag: task,
    modified: modified,
    process: hash[:rclone],
    encryption: hash[:encryption].nil? ? nil : Rclone::Encryption.restore(hash[:encryption])
  )
  super(hash)
  touch if modified.nil?
end
 |