diff options
author | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-02-26 18:37:19 +0100 |
---|---|---|
committer | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-02-26 18:37:19 +0100 |
commit | f9fce457486aa6d00ec83f009b18b9817c32468a (patch) | |
tree | fe3cb8e45b3afc5585724bd9bd17ab12d194b30a | |
parent | 23fdaceefb8854756e42ac190f603b0ae73e8d61 (diff) |
run tar commands via sudo
-rw-r--r-- | lib/tasks/backup.rake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake index 913d7d3..df632c3 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} && tar xzf #{restore_job.backup_file.path}" + system "cd #{tmp_dir} && sudo /usr/bin/tar xzf #{restore_job.backup_file.path}" restore_directory = Dir.glob("/tmp/gs5_restore_directory/*").first - system "cd #{restore_directory} && tar xf GS5.tar && rm GS5.tar" + system "cd #{restore_directory} && sudo /usr/bin/tar xf GS5.tar && rm GS5.tar" # Restore faxes # - system "cd / && tar xzfP #{restore_directory}/GS5/archives/faxes.tar.gz" + system "cd / && sudo /usr/bin/tar xzfP #{restore_directory}/GS5/archives/faxes.tar.gz" # Restore voicemails # - # system "cd / && tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz" + # system "cd / && sudo /usr/bin/tar xzfP #{restore_directory}/GS5/archives/voicemails.tar.gz" # Restore the database # |