Class: Crashbreak::DatabaseRestorer
- Inherits:
-
Object
- Object
- Crashbreak::DatabaseRestorer
- Includes:
- AWS
- Defined in:
- lib/crashbreak/restorers/database_restorer.rb
Instance Method Summary collapse
-
#initialize(dump_data) ⇒ DatabaseRestorer
constructor
A new instance of DatabaseRestorer.
- #restore ⇒ Object
Methods included from AWS
#aws_key_id, #aws_region, #aws_resource_bucket, #aws_secret_key, #bucket_name, #client, #prepare_aws
Constructor Details
#initialize(dump_data) ⇒ DatabaseRestorer
Returns a new instance of DatabaseRestorer.
7 8 9 10 |
# File 'lib/crashbreak/restorers/database_restorer.rb', line 7 def initialize(dump_data) @error_id = dump_data['error_id'] @file_name = dump_data['file_name'] end |
Instance Method Details
#restore ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/crashbreak/restorers/database_restorer.rb', line 12 def restore system(drop_test_database_command) system(create_test_database_command) prepare_aws make_directories download_dump unless dump_already_downloaded restore_database setup_connection_to_restored_database end |