Configuration
Databases
Redis

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 redis

Config keys

type: redis

  • mode - Redis dump mode, default: sync
    • sync - For remote Redis server use sync to export.
    • copy - For local Redis server use copy, just copy Redis dump.db
  • host - Redis server host, if use host, default: 127.0.0.1
  • port - Redis server port, default: 6379
  • socket - Redis server, if use socket, for example: /var/run/redis/redis.sock, default: ``
  • invoke_save - Invoke save before backup, default: true
  • password - If your Redis server need, default: ``
  • rdb_path - mode: copy need special this config, default: /var/lib/redis/dump.rdb

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