diff --git a/app/sbin/borgpush b/app/sbin/borgpush index 172faec..0e6ab55 100755 --- a/app/sbin/borgpush +++ b/app/sbin/borgpush @@ -10,13 +10,18 @@ HOSTNAME=$(hostname) DATE=$(date +%Y-%m-%d_%H-%M-%S) ARCHIVE_NAME="${HOSTNAME}-${DATE}" -shopt -s globstar -borg create \ +# Resolve symlinks externally and feed real paths to borg via --paths-from-stdin. +# - First find: locates all current* symlinks under /BACKUP and resolves them with realpath. +# - Second find: locates all regular current* files under /BACKUP (non-symlinks). +# - sort -u: deduplicates in case a resolved symlink target overlaps with a regular file. +{ + find /BACKUP -name 'current*' -type l -print0 | xargs -0 -I {} realpath {} + find /BACKUP -name 'current*' ! -type l +} | sort -u | borg create \ --verbose \ --stats \ --compression lz4 \ - --follow-symlinks \ - ::$ARCHIVE_NAME \ - /BACKUP/**/current* + --paths-from-stdin \ + ::$ARCHIVE_NAME echo "Backup completed: $ARCHIVE_NAME" diff --git a/app/vault/host_vars.img b/app/vault/host_vars.img index 9ce2d1e..b2c2bcc 100644 Binary files a/app/vault/host_vars.img and b/app/vault/host_vars.img differ