Class: Backup::Storage::CloudFiles
- Includes:
- Cycler
- Defined in:
- lib/backup/storage/cloud_files.rb
Defined Under Namespace
Classes: Error
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Rackspace CloudFiles Credentials.
-
#auth_url ⇒ Object
Rackspace Auth URL (optional).
-
#container ⇒ Object
Rackspace Container Name.
-
#days_to_keep ⇒ Object
If set, all backup package files (including SLO segments) will be scheduled for automatic removal by the server.
-
#fog_options ⇒ Object
Additional options to pass along to fog.
-
#max_retries ⇒ Object
Number of times to retry failed operations.
-
#region ⇒ Object
Rackspace Region (optional).
-
#retry_waitsec ⇒ Object
Time in seconds to pause before each retry.
-
#segment_size ⇒ Object
SLO Segment size, specified in MiB.
-
#segments_container ⇒ Object
Rackspace Container Name for SLO Segments Required if #segment_size is set.
-
#servicenet ⇒ Object
Rackspace Service Net (LAN-based transfers to avoid charges and improve performance).
-
#username ⇒ Object
Rackspace CloudFiles Credentials.
Attributes inherited from Base
#keep, #model, #package, #path, #storage_id
Instance Method Summary collapse
-
#initialize(model, storage_id = nil) ⇒ CloudFiles
constructor
A new instance of CloudFiles.
Methods inherited from Base
Methods included from Config::Helpers
Constructor Details
#initialize(model, storage_id = nil) ⇒ CloudFiles
Returns a new instance of CloudFiles.
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/backup/storage/cloud_files.rb', line 74 def initialize(model, storage_id = nil) super @servicenet ||= false @segment_size ||= 0 @max_retries ||= 10 @retry_waitsec ||= 30 @path ||= 'backups' path.sub!(/^\//, '') check_configuration end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Backup::Config::Helpers
Instance Attribute Details
#api_key ⇒ Object
Rackspace CloudFiles Credentials
12 13 14 |
# File 'lib/backup/storage/cloud_files.rb', line 12 def api_key @api_key end |
#auth_url ⇒ Object
Rackspace Auth URL (optional)
16 17 18 |
# File 'lib/backup/storage/cloud_files.rb', line 16 def auth_url @auth_url end |
#container ⇒ Object
Rackspace Container Name
29 30 31 |
# File 'lib/backup/storage/cloud_files.rb', line 29 def container @container end |
#days_to_keep ⇒ Object
If set, all backup package files (including SLO segments) will be scheduled for automatic removal by the server.
The ‘keep` option should not be used if this is set, unless you’re transitioning from the ‘keep` option.
55 56 57 |
# File 'lib/backup/storage/cloud_files.rb', line 55 def days_to_keep @days_to_keep end |
#fog_options ⇒ Object
Additional options to pass along to fog. e.g. Fog::Storage.new({ :provider => ‘Rackspace’ }.merge(fog_options))
72 73 74 |
# File 'lib/backup/storage/cloud_files.rb', line 72 def @fog_options end |
#max_retries ⇒ Object
Number of times to retry failed operations.
Default: 10
61 62 63 |
# File 'lib/backup/storage/cloud_files.rb', line 61 def max_retries @max_retries end |
#region ⇒ Object
Rackspace Region (optional)
25 26 27 |
# File 'lib/backup/storage/cloud_files.rb', line 25 def region @region end |
#retry_waitsec ⇒ Object
Time in seconds to pause before each retry.
Default: 30
67 68 69 |
# File 'lib/backup/storage/cloud_files.rb', line 67 def retry_waitsec @retry_waitsec end |
#segment_size ⇒ Object
SLO Segment size, specified in MiB.
Each package file larger than segment_size
will be uploaded as a Static Large Objects (SLO).
Defaults to 0 for backward compatibility (pre v.3.7.0), since #segments_container would be required.
Minimum: 1 (0 disables SLO support) Maximum: 5120 (5 GiB)
47 48 49 |
# File 'lib/backup/storage/cloud_files.rb', line 47 def segment_size @segment_size end |
#segments_container ⇒ Object
Rackspace Container Name for SLO Segments Required if #segment_size is set. Must be different from #container.
34 35 36 |
# File 'lib/backup/storage/cloud_files.rb', line 34 def segments_container @segments_container end |
#servicenet ⇒ Object
Rackspace Service Net (LAN-based transfers to avoid charges and improve performance)
21 22 23 |
# File 'lib/backup/storage/cloud_files.rb', line 21 def servicenet @servicenet end |
#username ⇒ Object
Rackspace CloudFiles Credentials
12 13 14 |
# File 'lib/backup/storage/cloud_files.rb', line 12 def username @username end |