Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
294 B

#!/bin/sh
set -e
DEST=/home/lbkp/redis
[ -d $DEST ] || mkdir -p $DEST
echo "Saving dump.rdb"
/usr/bin/redis-cli save
for FILE in dump.rdb appendonly.aof; do
if [ -e /var/lib/redis/$FILE ]; then
echo "Copying /var/lib/redis/$FILE to $DEST"
cp /var/lib/redis/$FILE $DEST/
fi
done