@@ -1,2 +1,3 @@
.env
-keys/
+keys/
+exclude.txt
@@ -19,7 +19,8 @@ done)
# If we have valid directories, run the backup
if [ -n "$EXISTING_DIRECTORIES" ]; then
echo "Backing up directories: $EXISTING_DIRECTORIES"
- sudo -E borg create --stats "$SERVER_USER@$SERVER_IP:$REPOSITORY::{hostname}-{now}" $EXISTING_DIRECTORIES
+ touch exclude.txt
+ sudo -E borg create --verbose --filter AME --list --stats --compression zstd,10 --exclude-caches --exclude-from exclude.txt "$SERVER_USER@$SERVER_IP:$REPOSITORY::{hostname}-{now}" $EXISTING_DIRECTORIES
if [ $? -ne 0 ]; then
echo "Borg backup failed."
exit 1