subDesTagesMitExtraKaese 2 mesiacov pred
rodič
commit
93a671adce
2 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 2 1
      .gitignore
  2. 2 1
      run_backup.sh

+ 2 - 1
.gitignore

@@ -1,2 +1,3 @@
 .env
-keys/
+keys/
+exclude.txt

+ 2 - 1
run_backup.sh

@@ -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