From 8d2a882507ca50b5d9b2b2b6c9dbaf1a04bc0212 Mon Sep 17 00:00:00 2001 From: julien Date: Sun, 19 Jan 2025 17:56:01 +0100 Subject: [PATCH] fixed socket list --- sbin/vol-backup | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/vol-backup b/sbin/vol-backup index 1491dd1..4931a5c 100755 --- a/sbin/vol-backup +++ b/sbin/vol-backup @@ -25,8 +25,11 @@ if [ -d "volumes" ]; then nerdctl exec -e PGPASSWORD=$DB_PASSWORD $CONTAINER_NAME pg_dump -U $DB_USER $DB_NAME > volumes/$DUMP_NAME fi - # Compress all volumes excerpt mysql and postgres + # List sockets to exclude find . -type s -print > /tmp/sockets-to-exclude + sed -i 's/volumes\///g' /tmp/sockets-to-exclude + + # Compress all volumes excerpt mysql and postgres BACKUP=${PWD##*/}.tar.zst tar -X /tmp/sockets-to-exclude --exclude='mysql' --exclude='postgres' --zstd -cf /tmp/$BACKUP -C volumes .