|
1 | | -# keydb-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo |
| 1 | +# redis-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo |
2 | 2 | # BSD license, See the COPYING file for more information. |
3 | 3 | # |
4 | | -# Copy the whole dataset from one Redis instance to another one |
| 4 | +# Copy the whole dataset from one KeyDB/Redis instance to another one |
5 | 5 | # |
6 | 6 | # WARNING: this utility is deprecated and serves as a legacy adapter |
7 | | -# for the more-robust keydb-copy gem. |
| 7 | +# for the more-robust redis-copy gem. |
8 | 8 |
|
9 | 9 | require 'shellwords' |
10 | 10 |
|
11 | 11 | def redisCopy(opts={}) |
12 | 12 | src = "#{opts[:srchost]}:#{opts[:srcport]}" |
13 | 13 | dst = "#{opts[:dsthost]}:#{opts[:dstport]}" |
14 | | - `keydb-copy #{src.shellescape} #{dst.shellescape}` |
| 14 | + `redis-copy #{src.shellescape} #{dst.shellescape}` |
15 | 15 | rescue Errno::ENOENT |
16 | | - $stderr.puts 'This utility requires the keydb-copy executable', |
17 | | - 'from the keydb-copy gem on https://rubygems.org', |
18 | | - 'To install it, run `gem install keydb-copy`.' |
| 16 | + $stderr.puts 'This utility requires the redis-copy executable', |
| 17 | + 'from the redis-copy gem on https://rubygems.org', |
| 18 | + 'To install it, run `gem install redis-copy`.' |
19 | 19 | exit 1 |
20 | 20 | end |
21 | 21 |
|
22 | | -$stderr.puts "This utility is deprecated. Use the keydb-copy gem instead." |
| 22 | +$stderr.puts "This utility is deprecated. Use the redis-copy gem instead." |
23 | 23 | if ARGV.length != 4 |
24 | | - puts "Usage: keydb-copy.rb <srchost> <srcport> <dsthost> <dstport>" |
| 24 | + puts "Usage: redis-copy.rb <srchost> <srcport> <dsthost> <dstport>" |
25 | 25 | exit 1 |
26 | 26 | end |
27 | 27 | puts "WARNING: it's up to you to FLUSHDB the destination host before to continue, press any key when ready." |
|
0 commit comments