Sha256: cad9f063f8b3ea7b53cea19ad5bcee754a759166ef2f5bbeb7654df18eba9733

Contents?: true

Size: 668 Bytes

Versions: 4

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true

module Meroku
  # Logic related to backup of production server
  class Backup
    include Meroku::Sshable

    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
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
meroku-2.0.31 lib/meroku/backup.rb
meroku-2.0.30 lib/meroku/backup.rb
meroku-2.0.29 lib/meroku/backup.rb
meroku-2.0.28 lib/meroku/backup.rb