Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Backup script is returning access errors today

Admin Jira SQS
April 21, 2026

I changed the token last friday in the morning, then I executed my Jira backup script, and it worked.

But since tonight it is returning:

{"error":"This feature is only accessible from the UI."}

For instance, when I try to access to 
https://<my site>.atlassian.net/rest/backup/1/export/lastTaskId 
then I get that error message. I have tested it with 2 different sites, and both are returning que message.

Is anyone else having this issue?

My backup script is:


#General backup settings

$username = '<my_admin_acount@my_domain.es' # username with domain something@domain
$token = 'my_token' # Token created from product https://id.atlassian.com/manage-profile/security/api-tokens
$destination = 'C:\My_folder\Backup' # Location on server where script is run to dump the backup zip file.
$attachments = 'true' # Tells the script whether or not to pull down the attachments as well
$cloud = 'true' # Tells the script whether to export the backup for Cloud or Server
$today = Get-Date -format yyyyMMdd-hhm
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;

if(!(Test-Path -path $destination)){
write-host "Folder is not present, creating folder"
mkdir $destination #Make the path and folder is not present
}
else{
write-host "Path is already present"
}

#Convert credentials to base64 for REST API header
function ConvertTo-Base64($string) {
$bytes = [System.Text.Encoding]::UTF8.GetBytes($string);
$encoded = [System.Convert]::ToBase64String($bytes);
return $encoded;
}

$b64 = ConvertTo-Base64($username + ":" + $token);
$auth = $b64;

$string = "cbAttachments:true, exportToCloud:true"
$stringbinary = [system.Text.Encoding]::Default.GetBytes($String) | %{[System.Convert]::ToString($_,2).PadLeft(8,'0') }

$body = @{
cbAttachments=$attachments
exportToCloud=$cloud
}
$bodyjson = $body | ConvertTo-Json

if ($PSVersionTable.PSVersion.Major -lt 4) {
throw "Script requires at least PowerShell version 4. Get it here: https://www.microsoft.com/en-us/download/details.aspx?id=40855"
}

# Create header for authentication
[string]$ContentType = "application/json"

#Create Header
$header = @{
"Authorization" = "Basic "+$auth
"Content-Type"="application/json"
}

# Specific backup settings for every jira/confluence

$account = 'my_site_name' # Atlassian subdomain i.e. whateverproceeds.atlassian.net

# Create header for authentication
[string]$URI = "https://$account.atlassian.net/rest/backup/1/export/runbackup"

# Request backup
try {
$InitiateBackup = Invoke-RestMethod -Method Post -Headers $header -Uri $URI -ContentType $ContentType -Body $bodyjson -Verbose | ConvertTo-Json -Compress | Out-Null
} catch {
$InitiateBackup = $_.Exception.Response.GetResponseStream()
$reader = New-Object System.IO.StreamReader($InitiateBackup)
$reader.BaseStream.Position = 0
$reader.DiscardBufferedData()
$responseBody = $reader.ReadToEnd();
}

$responseBody

$GetBackupID = Invoke-RestMethod -Method Get -Headers $header -Uri https://$account.atlassian.net/rest/backup/1/export/lastTaskId
$LatestBackupID = $GetBackupID


# Wait for backup to finish
do {
$status = Invoke-RestMethod -Method Get -Headers $header -Uri https://$account.atlassian.net/rest/backup/1/export/getProgress?taskId=$LatestBackupID
$statusoutput = $status.result
$separator = ","
$option = [System.StringSplitOptions]::None
$s

if ($status.progress -match "(\d+)") {
$percentage = $Matches[1]
if ([int]$percentage -gt 100) {
$percentage = "100"
}
Write-Progress -Activity 'Creating backup' -Status $status.progress -PercentComplete $percentage
}
Start-Sleep -Seconds 5
} while($status.status -ne 'Success')

# Download
if ([bool]($status.PSObject.Properties.Name -match "failedMessage")) {
throw $status.failedMessage
}

$BackupDetails = $status.result
$BackupURI = "https://$account.atlassian.net/plugins/servlet/$BackupDetails"

Invoke-WebRequest -Method Get -Headers $header -WebSession $session -Uri $BackupURI -OutFile (Join-Path -Path $destination -ChildPath "$account-backup-$today.zip")


 

 

And this is its current output:

PS C:\WINDOWS\system32> C:\My_folder\Backup\Backup_jira.ps1
Path is already present
DETALLADO: POST with -1-byte payload
{"error":"This feature is only accessible from the UI."}
Invoke-RestMethod : Error en el servidor remoto: (403) Prohibido.
En C:\My_folder\Backup\Backup_jira.ps1: 71 Carácter: 16
+ ... tBackupID = Invoke-RestMethod -Method Get -Headers $header -Uri https ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Invoke-RestMethod : Error en el servidor remoto: (403) Prohibido.
En C:\My_folder\Backup\Backup_jira.ps1: 77 Carácter: 15
+ ... $status = Invoke-RestMethod -Method Get -Headers $header -Uri https ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

 

1 answer

1 accepted

0 votes
Answer accepted
Mike - Founder at Rewind
Atlassian Partner
April 21, 2026

Hi Admin - Atlassian has deprecated the backup APIs so your script will no longer work.

https://community.atlassian.com/forums/Jira-questions/Backup-Manager-API-deprecation-is-there-going-to-be-a/qaq-p/3120079#:~:text=David%20Malko,alternative%20for%20Standard%20plan%20users: has more details on it.

If you need to continue to do this automatically, you can use a third party app like Rewind (disclosure I'm the CEO). We're working on an API that would allow you to maintain your current functionality - it will be ready this quarter.

Chris Grant
April 23, 2026

It sure was nice of Atlassian to send an EMAIL notice BEFORE they crippled our risk management implementation!

Like Simon Ferrett likes this
Simon Ferrett
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 3, 2026

Hi Mike -

Does Rewind use a documented api to do the backup automation, or is it some kind of secret one only for partners?  

I'm struggling to understand why a 3rd party app is needed for a basic like this.

Cheers,

Simon

Mike - Founder at Rewind
Atlassian Partner
May 4, 2026

Hi Simon

  Rewind uses public APIs but not the backup APIs that others were using. We use the public apis for each resource. That means we track each individual item compared to the snapshot that the backup APIs were providing. 
   For customers that means they can roll back one item rather than having to lose the work that’s happened since the backup. One Jira issue. One confluence page. One Jira project etc…. Doesn’t matter - we bring back whatever is causing problems and leave the rest of the data in tact. 
   You could build this yourself as well - but it’s difficult to map the API, understand it well enough to restore dependent items, and and keep it up to date with API changes. 
  Hope that helps explain the difference. Let me know if you have other questions. 

Mike

Simon Ferrett
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 4, 2026

Got it - thanks for the comprehensive reply, I appreciate the detail.  Sounds like it's a bit more than a simple backup/restore.

 

Cheers,

Simon

Mike - Founder at Rewind
Atlassian Partner
May 5, 2026

Yes a bit more than simple backup and restore. And this week we announced the release of Hot Standby, allowing you to replicate your data in another region. 


We're a team of 100 people - you don't get to this size building simple backup and restore products.  Rewind seems easy - the best solutions are often things that make hard things seem easy.
Mike

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events