Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,557,650
Community Members
 
Community Events
184
Community Groups

Cloud back-up corrupted using windows task scheduler

Hello, 

We are trying to accomplish the following:

Scenario - 

Automate the creation and removal of the backup file from the Atlassian cloud sites (JSW/Confluence) for rollback purposes, etc.    

Issue - 

Scenario I

Initiating the backup-jira-api-token.psi script from https://bitbucket.org/atlassianlabs/automatic-cloud-backup/src/master/.  Each time we run this script with Windows task scheduler the script will execute and download the backup.  However, the file is approximately half the size of a manually downloaded file and is corrupted.    

Scenario II

If we run the powershell script manually, the file downloads and is the expected size and is not corrupted. 

Root cause -

Unknown.

Could this be related to the scheduled task timing out?

 

Thank you in advance for any recommendations or thoughts you have with this issue.  

Thanks,

Aaron

2 answers

I had the same issue: manually in PowerShell ISE downloading is fast (approx. 150 Mbits) without interruption, in TeamCity script always downloads corrupted archive with "Received an unexpected EOF or 0 bytes from the transport stream". I noticed that the download speed in that case is much lower, approx. 4 Mbits. And I found the root cause:

turning off the progress bar did it for me. Progress bar can significantly impact cmdlet performance.
https://stackoverflow.com/questions/28682642/powershell-why-is-using-invoke-webrequest-much-slower-than-a-browser-download

$ProgressPreference = 'SilentlyContinue'
or
Set-Variable ProgressPreference SilentlyContinue; Invoke-WebRequest ...

I am working with Aaron on this wanted to add what we see in the script running with task scheduler 

 

PS>TerminatingError(Invoke-WebRequest): "Received an unexpected EOF or 0 bytes from the transport stream."
Invoke-WebRequest : Received an unexpected EOF or 0 bytes from the transport stream.
At C:\scripts\Atlassian_Cloud_Backup\jiracloudbkup.ps1:96 char:1
+ Invoke-WebRequest -Method Get -Headers $header -WebSession $session - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Invoke-WebRequest : Received an unexpected EOF or 0 bytes from the transport stream.
At C:\scripts\Atlassian_Cloud_Backup\jiracloudbkup.ps1:96 char:1
+ Invoke-WebRequest -Method Get -Headers $header -WebSession $session - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.InvokeWebRequest
Command

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events