1
0

decrypt_backup.rb 446 B

12345678910111213
  1. #!/usr/bin/env ruby
  2. # If you're using the backup gem, described on the Huginn wiki and at doc/deployment/backup, then you can use this
  3. # utility to decrypt backups.
  4. in_file = ARGV.shift
  5. out_file = ARGV.shift || "decrypted_backup.tar"
  6. puts "About to decrypt #{in_file} and write it to #{out_file}."
  7. cmd = "bundle exec backup decrypt --encryptor openssl --base64 --salt --in #{in_file} --out #{out_file}"
  8. puts "Executing: #{cmd}"
  9. puts `#{cmd}`