summaryrefslogtreecommitdiff
path: root/lib/tasks/backup.rake
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-27 22:51:27 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-27 22:51:27 +0100
commitbd6c11cb371c614e66922290fb239cec04eb67ea (patch)
treeb83143885e0cfa1dd07781e4d3d9d2c41d5e0acd /lib/tasks/backup.rake
parentef2acbfebeefdd17f8896a3e5eb44775febf4dee (diff)
Add avatars to the backup. closes #215
Diffstat (limited to 'lib/tasks/backup.rake')
-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
#