redis-dump 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +4 -0
- data/VERSION.yml +2 -2
- data/bin/redis-dump +4 -1
- data/lib/redis/dump.rb +2 -1
- data/redis-dump.gemspec +1 -1
- metadata +1 -1
data/CHANGES.txt
CHANGED
data/VERSION.yml
CHANGED
data/bin/redis-dump
CHANGED
@@ -29,6 +29,7 @@ class Redis::Dump::CLI
|
|
29
29
|
global :d, :database, Integer, "Redis database (e.g. -d 15)"
|
30
30
|
global :s, :sleep, Integer, "Sleep for S seconds after dumping (for debugging)"
|
31
31
|
global :c, :count, Integer, "Chunk size (default: #{Redis::Dump.chunk_size})"
|
32
|
+
global :f, :filter, String, "Filter selected keys (passed directly to redis' KEYS command)"
|
32
33
|
global :O, :without_optimizations, "Disable run time optimizations"
|
33
34
|
global :V, :version, "Display version" do
|
34
35
|
puts "Version: #{Redis::Dump::VERSION.to_s}"
|
@@ -62,7 +63,9 @@ class Redis::Dump::CLI
|
|
62
63
|
usage "redis-dump -d 15 -c 100_000 > dumpfile_db15.json"
|
63
64
|
command :dump do |obj|
|
64
65
|
rd = Redis::Dump.new obj.global.database, obj.global.uri
|
65
|
-
|
66
|
+
obj.global.filter &&= '*%s*' % obj.global.filter
|
67
|
+
Redis::Dump.ld " filter #{obj.global.filter}"
|
68
|
+
rd.dump(obj.global.filter) do |records|
|
66
69
|
puts records
|
67
70
|
end
|
68
71
|
end
|
data/lib/redis/dump.rb
CHANGED
data/redis-dump.gemspec
CHANGED