diff options
author | Peter Kozak <spag@golwen.net> | 2013-02-27 06:05:06 -0500 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-02-27 06:05:06 -0500 |
commit | 211f558a86ae30cdd5b392ab1376e1393f97e22c (patch) | |
tree | f86ec6cedf081a1a57005eca1661e9bead34e4de /lib | |
parent | ed0117210837dd1d0d2dbf403799b70225caf0cd (diff) | |
parent | 41e17e9f3e184975e8b429d3fb06d822c49068bf (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/backup.rake | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake index 8e55be2..21b0fac 100644 --- a/lib/tasks/backup.rake +++ b/lib/tasks/backup.rake @@ -23,7 +23,11 @@ namespace :backup do # Restore voicemails # - # system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz" + system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz" + + # Delete the archive tar.gz to get more air to breathe + # + FileUtils.mkdir_p "#{restore_directory}/GS5/archives" # Restore the database # @@ -38,6 +42,16 @@ namespace :backup do FileUtils.rm_rf tmp_dir system "cd /opt/gemeinschaft && rake db:migrate" + + # Rebuild the thumbnails + # + FaxDocument.all.each do |fax_document| + fax_document.render_thumbnails + end + + # Delete the restore_job. No need to waste that space. + # + restore_job.destroy end end |