summaryrefslogtreecommitdiff
path: root/config/backup.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-07 11:39:53 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-07 11:39:53 +0100
commit45761a957746f9787ffe438b14014a6913cfabcf (patch)
treea070decca93b58c23fe16a935a5a26de425c862e /config/backup.rb
parenta41d928d0f7a0db062214532e6df6f9db410756e (diff)
Check if the directories exist (otherwise tar starts to cry like a baby).
Diffstat (limited to 'config/backup.rb')
-rw-r--r--config/backup.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/config/backup.rb b/config/backup.rb
index 3bb0d30..0057f01 100644
--- a/config/backup.rb
+++ b/config/backup.rb
@@ -30,14 +30,18 @@ Backup::Model.new(:GS5, 'GS5 backup') do
# Faxes
#
archive :faxes do |archive|
- archive.add '/opt/gemeinschaft/public/uploads/fax_document'
+ if File.exists?('/opt/gemeinschaft/public/uploads/fax_document')
+ archive.add '/opt/gemeinschaft/public/uploads/fax_document'
+ end
end
##
# Voicemails
#
archive :voicemails do |archive|
- archive.add '/var/opt/gemeinschaft/freeswitch/voicemail/'
+ if File.exists?('/var/opt/gemeinschaft/freeswitch/voicemail')
+ archive.add '/var/opt/gemeinschaft/freeswitch/voicemail'
+ end
end
##