Module: Backup::Helper
- Includes:
- Gitlab::Utils::StrongMemoize
- Included in:
- Dump::Postgres, Targets::Database, Targets::Files
- Defined in:
- lib/backup/helper.rb
Instance Method Summary collapse
Instance Method Details
#compress_cmd ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/backup/helper.rb', line 7 def compress_cmd if ENV['COMPRESS_CMD'].present? puts "Using custom COMPRESS_CMD '#{ENV['COMPRESS_CMD']}'" puts "Ignoring GZIP_RSYNCABLE" if ENV['GZIP_RSYNCABLE'] == 'yes' ENV['COMPRESS_CMD'] elsif ENV['GZIP_RSYNCABLE'] == 'yes' "gzip --rsyncable -c -1" else "gzip -c -1" end end |
#decompress_cmd ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/backup/helper.rb', line 20 def decompress_cmd if ENV['DECOMPRESS_CMD'].present? puts "Using custom DECOMPRESS_CMD '#{ENV['DECOMPRESS_CMD']}'" ENV['DECOMPRESS_CMD'] else "gzip -cd" end end |