lib/backup/connection/ssh.rb in backup-0.1.0 vs lib/backup/connection/ssh.rb in backup-0.2.0
- old
+ new
@@ -4,10 +4,13 @@
def initialize(options = {})
super(options)
end
- def store
+ # Initializes the transfer to the specified server using SSH.
+ # This will first ensure there is a directory, if there is not, a new one will be created
+ # After the directory has been confirmed, the transfer process will be initialized.
+ def transfer
%x{ ssh #{options[:ssh][:user]}@#{options[:ssh][:ip]} mkdir -p #{options[:ssh][:path]} }
%x{ scp #{File.join(options[:backup_path], options[:backup_file])} #{options[:ssh][:user]}@#{options[:ssh][:ip]}:#{options[:ssh][:path]} }
end
end
\ No newline at end of file