Can't Download Large Files from Cloud WebDAV

Symptoms

The file downloaded from WebDAV is incomplete or corrupted.

Cause

Due to architecture limitations the download automatically ceases after 15 minutes (around 1GB of data).

Workarounds

Use Firefox's DownloadThemAll extension.


Use wget:

wget -t 0 --user="MYUSER" --password="MYPASS" https://example.atlassian.net/webdav/backupmanager/Application-backup-20130509.zip


If wget is not available, use the following Bash script:

#!/bin/bash -u

if [[ $# < 1 ]]; then
	echo "Usage: ${0} FILENAME";
	echo "Where FILENAME is the name of the file produced by Cloud's backup manager (e.g. 'JIRA-backup-20121005.zip')."
	exit 1;
fi

BACKUP_FILE="${1}"
MY_HOST="test.atlassian.net"
USERNAME="myusername"
PASSWORD="mypassword"
URL="https://${MY_HOST}/webdav/backupmanager/${BACKUP_FILE}"


# Detect total file size
FILE_SIZE=$(curl -s --head -u "${USERNAME}:${PASSWORD}" "${URL}" | grep -i '^Content-Length:' | awk '{ print $2 }' | tr -d [[:space:]])


while [[ ! -f "${BACKUP_FILE}" || $(ls -al "${BACKUP_FILE}" | awk '{ print $5 }') -lt ${FILE_SIZE} ]]; do
	curl -k -u "${USERNAME}:${PASSWORD}" -C - -o "${BACKUP_FILE}" "${URL}";
	sleep 5;
done;

Resolution

See CLOUD-5975 - Large backup downloads time out, causing incomplete files. for further details






Last modified on Jan 30, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.