Backup/Restore Redis databases
In debian platforms Redis store it database in /var/lib/redis/dump.rdb, other platforms might have the same path.
Saving this file is enough for a backup.
Backup steps.
service redis-server stop
cp /var/lib/redis/dump.rdb ~/backups/redis/$(date +%Y%m%d)-redis.rdb
service redis-server start
Restore steps.
service redis-server stop
cp ~/backups/redis/REDIS_BACKUP_FILE.rdb /var/lib/redis/dump.rdb
service redis-server start
Written by Abdelkader Boudih
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Redis
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#