Fixed rsync error due to owner/group permissions on external drive file system.
This commit is contained in:
+3
-3
@@ -46,8 +46,8 @@ fi
|
||||
|
||||
# Check if the destination directories exist and create them if they don't.
|
||||
# This prevents rsync from failing on the first run.
|
||||
mkdir -p "$BACKUP_DESTINATION"
|
||||
mkdir -p "$PHOTOS_DESTINATION"
|
||||
# mkdir -p "$BACKUP_DESTINATION"
|
||||
# mkdir -p "$PHOTOS_DESTINATION"
|
||||
|
||||
# ==============================================================================
|
||||
# Home Assistant backup
|
||||
@@ -68,7 +68,7 @@ else
|
||||
curl -H "Authorization: Bearer $NTFY_TOKEN" -d "Error: No files found in Home Assistant backup directory." "$NTFY_SERVER/$NTFY_TOPIC" > /dev/null 2>&1
|
||||
else
|
||||
FULL_BACKUP_PATH="$HOMEASSISTANT_BACKUP_SOURCE_DIR/$LATEST_BACKUP_FILE"
|
||||
rsync -av --progress "$FULL_BACKUP_PATH" "$HOMEASSISTANT_DESTINATION"
|
||||
rsync -av --no-owner --no-group --progress "$FULL_BACKUP_PATH" "$HOMEASSISTANT_DESTINATION"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Success: Most recent Home Assistant backup '$LATEST_BACKUP_FILE' copied to '$HOMEASSISTANT_DESTINATION'."
|
||||
curl -H "Authorization: Bearer $NTFY_TOKEN" -d "Success: Home Assistant backup copied to $HOMEASSISTANT_DESTINATION" "$NTFY_SERVER/$NTFY_TOPIC" > /dev/null 2>&1
|
||||
|
||||
Reference in New Issue
Block a user