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.
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/backup/storage/cloud_files.rb', line 73 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
11 12 13 |
# File 'lib/backup/storage/cloud_files.rb', line 11 def api_key @api_key end |
#auth_url ⇒ Object
Rackspace Auth URL (optional)
15 16 17 |
# File 'lib/backup/storage/cloud_files.rb', line 15 def auth_url @auth_url end |
#container ⇒ Object
Rackspace Container Name
28 29 30 |
# File 'lib/backup/storage/cloud_files.rb', line 28 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.
54 55 56 |
# File 'lib/backup/storage/cloud_files.rb', line 54 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))
71 72 73 |
# File 'lib/backup/storage/cloud_files.rb', line 71 def end |
#max_retries ⇒ Object
Number of times to retry failed operations.
Default: 10
60 61 62 |
# File 'lib/backup/storage/cloud_files.rb', line 60 def max_retries @max_retries end |
#region ⇒ Object
Rackspace Region (optional)
24 25 26 |
# File 'lib/backup/storage/cloud_files.rb', line 24 def region @region end |
#retry_waitsec ⇒ Object
Time in seconds to pause before each retry.
Default: 30
66 67 68 |
# File 'lib/backup/storage/cloud_files.rb', line 66 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)
46 47 48 |
# File 'lib/backup/storage/cloud_files.rb', line 46 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.
33 34 35 |
# File 'lib/backup/storage/cloud_files.rb', line 33 def segments_container @segments_container end |
#servicenet ⇒ Object
Rackspace Service Net (LAN-based transfers to avoid charges and improve performance)
20 21 22 |
# File 'lib/backup/storage/cloud_files.rb', line 20 def servicenet @servicenet end |
#username ⇒ Object
Rackspace CloudFiles Credentials
11 12 13 |
# File 'lib/backup/storage/cloud_files.rb', line 11 def username @username end |