Permalink
Browse files

more debug output, copy! using backticks

  • Loading branch information...
john committed May 21, 2012
1 parent d0fef5d commit 47f5a3bbd79f96a9efd04a7e8870e457f7447063
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/backup/database/redis.rb
@@ -88,6 +88,7 @@ def invoke_save!
# Performs the copy command to copy over the Redis dump file to the Backup archive
def copy!
src_path = File.join(path, database)
+ puts "------------------> src_path is: #{src_path}"
unless File.exist?(src_path)
raise Errors::Database::Redis::NotFoundError, <<-EOS
Redis database dump not found
@@ -96,9 +97,12 @@ def copy!
end
dst_path = File.join(@dump_path, database)
+ puts "------------------> dst_path is: #{dst_path}"
if @model.compressor
@model.compressor.compress_with do |command, ext|
- run("#{ command } -c #{ src_path } > #{ dst_path + ext }")
+ comp_cmd = "#{ command } -c #{ src_path } > #{ dst_path + ext }"
+ puts "-----> comp_cmd is: #{comp_cmd}"
+ `comp_cmd`
end
else
FileUtils.cp(src_path, dst_path)

0 comments on commit 47f5a3b

Please sign in to comment.