Redis
GoBackup uses redis-cli utility to export a Redis instance into a dump.rdb file.
Install tool
You must install redis-cli utility first.
On Ubuntu Server you can use the following command:
$ sudo apt install redisConfig keys
type: redis
mode- Redis dump mode, default:copysync- For remote Redis server use sync to export.copy- For local Redis server use copy, just copy Redisdump.db
host- Redis server host, if use host, default:127.0.0.1port- Redis server port, default:6379socket- Redis server, if use socket, for example:/var/run/redis/redis.sock, default: ``invoke_save- Invoke save before backup, default:truepassword- If your Redis server need, default: ``rdb_path-mode: copyneed special this config, default:/var/lib/redis/dump.rdbargs- Additional options forredis-cliutility, for example:--tls --cacert redis_ca.pem
https://github.com/gobackup/gobackup/blob/main/database/redis.go (opens in a new tab)
Example
models:
my_app:
databases:
my_app:
type: redis
mode: sync
rdb_path: /var/db/redis/dump.rdb
invoke_save: true
password: 123456
args: --tls --cacert redis_ca.pem