diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-27 10:39:35 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-27 10:39:35 +0100 |
commit | 869562f6f7bce2e605186409adad5b4ca255439d (patch) | |
tree | 80e8fb2d226ca4915f8154075cb47c77eca49e42 | |
parent | 1ae07d45144b46d8a88eed74ac9131c4d9c9e557 (diff) |
Backup pdfs and tiffs of a fax.
-rw-r--r-- | config/backup.rb | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/config/backup.rb b/config/backup.rb index 04cadb9..b50f7a8 100644 --- a/config/backup.rb +++ b/config/backup.rb @@ -32,9 +32,23 @@ Backup::Model.new(:GS5, 'GS5 backup') do # if File.exists?('/var/opt/gemeinschaft/fax') archive :faxes do |archive| - archive.add '/var/opt/gemeinschaft/fax/in/*.pdf' - archive.add '/var/opt/gemeinschaft/fax/out/*.pdf' - archive.add '/var/opt/gemeinschaft/fax/out/*.tiff' + # Incoming faxes + # + Dir.glob("/var/opt/gemeinschaft/fax/in/**/*.pdf").each do |fax_file| + archive.add(fax_file) + end + Dir.glob("/var/opt/gemeinschaft/fax/in/**/*.tiff").each do |fax_file| + archive.add(fax_file) + end + + # Outgoing faxes + # + Dir.glob("/var/opt/gemeinschaft/fax/out/**/*.pdf").each do |fax_file| + archive.add(fax_file) + end + Dir.glob("/var/opt/gemeinschaft/fax/out/**/*.tiff").each do |fax_file| + archive.add(fax_file) + end end end @@ -58,6 +72,4 @@ Backup::Model.new(:GS5, 'GS5 backup') do # Gzip [Compressor] # compress_with Gzip - -end - +end
\ No newline at end of file |