Class: Backup::Storage::FTP

Inherits:
Base
  • Object
show all
Includes:
Cycler
Defined in:
lib/backup/storage/ftp.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#keep, #model, #package, #path, #storage_id

Instance Method Summary collapse

Methods inherited from Base

#perform!

Methods included from Config::Helpers

included

Constructor Details

#initialize(model, storage_id = nil) ⇒ FTP



21
22
23
24
25
26
27
28
# File 'lib/backup/storage/ftp.rb', line 21

def initialize(model, storage_id = nil)
  super

  @port         ||= 21
  @path         ||= 'backups'
  @passive_mode ||= false
  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

#ipObject

Server IP Address and FTP port



15
16
17
# File 'lib/backup/storage/ftp.rb', line 15

def ip
  @ip
end

#passive_modeObject

use passive mode?



19
20
21
# File 'lib/backup/storage/ftp.rb', line 19

def passive_mode
  @passive_mode
end

#passwordObject

Server credentials



11
12
13
# File 'lib/backup/storage/ftp.rb', line 11

def password
  @password
end

#portObject

Server IP Address and FTP port



15
16
17
# File 'lib/backup/storage/ftp.rb', line 15

def port
  @port
end

#usernameObject

Server credentials



11
12
13
# File 'lib/backup/storage/ftp.rb', line 11

def username
  @username
end