Javatpoint Logo
Javatpoint Logo

Redis Backup & Restore

SAVE command is used to create a backup of a current Redis database. This command will create a dump.rdb file in your Redis directory by performing synchronous save.


Return Value

The SAVE command returns OK after successful execution.

Redis Backup Example

Use the SAVE command to create a backup of the current database.


Redis Backup 1

It will create a dump.rdb file in your Redis directory.

You can see that the dump.rdb file is created.

Redis Backup 2

Restore Redis Data

You have to move Redis backup file (dump.rdb) into your Redis directory and start the server to restore Redis data.

Use CONFIG command of Redis as shown below.

Redis Backup 3

The Redis server is installed in the following directory.


BGSAVE Command

There is an alternate command named BGSAVE which is used to create Redis backup.

This command will start the backup process and run this in the background.



Redis Backup 4
Next TopicRedis Security

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA