Dump and restore a single Redis database

redis-cli -n 2 --rdb /tmp/db2.rdb

# restore: stop redis, replace the file, start it
service redis-server stop
cp /tmp/db2.rdb /var/lib/redis/dump.rdb
chown redis:redis /var/lib/redis/dump.rdb
service redis-server start