Hello,
I'm having some issues try to create a session and then creating a backup with the rest api through powershell. Below is my code, can anyone see what I'm doing wrong? Appreciate any advice!
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$user = 'austin.luu91@gmail.com'
$pass = #API Token
$pair = "$($user):$($pass)"
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
$basicAuthValue = "Basic $encodedCreds"
$Headers = @{
Authorization = $basicAuthValue
}
Invoke-WebRequest -UseBasicParsing -Method Post -Uri "https://15sof1.atlassian.net/rest/auth/1/session" -Headers $headers -SessionVariable session -ContentType 'application/json'
$InitiateBackup = Invoke-RestMethod -Method Post -Headers @{"Accept"="application/json"} -Uri "https://15sof1.atlassian.net/rest/backup/1/export/runbackup" -WebSession $session -ContentType 'application/json' -Body $bodyjson -Verbose | ConvertTo-Json -Compress | Out-Null
Hello Austin,
We do have a PowerShell script which can be used to backup cloud instances. This script is within Bitbucket and is publicly viewable. Please take a look at the following (You’ll need to add the top variables to your script to make it work).
If you have any issues with this script, please let us know.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Everyone,
We did rename the files used within the scripts to better clarify what products they work with. Since we did that it broke the link above. I have corrected the link above and you should be able to see the available backup scripts by their product now.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stephen Sifers ,
Are we still using the above mentioned scripts or any new method came in for automating Jira cloud backups?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Stephen Sifers
Is there a similar script for data restore?
The import UI has the following:
Seems like there is some amount of manual work that needs to be done?
Typically we won't be deleting data in the entire site, perhaps we want to recover back specific issues, attachments or configuration objects such as workflows etc..
Is there a was we can restore back data in a granular manner using a script?
Thank you for your advice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.