Redis: Backup and Restore [ full DB and single key ]

Here are the processes to backup and restore data from and to the Redis server. Though the restore and back is not a frequently used process, but this becomes crucial in certain use cases. Also moving data from one Redis server to another is a very handy process when we need that.

Here we have discussed 2 processes for the backup and restoration of the Redis server-

  1. First, we have discussed the process of backing up and restoring the full Redis database.
  2. In the second process, we have discussed how we can backup a single Redis key value and then restore that.

Backup and Restore Full Database

Follow the steps below to backup and restore full Redis database data.

Check RDB file

The RDB file is saved in the working directory. We can check the working directory by checking “dir” configuration.

You can check the redis.conf file and check for “dir” configuration, or from the redis-cli use the following command-

127.0.0.1:6379> config get dir

1) "dir"
2) "/data"

Here “/data” is the path of the working directory in our server.

You may have some different path. Just use that path for the rest of the process.

Let’s check the content in the Redis working directory, using “ls” command in the terminal-

# Check content of /data directory
$ ls -la /data

# We get a result like below
total 20
drwxr-xr-x 1 root root 4096 Nov 27 13:18 .
drwxr-xr-x 1 root root 4096 Nov 26 15:01 ..
-rw-r--r-- 1 root root 1545 Nov 27 13:18 dump.rdb
drwxr-xr-x 2 root root 4096 Nov  1 14:51 redis
drwxr-xr-x 2 root root 4096 Nov  1 14:51 redisinsight

The most important content here is the “dump.rdb“.

You may not have “dump.rdb” file. In that case don’t worry, our next steps will create the file.

The “dump.rdb” file name can be different in some case, as this file name can be changed using the configuration “dbfilename“.

You can check the database file name in the configuration using the following command from redis-cli-

127.0.0.1:6379> config get dbfilename

1) "dbfilename"
2) "dump.rdb"

# as you can see, the file name is default "dump.db" in our case

Backup latest data

To dump/write all the last changes to the “dump.rdb” file we can use any of the commands from redis-cli-

  • SAVE
  • BGSAVE

We are using the SAVE command here and that will save all the latest data to file-

127.0.0.1:6379> save
OK

# or you can us BGSAVE command to run the saving process in the background
127.0.0.1:6379> bgsave

Check the “dump.rdb” file. The change date of that file should be changed to the latest time-

# Check the fiels in /data directory
$ ls -la /data

# We get result like below from ls command
total 20
drwxr-xr-x 1 root root 4096 Nov 28 08:21 .
drwxr-xr-x 1 root root 4096 Nov 26 15:01 ..
-rw-r--r-- 1 root root 1545 Nov 28 08:21 dump.rdb
drwxr-xr-x 2 root root 4096 Nov  1 14:51 redis
drwxr-xr-x 2 root root 4096 Nov  1 14:51 redisinsight

Copy the “dump.rdb” to the location where you want to keep the backup.

# Create the directory if required
# Here are are creating directory /home/bigbox-redis-backup
mkdir /home/bigbox-redis-backup

# Copy the RDB file to the backup directory
cp /data/dump.rdb /home/bigbox-redis-backup

# Check if file is moved to the backup location
ls -la /home/bigbox-redis-backup/

# We get result like below from ls command
total 12
drwxr-xr-x 2 root root 4096 Nov 28 08:25 .
drwxr-xr-x 1 root root 4096 Nov 28 08:24 ..
-rw-r--r-- 1 root root 1545 Nov 28 08:25 dump.rdb

Restore

To restore the data we just need to just replace the current “dump.rdb” file with our old/backup “dump.rdb”.

But first, we have to make sure that the “appendonly” configuration is not enabled on the Redis configuration. As when this is enabled, then commands are logged in a .aof file. Use the following command inside “redis-cli” to check the configuration-

127.0.0.1:6379> config get appendonly
1) "appendonly"
2) "no"

In this case, our “appendonly” value is “no“. But if your “appendonly” value is “yes”, then run the following command, inside “redis-cli“-

127.0.0.1:6379> config set appendonly no
OK

Now we have to stop the Redis server-

# we are using this command on our Ubuntu OS top stop Redis server
sudo service redis-server stop

You can use the appropriate command to stop the Redis server, for your operating system.

Copy the backup “dump.rdb” to the Redis working directory-

# /home/bigbox-redis-backup/dump.rdb is our backup file. Use path of your RDB file here
cp /home/bigbox-redis-backup/dump.rdb /data

Start Redis server-

# we are using this command on our Ubuntu OS top stop Redis server
sudo service redis-server start

You can use the appropriate command to start the Redis server, for your operating system.

Automate the backup process [ if required ]

Let’s automate the process of backup, so that the “dump.rdb” is backed up regularly after a certain duration.

Check the path of “redis-cli“-

$ which redis-cli
/usr/local/bin/redis-cli

Here we are assuming-

  • Redis backup file is “/data/dump.rdb
  • Our destination directory for backup is “/home/redis_backup

Create a shell script file, we are naming it “redis_backup.sh“. And save the following code in the file-

#!/bin/bash

CURRENT_YEAR=$(date +'%Y')
CURRENT_MONTH=$(date +'%m')
CURRENT_DATE=$(date +'%d')
CURRENT_HOUR=$(date +'%H')

# Source RDB file
SOURCE_BACKUP_FILE="/data/dump.rdb"

# Destination directory
DESTINATION_DIR="/home/redis_backup"
# Destination file name
DESTINATION_FILE_NAME="bigboxdump-${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}-${CURRENT_HOUR}.rdb"
# Destination full path
DESTINATION_FULL_FILE_PATH="$DESTINATION_DIR/$DESTINATION_FILE_NAME"

# Run the "SAVE" command on redis-cli
echo SAVE | /usr/local/bin/redis-cli

# Copy SOURCE_BACKUP_FILE to DESTINATION_FULL_FILE_PATH
cp "$SOURCE_BACKUP_FILE" "$DESTINATION_FULL_FILE_PATH"

exit 1

If we run the script, then it will-

  • Run the “SAVE” command inside “redis-cli“.
  • Then copies the saved “dump.rdb” file to “/home/redis_dump“.
  • Name of the file after backup is complete will be like the format “bigboxdump-YEAR-MONTH-DATE-HOUR.rdb“. So something like “bigboxdump-2023-12-19-14.rdb

Run the following command to make the script executable. We are assuming the sh file is at “/home/redis_backup.sh“.

chmod +x /home/redis_backup.sh

Let’s use corn to run the script after a specific duration. Use the following command to open the cron file-

crontab -e

Save the following lines in the file, to run the /home/redis_backup.sh every 6 hours

0 */6 * * * /home/redis_backup.sh   # Run backup script every 6 hours

Save and exit. We will have the Redis data backed up every 6 hours, in the directory “/home/redis_backup“.

Backup and Restore a Single Key

Let’s discuss a simple case – where we want to just backup only one key and then restore it later.

This seems like a simple task in the case of string-type data, as we can use the “GET” command to get the value and then copy and store the data. Then we can use the “SET” command later to set that value.

But for more complex data types- List, Set, Hash, etc. it is not that simple.

If we want to just dump data of only one key and then restore it later, then we have 2 handy commands available – DUMP and RESTORE.

Set values for the demo

For demoing the case let’s set some values of different data types-

Set string value:

# Set value of type string
127.0.0.1:6379> set bigboxstr KY88ZPRWCGTDQZSZQPQ29NU55V7MC019UMJM9P7LKR527KPDCK6BM50ZLVA3ZJ5L4DZ1R7GWS04GAWTVEY27QHU3BEJG6ZN2PDJHJ37RFDHUDWW1FEQT1E2VH2PW05KRCFAK4P66N8WUYVCTURJYRMZTL1ZZV85RB2BH49A6Z9FHYKMMWTLKJ1ACCGMM19Z7P42YXKT6J85E74HGDEYJMENGBGR5R1XAPZK8LBQPTUW7B5VMSFXXR3ZVTKRAZ5KUS7AKQUUZULBGWK8QP4DEF2UU4FAHJB22E3PGTMTLKDVMZA8PUJWM1QLAPC6KVN5NCB635Y6QRB476APP7QLHYQ03GNMLJBVSN3NS20CW7GJDFSRXLPGUBCPEC2XNMZ2Y1HBYAKAPLFF74GVVZNEU0VWLEX6VXCCQYKLPNCYA5PKX4DL9C772P5KF7QMZBRBH4UP5P6S1N283BMFNY7HT5WRS2HX47XXUU6D9TZ5CJKK687K45JUG
OK

# Check string value
127.0.0.1:6379> get bigboxstr
"KY88ZPRWCGTDQZSZQPQ29NU55V7MC019UMJM9P7LKR527KPDCK6BM50ZLVA3ZJ5L4DZ1R7GWS04GAWTVEY27QHU3BEJG6ZN2PDJHJ37RFDHUDWW1FEQT1E2VH2PW05KRCFAK4P66N8WUYVCTURJYRMZTL1ZZV85RB2BH49A6Z9FHYKMMWTLKJ1ACCGMM19Z7P42YXKT6J85E74HGDEYJMENGBGR5R1XAPZK8LBQPTUW7B5VMSFXXR3ZVTKRAZ5KUS7AKQUUZULBGWK8QP4DEF2UU4FAHJB22E3PGTMTLKDVMZA8PUJWM1QLAPC6KVN5NCB635Y6QRB476APP7QLHYQ03GNMLJBVSN3NS20CW7GJDFSRXLPGUBCPEC2XNMZ2Y1HBYAKAPLFF74GVVZNEU0VWLEX6VXCCQYKLPNCYA5PKX4DL9C772P5KF7QMZBRBH4UP5P6S1N283BMFNY7HT5WRS2HX47XXUU6D9TZ5CJKK687K45JUG"

Set list value:

# Push string to list
127.0.0.1:6379> rpush bigboxlist abc def ghi jkl mno pqrst uvwxyz
(integer) 7

# Check list
127.0.0.1:6379> lrange bigboxlist 0 -1
1) "abc"
2) "def"
3) "ghi"
4) "jkl"
5) "mno"
6) "pqrst"
7) "uvwxyz"

Set set value:

# Add values to set
127.0.0.1:6379> sadd bigboxset 7252057f-9e57-4fe6-b0c8-aad580d15e72 a3733ef7-ee6e-4db1-b183-8b2e058d777f 1f323e4d-fda7-4a97-b81d-235326f9a6fb 1cc87284-89d0-40d7-8954-022766c4ded6 46ab0c39-9471-4d1b-ba3e-8b721f5cfc6f a472f505-75c0-4f53-945a-eaf887f18dfd a657891b-c495-4a16-b2ca-a9fb0b213647 ad98325b-7fa7-41d6-8637-dfae22c5abff abdb99d9-aed6-48a2-95b8-53152d54b54a a1444f33-1360-4006-8db9-5844c654418b
(integer) 10

# Check set members
127.0.0.1:6379> smembers bigboxset
 1) "7252057f-9e57-4fe6-b0c8-aad580d15e72"
 2) "a3733ef7-ee6e-4db1-b183-8b2e058d777f"
 3) "1f323e4d-fda7-4a97-b81d-235326f9a6fb"
 4) "1cc87284-89d0-40d7-8954-022766c4ded6"
 5) "46ab0c39-9471-4d1b-ba3e-8b721f5cfc6f"
 6) "a472f505-75c0-4f53-945a-eaf887f18dfd"
 7) "a657891b-c495-4a16-b2ca-a9fb0b213647"
 8) "ad98325b-7fa7-41d6-8637-dfae22c5abff"
 9) "abdb99d9-aed6-48a2-95b8-53152d54b54a"
10) "a1444f33-1360-4006-8db9-5844c654418b"

Set hash value:

# Set value to hash
127.0.0.1:6379> hset bigboxhash dummy1 g4t31rTdyqeTvnVEW2qXpiuT1zGrhpqA dummy2 eNzWjfrgWbiFJhQea4f8MumEX4tPE3Dx dummy3 VVvGm0CjzrwSvenJ50g2p3EwMrZqa0tx dummy4 A0cfiN78rUzuqza50Puy4EuFVgaGcnE dummy5 rSZ8YUYgBu49NGDEgYVKBHQx2ywHxPnQ dummy6 2MfrKbW2Si0ZmvFvAn0NfeEv3D2paNGE dummy7  3juKRPyH1L1JSx1QmBJqJNVE42jHJ3d dummy8 uSDpHYpwAKFWiaEjF9gn3bMEZmZJKJKD dummy9 ktykfKmy04BLwWXapH8LtAkUjb9M1X4f dummy10 eqZja47Gidjcdke877ciVnNg1XunPicM
(integer) 10

# Check the hash values
127.0.0.1:6379> hgetall bigboxhash
 1) "dummy1"
 2) "g4t31rTdyqeTvnVEW2qXpiuT1zGrhpqA"
 3) "dummy2"
 4) "eNzWjfrgWbiFJhQea4f8MumEX4tPE3Dx"
 5) "dummy3"
 6) "VVvGm0CjzrwSvenJ50g2p3EwMrZqa0tx"
 7) "dummy4"
 8) "A0cfiN78rUzuqza50Puy4EuFVgaGcnE"
 9) "dummy5"
10) "rSZ8YUYgBu49NGDEgYVKBHQx2ywHxPnQ"
11) "dummy6"
12) "2MfrKbW2Si0ZmvFvAn0NfeEv3D2paNGE"
13) "dummy7"
14) "3juKRPyH1L1JSx1QmBJqJNVE42jHJ3d"
15) "dummy8"
16) "uSDpHYpwAKFWiaEjF9gn3bMEZmZJKJKD"
17) "dummy9"
18) "ktykfKmy04BLwWXapH8LtAkUjb9M1X4f"
19) "dummy10"
20) "eqZja47Gidjcdke877ciVnNg1XunPicM"

Dump values

Lets dump all these values one by one-

# Dump the string value
127.0.0.1:6379> dump bigboxstr
"\x00A\xf4KY88ZPRWCGTDQZSZQPQ29NU55V7MC019UMJM9P7LKR527KPDCK6BM50ZLVA3ZJ5L4DZ1R7GWS04GAWTVEY27QHU3BEJG6ZN2PDJHJ37RFDHUDWW1FEQT1E2VH2PW05KRCFAK4P66N8WUYVCTURJYRMZTL1ZZV85RB2BH49A6Z9FHYKMMWTLKJ1ACCGMM19Z7P42YXKT6J85E74HGDEYJMENGBGR5R1XAPZK8LBQPTUW7B5VMSFXXR3ZVTKRAZ5KUS7AKQUUZULBGWK8QP4DEF2UU4FAHJB22E3PGTMTLKDVMZA8PUJWM1QLAPC6KVN5NCB635Y6QRB476APP7QLHYQ03GNMLJBVSN3NS20CW7GJDFSRXLPGUBCPEC2XNMZ2Y1HBYAKAPLFF74GVVZNEU0VWLEX6VXCCQYKLPNCYA5PKX4DL9C772P5KF7QMZBRBH4UP5P6S1N283BMFNY7HT5WRS2HX47XXUU6D9TZ5CJKK687K45JUG\x0b\x00K\x86Y.\xc3r\\\xa4"


# Dump the list
127.0.0.1:6379> dump bigboxlist
"\x12\x01\x02//\x00\x00\x00\a\x00\x83abc\x04\x83def\x04\x83ghi\x04\x83jkl\x04\x83mno\x04\x85pqrst\x06\x86uvwxyz\a\xff\x0b\x00\x01\xcc=\x86\xc5\xa4\xc6}"


# Dump the set
127.0.0.1:6379> dump bigboxset
"\x14A\x83\x83\x01\x00\x00\n\x00\xa47252057f-9e57-4fe6-b0c8-aad580d15e72%\xa4a3733ef7-ee6e-4db1-b183-8b2e058d777f%\xa41f323e4d-fda7-4a97-b81d-235326f9a6fb%\xa41cc87284-89d0-40d7-8954-022766c4ded6%\xa446ab0c39-9471-4d1b-ba3e-8b721f5cfc6f%\xa4a472f505-75c0-4f53-945a-eaf887f18dfd%\xa4a657891b-c495-4a16-b2ca-a9fb0b213647%\xa4ad98325b-7fa7-41d6-8637-dfae22c5abff%\xa4abdb99d9-aed6-48a2-95b8-53152d54b54a%\xa4a1444f33-1360-4006-8db9-5844c654418b%\xff\x0b\x00\xdc\xcb\xff\xce=\"\x11\xf4"


# Dump hash value
127.0.0.1:6379> dump bigboxhash
"\x10\xc3A\x93A\xaa\x1f\xaa\x01\x00\x00\x14\x00\x86dummy1\a\xa0g4t31rTdyqeTvnVEW\x0f2qXpiuT1zGrhpqA!\x80)\x1f2\a\xa0eNzWjfrgWbiFJhQea4f8MumEX4tPE\x023Dx\xa0)\x1f3\a\xa0VVvGm0CjzrwSvenJ50g2p3EwMrZqa\x010t\xc0)\x1f4\a\x9fA0cfiN78rUzuqza50Puy4EuFVgaGc\x02nE \x80|\x1f5\a\xa0rSZ8YUYgBu49NGDEgYVKBHQx2ywHx\x02PnQ\xa0|\x1f6\a\xa02MfrKbW2Si0ZmvFvAn0NfeEv3D2pa\x02NGE\xa0)\x1f7\a\x9f3juKRPyH1L1JSx1QmBJqJNVE42jHJ\x013d\xa0|\x1f8\a\xa0uSDpHYpwAKFWiaEjF9gn3bMEZmZJK\x02JKD\xa0R\x1f9\a\xa0ktykfKmy04BLwWXapH8LtAkUjb9M1\x04X4f!\x87\x81w\x1f0\b\xa0eqZja47Gidjcdke877ciVnNg1XunP\x04icM!\xff\x0b\x00s+mi\xd4\x9e\x00."

If you have a separate server then you can check the restore commands there.

If you don’t have a separate Redis server ready then, just want to test the process, then just delete the keys from your Redis server, and try to restore on the same server.

Remember to copy the serialized values provided by the DUMP command.

Check the details of Redis “DUMP” command-

Delete keys for demo purposes

Let’s delete the keys-

 # Delete the string
127.0.0.1:6379> del bigboxstr
(integer) 1

# Delete the list
127.0.0.1:6379> del bigboxlist
(integer) 1

# Delete the set
127.0.0.1:6379> del bigboxset
(integer) 1

# Delete the hash
127.0.0.1:6379> del bigboxhash
(integer) 1

# Check existance of the keys
127.0.0.1:6379> exists bigboxstr bigboxlist bigboxset bigboxhash
(integer) 0

Restore

Now restore the values one by one.

Restore the string:

127.0.0.1:6379> restore bigboxstr 0 "\x00A\xf4KY88ZPRWCGTDQZSZQPQ29NU55V7MC019UMJM9P7LKR527KPDCK6BM50ZLVA3ZJ5L4DZ1R7GWS04GAWTVEY27QHU3BEJG6ZN2PDJHJ37RFDHUDWW1FEQT1E2VH2PW05KRCFAK4P66N8WUYVCTURJYRMZTL1ZZV85RB2BH49A6Z9FHYKMMWTLKJ1ACCGMM19Z7P42YXKT6J85E74HGDEYJMENGBGR5R1XAPZK8LBQPTUW7B5VMSFXXR3ZVTKRAZ5KUS7AKQUUZULBGWK8QP4DEF2UU4FAHJB22E3PGTMTLKDVMZA8PUJWM1QLAPC6KVN5NCB635Y6QRB476APP7QLHYQ03GNMLJBVSN3NS20CW7GJDFSRXLPGUBCPEC2XNMZ2Y1HBYAKAPLFF74GVVZNEU0VWLEX6VXCCQYKLPNCYA5PKX4DL9C772P5KF7QMZBRBH4UP5P6S1N283BMFNY7HT5WRS2HX47XXUU6D9TZ5CJKK687K45JUG\x0b\x00K\x86Y.\xc3r\\\xa4"

OK

127.0.0.1:6379> get bigboxstr
"KY88ZPRWCGTDQZSZQPQ29NU55V7MC019UMJM9P7LKR527KPDCK6BM50ZLVA3ZJ5L4DZ1R7GWS04GAWTVEY27QHU3BEJG6ZN2PDJHJ37RFDHUDWW1FEQT1E2VH2PW05KRCFAK4P66N8WUYVCTURJYRMZTL1ZZV85RB2BH49A6Z9FHYKMMWTLKJ1ACCGMM19Z7P42YXKT6J85E74HGDEYJMENGBGR5R1XAPZK8LBQPTUW7B5VMSFXXR3ZVTKRAZ5KUS7AKQUUZULBGWK8QP4DEF2UU4FAHJB22E3PGTMTLKDVMZA8PUJWM1QLAPC6KVN5NCB635Y6QRB476APP7QLHYQ03GNMLJBVSN3NS20CW7GJDFSRXLPGUBCPEC2XNMZ2Y1HBYAKAPLFF74GVVZNEU0VWLEX6VXCCQYKLPNCYA5PKX4DL9C772P5KF7QMZBRBH4UP5P6S1N283BMFNY7HT5WRS2HX47XXUU6D9TZ5CJKK687K45JUG"


127.0.0.1:6379> type bigboxstr
string

Restore the list:

127.0.0.1:6379> restore bigboxlist 0 "\x12\x01\x02//\x00\x00\x00\a\x00\x83abc\x04\x83def\x04\x83ghi\x04\x83jkl\x04\x83mno\x04\x85pqrst\x06\x86uvwxyz\a\xff\x0b\x00\x01\xcc=\x86\xc5\xa4\xc6}"
OK

127.0.0.1:6379> lrange bigboxlist 0 -1
1) "abc"
2) "def"
3) "ghi"
4) "jkl"
5) "mno"
6) "pqrst"
7) "uvwxyz"

127.0.0.1:6379> type bigboxlist
list

Restore the set:

127.0.0.1:6379> restore bigboxset 0 "\x14A\x83\x83\x01\x00\x00\n\x00\xa47252057f-9e57-4fe6-b0c8-aad580d15e72%\xa4a3733ef7-ee6e-4db1-b183-8b2e058d777f%\xa41f323e4d-fda7-4a97-b81d-235326f9a6fb%\xa41cc87284-89d0-40d7-8954-022766c4ded6%\xa446ab0c39-9471-4d1b-ba3e-8b721f5cfc6f%\xa4a472f505-75c0-4f53-945a-eaf887f18dfd%\xa4a657891b-c495-4a16-b2ca-a9fb0b213647%\xa4ad98325b-7fa7-41d6-8637-dfae22c5abff%\xa4abdb99d9-aed6-48a2-95b8-53152d54b54a%\xa4a1444f33-1360-4006-8db9-5844c654418b%\xff\x0b\x00\xdc\xcb\xff\xce=\"\x11\xf4"
OK

127.0.0.1:6379> smembers bigboxset
 1) "7252057f-9e57-4fe6-b0c8-aad580d15e72"
 2) "a3733ef7-ee6e-4db1-b183-8b2e058d777f"
 3) "1f323e4d-fda7-4a97-b81d-235326f9a6fb"
 4) "1cc87284-89d0-40d7-8954-022766c4ded6"
 5) "46ab0c39-9471-4d1b-ba3e-8b721f5cfc6f"
 6) "a472f505-75c0-4f53-945a-eaf887f18dfd"
 7) "a657891b-c495-4a16-b2ca-a9fb0b213647"
 8) "ad98325b-7fa7-41d6-8637-dfae22c5abff"
 9) "abdb99d9-aed6-48a2-95b8-53152d54b54a"
10) "a1444f33-1360-4006-8db9-5844c654418b"

127.0.0.1:6379> type bigboxset
set

Restore the hash:

127.0.0.1:6379> restore bigboxhash 0 "\x10\xc3A\x93A\xaa\x1f\xaa\x01\x00\x00\x14\x00\x86dummy1\a\xa0g4t31rTdyqeTvnVEW\x0f2qXpiuT1zGrhpqA!\x80)\x1f2\a\xa0eNzWjfrgWbiFJhQea4f8MumEX4tPE\x023Dx\xa0)\x1f3\a\xa0VVvGm0CjzrwSvenJ50g2p3EwMrZqa\x010t\xc0)\x1f4\a\x9fA0cfiN78rUzuqza50Puy4EuFVgaGc\x02nE \x80|\x1f5\a\xa0rSZ8YUYgBu49NGDEgYVKBHQx2ywHx\x02PnQ\xa0|\x1f6\a\xa02MfrKbW2Si0ZmvFvAn0NfeEv3D2pa\x02NGE\xa0)\x1f7\a\x9f3juKRPyH1L1JSx1QmBJqJNVE42jHJ\x013d\xa0|\x1f8\a\xa0uSDpHYpwAKFWiaEjF9gn3bMEZmZJK\x02JKD\xa0R\x1f9\a\xa0ktykfKmy04BLwWXapH8LtAkUjb9M1\x04X4f!\x87\x81w\x1f0\b\xa0eqZja47Gidjcdke877ciVnNg1XunP\x04icM!\xff\x0b\x00s+mi\xd4\x9e\x00."

OK

127.0.0.1:6379> hgetall bigboxhash
 1) "dummy1"
 2) "g4t31rTdyqeTvnVEW2qXpiuT1zGrhpqA"
 3) "dummy2"
 4) "eNzWjfrgWbiFJhQea4f8MumEX4tPE3Dx"
 5) "dummy3"
 6) "VVvGm0CjzrwSvenJ50g2p3EwMrZqa0tx"
 7) "dummy4"
 8) "A0cfiN78rUzuqza50Puy4EuFVgaGcnE"
 9) "dummy5"
10) "rSZ8YUYgBu49NGDEgYVKBHQx2ywHxPnQ"
11) "dummy6"
12) "2MfrKbW2Si0ZmvFvAn0NfeEv3D2paNGE"
13) "dummy7"
14) "3juKRPyH1L1JSx1QmBJqJNVE42jHJ3d"
15) "dummy8"
16) "uSDpHYpwAKFWiaEjF9gn3bMEZmZJKJKD"
17) "dummy9"
18) "ktykfKmy04BLwWXapH8LtAkUjb9M1X4f"
19) "dummy10"
20) "eqZja47Gidjcdke877ciVnNg1XunPicM"

127.0.0.1:6379> type bigboxhash
hash

Check the details of Redis “RESTORE” command-

Source Code

Use the following links to get the source code used in this article-

Leave a Comment


The reCAPTCHA verification period has expired. Please reload the page.