May 16, 2021 Redis
The Redis SAVE command is used to create a backup of the current database.
The basic syntax of the redis Save command is as follows:
redis 127.0.0.1:6379> SAVE
redis 127.0.0.1:6379> SAVE OK
The command creates a dump.rdb file in the redis installation directory.
redis 127.0.0.1:6379> CONFIG GET dir 1) "dir" 2) "/usr/local/redis/bin"
The redis installation directory for the above command CONFIG GET dir output is /usr/local/redis/bin.
Creating a redis backup file can also use the command BGSAVE, which executes in the background.
127.0.0.1:6379> BGSAVE Background saving started