From ba91e8c024c4db169a4188837d761edd403fd98a Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Sat, 4 Jan 2025 16:56:04 +0100 Subject: [PATCH] hopefully --- backup-node.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup-node.sh b/backup-node.sh index 7d8d0fca..209bc0d0 100755 --- a/backup-node.sh +++ b/backup-node.sh @@ -1,7 +1,7 @@ #!/bin/bash if [[ -n $2 ]]; then - echo "upload backup via webdav" + echo "upload backup via webdav to $2" else if [ ! -d "$backup_dir" ]; then echo "Error: /backup directory does not exist" @@ -40,8 +40,8 @@ for key in $keys; do #echo "$target_file" if [[ -n $2 ]]; then - tar -cf - "$source_folder" | pv -pterb -s $(du -sb "$source_folder" | awk '{print $1}') | zstd | curl -X PUT --data-binary @- "https://$2.stakesquid.eu/dav/null/uploading-$target_file" - curl -X MOVE -H "Destination: https://$2.stakesquid.eu/dev/null/$target_file" "https://$2.stakesquid.eu/dav/null/uploading-$target_file" + tar -cf - "$source_folder" | pv -pterb -s $(du -sb "$source_folder" | awk '{print $1}') | zstd | curl -X PUT --data-binary @- "$2/uploading-$target_file" + curl -X MOVE -H "Destination: $2/$target_file" "$2/uploading-$target_file" else tar -cf - "$source_folder" | pv -pterb -s $(du -sb "$source_folder" | awk '{print $1}') | zstd -o "/backup/uploading-$target_file" mv "/backup/uploading-$target_file" "/backup/$target_file"