Search code examples
redisbackup

How do I create a backup of a remote Redis instance?


I'd like to make a backup of the data in a remote Redis instance. But I do not have SSH access to the server that the Redis instance lives on. (Otherwise, I could copy out the .aof or .rdb-file)

How do I create a backup in this case?


Solution

  • You can use the --rdb <filename> argument to the redis-cli command-line tool:

    redis-cli -u 'redis://<username>:<password>@<hostname>:<port>' --rdb your_backup.rdb
    

    Reference: https://redis.io/topics/rediscli#remote-backups-of-rdb-files