Class: Backup::Storage::SCP
- Includes:
- Cycler
- Defined in:
- lib/backup/storage/scp.rb
Defined Under Namespace
Classes: Error
Instance Attribute Summary collapse
-
#ip ⇒ Object
Server IP Address and SCP port.
-
#password ⇒ Object
Server credentials.
-
#port ⇒ Object
Server IP Address and SCP port.
-
#ssh_options ⇒ Object
Server credentials.
-
#username ⇒ Object
Server credentials.
Attributes inherited from Base
#keep, #model, #package, #path, #storage_id
Instance Method Summary collapse
-
#initialize(model, storage_id = nil) ⇒ SCP
constructor
A new instance of SCP.
Methods inherited from Base
Methods included from Config::Helpers
Constructor Details
#initialize(model, storage_id = nil) ⇒ SCP
Returns a new instance of SCP.
18 19 20 21 22 23 24 25 |
# File 'lib/backup/storage/scp.rb', line 18 def initialize(model, storage_id = nil) super @port ||= 22 @path ||= 'backups' @ssh_options ||= {} path.sub!(/^~\//, '') end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Backup::Config::Helpers
Instance Attribute Details
#ip ⇒ Object
Server IP Address and SCP port
16 17 18 |
# File 'lib/backup/storage/scp.rb', line 16 def ip @ip end |
#password ⇒ Object
Server credentials
12 13 14 |
# File 'lib/backup/storage/scp.rb', line 12 def password @password end |
#port ⇒ Object
Server IP Address and SCP port
16 17 18 |
# File 'lib/backup/storage/scp.rb', line 16 def port @port end |
#ssh_options ⇒ Object
Server credentials
12 13 14 |
# File 'lib/backup/storage/scp.rb', line 12 def @ssh_options end |
#username ⇒ Object
Server credentials
12 13 14 |
# File 'lib/backup/storage/scp.rb', line 12 def username @username end |