Class: EasyBackup::Resources::SFTPHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_backup/resources/sftp.rb

Instance Method Summary collapse

Instance Method Details

#on_close(uploader, file) ⇒ Object



49
50
51
# File 'lib/easy_backup/resources/sftp.rb', line 49

def on_close(uploader, file)
  EasyBackup.configuration.logger.debug "[EasyBackup] finished with #{file.remote}"
end

#on_finish(uploader) ⇒ Object



57
58
59
# File 'lib/easy_backup/resources/sftp.rb', line 57

def on_finish(uploader)
  EasyBackup.configuration.logger.debug "[EasyBackup] all done!"
end

#on_mkdir(uploader, path) ⇒ Object



53
54
55
# File 'lib/easy_backup/resources/sftp.rb', line 53

def on_mkdir(uploader, path)
  EasyBackup.configuration.logger.debug "[EasyBackup] creating directory #{path}"
end

#on_open(uploader, file) ⇒ Object



41
42
43
# File 'lib/easy_backup/resources/sftp.rb', line 41

def on_open(uploader, file)
  EasyBackup.configuration.logger.debug "[EasyBackup] starting upload: #{file.local} -> #{file.remote} (#{file.size} bytes)"
end

#on_put(uploader, file, offset, data) ⇒ Object



45
46
47
# File 'lib/easy_backup/resources/sftp.rb', line 45

def on_put(uploader, file, offset, data)
  EasyBackup.configuration.logger.debug "[EasyBackup] #{data.length} bytes to #{file.remote} starting at #{offset}"
end