Class: Backup::Storage::SFTP
Instance Attribute Summary collapse
-
#ip ⇒ Object
Server IP Address and SFTP port.
-
#password ⇒ Object
Server credentials.
-
#path ⇒ Object
Path to store backups to.
-
#port ⇒ Object
Server IP Address and SFTP port.
-
#username ⇒ Object
Server credentials.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(model, storage_id = nil, &block) ⇒ SFTP
constructor
Creates a new instance of the storage object.
Methods inherited from Base
Methods included from Configuration::Helpers
#clear_defaults!, #load_defaults!
Constructor Details
#initialize(model, storage_id = nil, &block) ⇒ SFTP
Creates a new instance of the storage object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/backup/storage/sftp.rb', line 26 def initialize(model, storage_id = nil, &block) super(model, storage_id) @port ||= 22 @path ||= 'backups' instance_eval(&block) if block_given? @path = path.sub(/^\~\//, '') end |
Instance Attribute Details
#ip ⇒ Object
Server IP Address and SFTP port
18 19 20 |
# File 'lib/backup/storage/sftp.rb', line 18 def ip @ip end |
#password ⇒ Object
Server credentials
14 15 16 |
# File 'lib/backup/storage/sftp.rb', line 14 def password @password end |
#path ⇒ Object
Path to store backups to
22 23 24 |
# File 'lib/backup/storage/sftp.rb', line 22 def path @path end |
#port ⇒ Object
Server IP Address and SFTP port
18 19 20 |
# File 'lib/backup/storage/sftp.rb', line 18 def port @port end |
#username ⇒ Object
Server credentials
14 15 16 |
# File 'lib/backup/storage/sftp.rb', line 14 def username @username end |