Skip to content

kwkwan/rutil

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intro

rutil is a small command line utility that lets you selectively dump, restore and query a redis database, peek into stored data and pretty print json contents.

demo

rutil

installation

  go get -v github.com/pampa/rutil

usage

rutil [global options] command [command options] [arguments...]

commands

dump      dump redis database to a file
pipe      dump a redis database to stdout in a format compatible with | redis-cli --pipe
restore   restore redis database from a file
query, q  query keys matching the pattern provided by --keys
help, h   Shows a list of commands or help for one command

global options

--host, -s "127.0.0.1"  redis host
--auth, -a              authentication password
--port, -p "6379"       redis port
--help, -h              show help
--version, -v           print the version

dump

rutil dump [command options] [arguments...]

dump options

--keys, -k "*"  keys pattern (passed to redis 'keys' command)
--match, -m     regexp filter for key names
--invert, -v    invert match regexp
--auto, -a      make up a file name for the dump - redisYYYYMMDDHHMMSS.rdmp

pipe

rutil pipe [command options] [arguments...]

pipe options

--keys, -k "*"  keys pattern (passed to redis 'keys' command)
--match, -m     regexp filter for key names
--invert, -v    invert match regexp

restore

rutil restore [command options] [arguments...]

restore options

--dry-run, -r   pretend to restore
--flushdb, -f   flush the database before restoring
--delete, -d    delete key before restoring
--ignore, -g    ignore BUSYKEY restore errors

query

rutil query [command options] [arguments...]

query options

--keys, -k                           keys pattern (passed to redis 'keys' command)
--match, -m                          regexp filter for key names
--invert, -v                         invert match regexp
--delete                             delete keys
--print, -p                          print key values
--field, -f [-f option --f option]   hash fields to print (default all)
--json, -j                           attempt to parse and pretty print strings as json

About

redis multitool utility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.7%
  • JavaScript 3.3%