yannh / redis-dump-go

Backup & Restore your Redis server - FAST
MIT License
280 stars 58 forks source link

Filter keys #7

Closed utkarsh-devops closed 4 years ago

utkarsh-devops commented 4 years ago

Thanks @yannh You've created a very nice tool and it works perfectly well. I just have one query on keys filtering. How can I filter specific keys and dump those only? eg: xyz:

yannh commented 4 years ago

Hi @utkarsh-devops , you can not at the moment, I will look into adding this, but can't promise a timeframe! :+1:

yannh commented 4 years ago

Started looking into this, a couple of forks implemented it, it's not too hard since it's supported by Radix (the redis library we use). However it breaks the progress bar, since we use the database size to know when we are done - and we wouldn't be able to rely on this if we only dump part of it. :thinking: I'll think about this a bit more.

yannh commented 4 years ago

I think I might get rid of the progress bar and output some statistics instead... I think a progress bar was somewhat useful, but it makes less sense in the context of multiple databases and using filters. Let me know if anyone really likes it, otherwise it's going away :)

yannh commented 4 years ago

Implemented & released v0.4.0 ^ - had to rework the logging, so the progress bar is gone & replaced by some stats :) Be sure to use single quotes if you are going to use * in your filters!