Class: Meroku::Backup
Overview
Logic related to backup of production server
Instance Attribute Summary
Attributes included from Sshable
Instance Method Summary collapse
-
#initialize ⇒ Backup
constructor
A new instance of Backup.
Methods included from Sshable
#close_ssh, #execute, #execute_script, #sshopts
Constructor Details
#initialize ⇒ Backup
Returns a new instance of Backup.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/meroku/backup.rb', line 8 def initialize @connection = Net::SSH.start('34.239.241.218', 'ubuntu', sshopts) execute_script <<~HEREDOC SECRET=#{Meroku::Shared.secrets.meroku_secret} ~/backend_api/script/backup_db SECRET=#{Meroku::Shared.secrets.meroku_secret} ~/backend_api/script/backup_etc SECRET=#{Meroku::Shared.secrets.meroku_secret} ~/backend_api/script/backup_nginxconfs SECRET=#{Meroku::Shared.secrets.meroku_secret} ~/backend_api/script/backup_homedirs HEREDOC puts 'OK' end |