update gem reference
This commit is contained in:
1 parent
2c38667ecf
commit
accd3871be
1 file changed
+9
-9
+9
-9
@@ -1,27 +1,27 @@
|
||||
# keydb-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo
|
||||
# redis-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo
|
||||
# BSD license, See the COPYING file for more information.
|
||||
#
|
||||
# Copy the whole dataset from one Redis instance to another one
|
||||
# Copy the whole dataset from one KeyDB/Redis instance to another one
|
||||
#
|
||||
# WARNING: this utility is deprecated and serves as a legacy adapter
|
||||
# for the more-robust keydb-copy gem.
|
||||
# for the more-robust redis-copy gem.
|
||||
|
||||
require 'shellwords'
|
||||
|
||||
def redisCopy(opts={})
|
||||
src = "#{opts[:srchost]}:#{opts[:srcport]}"
|
||||
dst = "#{opts[:dsthost]}:#{opts[:dstport]}"
|
||||
`keydb-copy #{src.shellescape} #{dst.shellescape}`
|
||||
`redis-copy #{src.shellescape} #{dst.shellescape}`
|
||||
rescue Errno::ENOENT
|
||||
$stderr.puts 'This utility requires the keydb-copy executable',
|
||||
'from the keydb-copy gem on https://rubygems.org',
|
||||
'To install it, run `gem install keydb-copy`.'
|
||||
$stderr.puts 'This utility requires the redis-copy executable',
|
||||
'from the redis-copy gem on https://rubygems.org',
|
||||
'To install it, run `gem install redis-copy`.'
|
||||
exit 1
|
||||
end
|
||||
|
||||
$stderr.puts "This utility is deprecated. Use the keydb-copy gem instead."
|
||||
$stderr.puts "This utility is deprecated. Use the redis-copy gem instead."
|
||||
if ARGV.length != 4
|
||||
puts "Usage: keydb-copy.rb <srchost> <srcport> <dsthost> <dstport>"
|
||||
puts "Usage: redis-copy.rb <srchost> <srcport> <dsthost> <dstport>"
|
||||
exit 1
|
||||
end
|
||||
puts "WARNING: it's up to you to FLUSHDB the destination host before to continue, press any key when ready."
|
||||
|
||||
Reference in new issue
Block a user