Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
###############################
# Author: Matthis B. #
# Created: 20201105 #
# Lastchange: 20201119 #
# Lastchange: 20250804 #
###############################
# Changelog: #
# - 20201105: init #
# - 20201107: small changes #
# - 20201119: bug fixes #
# - 20250804: use RedisPass #
###############################

##
Expand Down Expand Up @@ -158,17 +159,20 @@ else
fi

# backup database: redis
# 20250804: Password required - added
echo "--- redis-dump"
redis_id=$(docker ps -qf name=redis-mailcow)
redis_dump=$(docker exec $redis_id redis-cli save)
if [[ "$redis_dump" == "OK" ]]; then
redis_passwd=$(docker exec $redis_id cat /redis.conf | grep requirepass | cut -d" " -f2-)
redis_dump=$(docker exec $redis_id redis-cli --pass $redis_passwd save)
if [[ "$redis_dump" =~ "OK" ]]; then
echo "---- success"
else
echo "---- FAILED: $redisdump"
echo "---- FAILED: $redis_dump"
fi




#
# BackupProcess
#
Expand Down