diff options
-rw-r--r-- | config/backup.rb | 9 | ||||
-rw-r--r-- | lib/tasks/backup.rake | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/config/backup.rb b/config/backup.rb index 0cb6a32..2c2984b 100644 --- a/config/backup.rb +++ b/config/backup.rb @@ -46,6 +46,15 @@ Backup::Model.new(:GS5, 'GS5 backup') do end ## + # Voicemails + # + if File.exists?('/var/opt/gemeinschaft/freeswitch/recordings') + archive :recordings do |archive| + archive.add '/var/opt/gemeinschaft/freeswitch/recordings' + end + end + + ## # Avatars # if File.exists?('/opt/gemeinschaft/public/uploads/user/image') diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake index 51fd2f2..ad4d41d 100644 --- a/lib/tasks/backup.rake +++ b/lib/tasks/backup.rake @@ -41,6 +41,12 @@ namespace :backup do system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz" end + # Restore recordings + # + if File.exists?("#{restore_directory}/GS5/archives/recordings.tar.gz") + system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/recordings.tar.gz" + end + # Restore avatars # if File.exists?("#{restore_directory}/GS5/archives/avatars.tar.gz") |