Class: ChefBackup::Strategy::EbsBackup

Inherits:
TarBackup
  • Object
show all
Defined in:
lib/chef_backup/strategy/backup/ebs.rb

Overview

ChefBackup::Ebs class. To be used when/if Enterprise Chef ever supports EBS natively

Constant Summary

Constants inherited from TarBackup

TarBackup::DEFAULT_STATEFUL_SERVICES

Constants included from Helpers

Helpers::DEFAULT_PG_OPTIONS, Helpers::SERVER_ADD_ONS

Instance Attribute Summary

Attributes inherited from TarBackup

#backup_time

Instance Method Summary collapse

Methods inherited from TarBackup

#ask_to_go_offline, #chpst, #config_directories, #config_only?, #create_tarball, #data_map, #dump_db, #export_dir, #export_filename, #export_tarball, #external_pg?, #initialize, #manifest, #not_implemented, #offline_permission_granted?, #pg_dump?, #pg_dumpall, #populate_data_map, #service_enabled?, #stateful_services, #write_manifest

Methods included from Helpers

#all_services, #backend?, #base_config_dir, #base_install_dir, #chpst, #cleanup, #config, #config_base, #ctl_command, #database_name, #disabled_services, #enabled_addons, #enabled_services, #ensure_file!, #frontend?, #ha?, #log, #marketplace?, #online?, #pg_options, #pgsql, #project_name, #reconfigure_add_ons, #reconfigure_marketplace, #restart_add_ons, #restart_chef_server, #running_filepath, #service_config, #service_enabled?, #shell_out, #shell_out!, #standalone?, #start_chef_server, #start_service, #stop_chef_server, #stop_service, #strategy, #tier?, #tmp_dir, #topology

Constructor Details

This class inherits a constructor from ChefBackup::Strategy::TarBackup

Instance Method Details

#backupObject

  • ebs

    • Verify AWS credentials exist

    • Create backup manifest

    • Create backup dir on ebs volume

    • Copy /etc/opscode and manifest onto ebs volume

    • Take EBS snapshot



10
11
12
13
14
15
16
17
18
# File 'lib/chef_backup/strategy/backup/ebs.rb', line 10

def backup
  ensure_tmp_dir
  verify_ebs
  dump_db if pg_dump?
  create_manifest
  copy_opscode_config
  take_ebs_snapshot
  cleanup
end

#copy_opscode_configObject



26
27
# File 'lib/chef_backup/strategy/backup/ebs.rb', line 26

def copy_opscode_config
end

#take_ebs_snapshotObject



23
24
# File 'lib/chef_backup/strategy/backup/ebs.rb', line 23

def take_ebs_snapshot
end

#verify_ebsObject



20
21
# File 'lib/chef_backup/strategy/backup/ebs.rb', line 20

def verify_ebs
end