delano / redis-dump

Redis to JSON and nack again
https://rubygems.org/gems/redis-dump
MIT License
818 stars 123 forks source link

support filtering keys #21

Open axos88 opened 6 years ago

axos88 commented 6 years ago

Support the following params: --include-keys (regex) --exclude-keys (regex)

By default it includes all keys. If there are any include-exclude params given, they will be executed in chain, and the key will be included based on the output.

For example

redis-dump .... --include-keys foo-.* --exclude-keys foo-bar-.* would include bar, foo-2, but not foo-bar-2

redis-dump .... --exclude-keys .* . --include-keys foo-[0-9]+ would exclude bar, foo-bar-2, but include foo-2