Skip to content

Commit

Permalink
Update backup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin authored Sep 30, 2024
1 parent cb9d3d9 commit 9b45856
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,23 @@ case $BACKUP_SOURCE in

esac

# Upload the backup to Proxmox backup client
proxmox-backup-client backup $BACKUP_ID.pxar:/app/backup --backup-id "$BACKUP_ID" --ns "$PBC_NAMESPACE" --change-detection-mode=${CHANGE_DETECTION_MODE:legacy} --skip-lost-and-found

if [ "$FOLDERS_SEPERATELY" = "true" ]; then
find /app/backup -mindepth 1 -maxdepth 1 -type d | while read folder; do
folder_name=$(basename "$folder")
proxmox-backup-client backup "$BACKUP_ID-$folder_name.pxar:/app/backup/$folder_name" \
--backup-id "$BACKUP_ID-$folder_name" \
--ns "$PBC_NAMESPACE" \
--change-detection-mode="${CHANGE_DETECTION_MODE:-legacy}" \
--skip-lost-and-found
done
else
proxmox-backup-client backup "$BACKUP_ID.pxar:/app/backup" \
--backup-id "$BACKUP_ID" \
--ns "$PBC_NAMESPACE" \
--change-detection-mode="${CHANGE_DETECTION_MODE:-legacy}" \
--skip-lost-and-found
fi

# Send a status update
if [ -n "$status_url" ]; then
Expand Down

0 comments on commit 9b45856

Please sign in to comment.