summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-27 22:52:55 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-27 22:52:55 +0100
commit5c87034a0448af2e2bd3f4de3bbaba4d482d1f7e (patch)
treeb83143885e0cfa1dd07781e4d3d9d2c41d5e0acd /lib/tasks
parent46eb56627a0d1f5142b79b476bbeb96f91a157d9 (diff)
parentbd6c11cb371c614e66922290fb239cec04eb67ea (diff)
Merge branch 'develop'5.1-beta8
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/backup.rake14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake
index 21b0fac..55369b6 100644
--- a/lib/tasks/backup.rake
+++ b/lib/tasks/backup.rake
@@ -19,11 +19,21 @@ namespace :backup do
# Restore faxes
#
- system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/faxes.tar.gz"
+ if File.exists?("#{restore_directory}/GS5/archives/faxes.tar.gz")
+ system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/faxes.tar.gz"
+ end
# Restore voicemails
#
- system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz"
+ if File.exists?("#{restore_directory}/GS5/archives/voicemails.tar.gz")
+ system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz"
+ end
+
+ # Restore avatars
+ #
+ if File.exists?("#{restore_directory}/GS5/archives/avatars.tar.gz")
+ system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/avatars.tar.gz"
+ end
# Delete the archive tar.gz to get more air to breathe
#