diff options
author | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-02-26 21:34:33 +0100 |
---|---|---|
committer | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-02-26 21:34:33 +0100 |
commit | 177a2c037468e222191b6668eb8e64a94833b18c (patch) | |
tree | 8d94fcb1aac3f02d25ea05018f75033ea0a660d0 | |
parent | 9dd3fa175bb7fd18f81f8e32468a842babe63e7f (diff) |
correct path for tar
-rw-r--r-- | app/models/backup_job.rb | 2 | ||||
-rw-r--r-- | lib/tasks/backup.rake | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/models/backup_job.rb b/app/models/backup_job.rb index 91345e5..a04f6c0 100644 --- a/app/models/backup_job.rb +++ b/app/models/backup_job.rb @@ -32,7 +32,7 @@ class BackupJob < ActiveRecord::Base if tmp_backup_directory.blank? self.state = 'failed' else - system "cd #{backup_directory} && sudo /usr/bin/tar czf #{backup_name_prefix}#{File.basename(tmp_backup_directory)}.tar.gz #{File.basename(tmp_backup_directory)}" + system "cd #{backup_directory} && sudo /bin/tar czf #{backup_name_prefix}#{File.basename(tmp_backup_directory)}.tar.gz #{File.basename(tmp_backup_directory)}" require 'fileutils' FileUtils.rm_rf tmp_backup_directory file = File::Stat.new("#{backup_directory}/#{backup_name_prefix}#{File.basename(tmp_backup_directory)}.tar.gz") diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake index df632c3..8e55be2 100644 --- a/lib/tasks/backup.rake +++ b/lib/tasks/backup.rake @@ -13,17 +13,17 @@ namespace :backup do tmp_dir = "/tmp/gs5_restore_directory" FileUtils.rm_rf tmp_dir FileUtils.mkdir_p tmp_dir - system "cd #{tmp_dir} && sudo /usr/bin/tar xzf #{restore_job.backup_file.path}" + system "cd #{tmp_dir} && sudo /bin/tar xzf #{restore_job.backup_file.path}" restore_directory = Dir.glob("/tmp/gs5_restore_directory/*").first - system "cd #{restore_directory} && sudo /usr/bin/tar xf GS5.tar && rm GS5.tar" + system "cd #{restore_directory} && sudo /bin/tar xf GS5.tar && rm GS5.tar" # Restore faxes # - system "cd / && sudo /usr/bin/tar xzfP #{restore_directory}/GS5/archives/faxes.tar.gz" + system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/faxes.tar.gz" # Restore voicemails # - # system "cd / && sudo /usr/bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz" + # system "cd / && sudo /bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz" # Restore the database # |