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 - AOD-5975Getting issue details... STATUS for further details