Class: Backup::Storage::CloudFiles
- Defined in:
- lib/backup/storage/cloudfiles.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Rackspace Cloud Files Credentials.
-
#container ⇒ Object
Rackspace Cloud Files container name and path.
-
#path ⇒ Object
Rackspace Cloud Files container name and path.
-
#username ⇒ Object
Rackspace Cloud Files Credentials.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(&block) ⇒ CloudFiles
constructor
Creates a new instance of the Rackspace Cloud Files storage object First it sets the defaults (if any exist) and then evaluates the configuration block which may overwrite these defaults.
-
#perform! ⇒ Object
Performs the backup transfer.
-
#provider ⇒ Object
This is the provider that Fog uses for the Cloud Files Storage.
-
#remote_path ⇒ Object
This is the remote path to where the backup files will be stored.
Methods inherited from Base
#cycle!, #local_file, #local_path, #remote_file
Methods included from Configuration::Helpers
#clear_defaults!, #getter_methods, #load_defaults!, #setter_methods
Constructor Details
#initialize(&block) ⇒ CloudFiles
Creates a new instance of the Rackspace Cloud Files storage object First it sets the defaults (if any exist) and then evaluates the configuration block which may overwrite these defaults
23 24 25 26 27 28 29 30 31 |
# File 'lib/backup/storage/cloudfiles.rb', line 23 def initialize(&block) load_defaults! @path ||= 'backups' instance_eval(&block) if block_given? @time = TIME end |
Instance Attribute Details
#api_key ⇒ Object
Rackspace Cloud Files Credentials
13 14 15 |
# File 'lib/backup/storage/cloudfiles.rb', line 13 def api_key @api_key end |
#container ⇒ Object
Rackspace Cloud Files container name and path
17 18 19 |
# File 'lib/backup/storage/cloudfiles.rb', line 17 def container @container end |
#path ⇒ Object
Rackspace Cloud Files container name and path
17 18 19 |
# File 'lib/backup/storage/cloudfiles.rb', line 17 def path @path end |
#username ⇒ Object
Rackspace Cloud Files Credentials
13 14 15 |
# File 'lib/backup/storage/cloudfiles.rb', line 13 def username @username end |
Instance Method Details
#perform! ⇒ Object
Performs the backup transfer
47 48 49 50 |
# File 'lib/backup/storage/cloudfiles.rb', line 47 def perform! transfer! cycle! end |
#provider ⇒ Object
This is the provider that Fog uses for the Cloud Files Storage
41 42 43 |
# File 'lib/backup/storage/cloudfiles.rb', line 41 def provider 'Rackspace' end |
#remote_path ⇒ Object
This is the remote path to where the backup files will be stored
35 36 37 |
# File 'lib/backup/storage/cloudfiles.rb', line 35 def remote_path File.join(path, TRIGGER) end |