Redis Basics
Redis Commands
Redis Advanced
Redis Useful Resources
Selected Reading
Redis Commands
- Redis - Server
- Redis - Connections
- Redis - Scripting
- Redis - Transactions
- Redis - Publish Subscribe
- Redis - HyperLogLog
- Redis - Sorted Sets
- Redis - Sets
- Redis - Lists
- Redis - Hashes
- Redis - Strings
- Redis - Keys
- Redis - Commands
Redis Advanced
- Redis - Php
- Redis - Java
- Redis - Partitioning
- Redis - Pipelining
- Redis - Client Connection
- Redis - Benchmarks
- Redis - Security
- Redis - Backup
Redis Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Redis - Backup
Redis - Backup
Redis SAVE command is used to create a backup of the current Redis database.
Syntax
Following is the basic syntax of redis SAVE command.
127.0.0.1:6379> SAVE
Example
Following example creates a backup of the current database.
127.0.0.1:6379> SAVE OK
This command will create a dump.rdb file in your Redis directory.
Restore Redis Data
To restore Redis data, move Redis backup file (dump.rdb) into your Redis directory and start the server. To get your Redis directory, use CONFIG command of Redis as shown below.
127.0.0.1:6379> CONFIG get dir 1) "dir" 2) "/user/tutorialspoint/redis-2.8.13/src"
In the output of the above command /user/tutorialspoint/redis-2.8.13/src is the directory, where Redis server is installed.
Bgsave
To create Redis backup, an alternate command BGSAVE is also available. This command will start the backup process and run this in the background.
Example
127.0.0.1:6379> BGSAVE Background saving startedAdvertisements