Class: Backup::Storage::RSync
- Includes:
- CLI::Helpers
- Defined in:
- lib/backup/storage/rsync.rb
Constant Summary
Constants included from CLI::Helpers
Instance Attribute Summary collapse
-
#ip ⇒ Object
Server IP Address and SSH port.
-
#local ⇒ Object
Flag to use local backups.
-
#password ⇒ Object
Server credentials.
-
#path ⇒ Object
Path to store backups to.
-
#port ⇒ Object
Server IP Address and SSH port.
-
#username ⇒ Object
Server credentials.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(model, storage_id = nil, &block) ⇒ RSync
constructor
Creates a new instance of the storage object.
Methods included from CLI::Helpers
#command_name, #raise_if_command_failed!, #run, #utility
Methods inherited from Base
Methods included from Configuration::Helpers
#clear_defaults!, #load_defaults!
Constructor Details
#initialize(model, storage_id = nil, &block) ⇒ RSync
Creates a new instance of the storage object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/backup/storage/rsync.rb', line 30 def initialize(model, storage_id = nil, &block) super(model, storage_id) @port ||= 22 @path ||= 'backups' @local ||= false instance_eval(&block) if block_given? @path = path.sub(/^\~\//, '') end |
Instance Attribute Details
#ip ⇒ Object
Server IP Address and SSH port
18 19 20 |
# File 'lib/backup/storage/rsync.rb', line 18 def ip @ip end |
#local ⇒ Object
Flag to use local backups
26 27 28 |
# File 'lib/backup/storage/rsync.rb', line 26 def local @local end |
#password ⇒ Object
Server credentials
14 15 16 |
# File 'lib/backup/storage/rsync.rb', line 14 def password @password end |
#path ⇒ Object
Path to store backups to
22 23 24 |
# File 'lib/backup/storage/rsync.rb', line 22 def path @path end |
#port ⇒ Object
Server IP Address and SSH port
18 19 20 |
# File 'lib/backup/storage/rsync.rb', line 18 def port @port end |
#username ⇒ Object
Server credentials
14 15 16 |
# File 'lib/backup/storage/rsync.rb', line 14 def username @username end |