Skip to content

Instantly share code, notes, and snippets.

@alshell7
Created January 28, 2021 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alshell7/a929c90f28383de853f43486a6f5f74e to your computer and use it in GitHub Desktop.
Save alshell7/a929c90f28383de853f43486a6f5f74e to your computer and use it in GitHub Desktop.
Backup Redis from Redis Docker Container

docker exec -it redis_server bash redis_server is name of docker container

chown redis:redis -R /etc making sure if the redis server has permissions to write

redis-cli > save enter the cli and save

cp /etc/crontab /tmp/backup.rdb copy from default location of redis docker dump to tmp

docker cp f47052fdc525:/tmp/backup.rdb /tmp/backup.rdb f47052fdc525 is the container id

docker run -v /tmp:/tmp -p 8180:8080 --rm -it svenaro/miniserve /tmp run file server on port 8180 of the host

Make sure the IP address whitelisted

Access the ip address, http://IP:8180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment