Atlassian Deletes 883 Customer Sites
A cleanup script was handed site IDs instead of app IDs and deleted whole customer sites. Some took 14 days to restore.
- Severity
- Status page turned red
- Difficulty
- beginner
- Companies
- Atlassian
- Tech
- Jira, Confluence, Multi-tenant SaaS, Backups, Disaster recovery
- Root cause
- operator mistake
The story
Quick (1 min)
On 5 April 2022, 775 Atlassian customers lost access to Jira, Confluence and other tools. For some it lasted up to 14 days.
Atlassian needed to remove an old app from customer sites. One team asked another team to run a deletion script, but passed the IDs of the whole customer sites instead of the IDs of the app. The deletion tool accepted either kind of ID without asking which it was, so it deleted 883 entire sites in 23 minutes.
Atlassian had backups, and no customer lost more than five minutes of data. But its recovery process was built for restoring one or two customers, not hundreds at once inside shared databases, so restoring everyone took nearly two weeks.
The lesson: dangerous operations should double-check what they're about to delete, and you need to practise recovering at large scale.
Keep reading to the end to earn XP.Read. XP earned.
Engineer (2 min)
Why a script was running. Atlassian had folded the "Insight – Asset Management" app into Jira Service Management and needed to delete the standalone legacy app from sites that had it.
Two failures:
- Communication gap. The team requesting the deletion gave the running team the IDs of entire cloud sites, not the app IDs.
- No safety signal. The deletion API "accepted both site and app identifiers and assumed the input was correct". A site ID deleted a site and an app ID deleted an app, with no confirmation of which.
Review and testing missed it. The script went through peer review, which focused on which endpoint was called and how, not whether the IDs were app IDs or site IDs. It was tested in staging, which couldn't have caught wrong production IDs. A first production run on 30 sites worked fine because those IDs had been gathered correctly. The next run, on 883 sites, used the wrong IDs and ran from 07:38 to 08:01 UTC.
Detection. Internal monitoring didn't notice, because the sites were deleted through a standard workflow. The first customer ticket arrived at 07:46. The incident was declared at 08:17, made critical at 08:24, and the cause found at 08:53.
Why recovery took up to 14 days. Backups support point-in-time recovery, but each data store is multi-tenant: shared with customers still using it. Restoring meant carefully extracting and replaying individual customers' data. "Restoration 1" took about 48 hours per batch and recovered 53% of users. "Restoration 2" re-created records using the old site identifiers, which removed over half the steps. The script also deleted customer contact records, so affected admins couldn't even file normal support tickets.
Interview takeaway: soft-delete by default, make destructive APIs confirm what they're acting on, and practise restoring many tenants at once.
Keep reading to the end to earn XP.Read. XP earned.
Deep dive (2 min)
Timeline (from Atlassian's post-incident review)
- Before 5 April: a first production run deletes the Insight app from 30 sites successfully. Those IDs pre-dated the miscommunication.
- 5 Apr 07:38 UTC: the next run starts against 883 sites, using site IDs. Sites are deleted one after another.
- 07:46: first support ticket from an affected customer.
- 08:01: the script finishes.
- 08:17: major incident process triggered; 08:24: escalated to critical.
- 08:53: the Insight script is confirmed as the cause; malicious activity or cyberattack ruled out.
- 09:03: first Statuspage update; 11:13: root cause identified publicly.
- 8 Apr: first customers restored.
- 9 Apr: "Restoration 2" proposed, since Restoration 1 would have taken three weeks for everyone.
- 12 Apr: CTO Sri Viswanath publishes technical details.
- 18 Apr: all customer sites restored.
Scale
883 sites were deleted. 775 customers were affected (by Atlassian's official customer definition). Over 99.6% of customers and users were not disrupted.
Data loss
Point-in-time backups (30-day retention) were restored to five minutes before deletion. For 57 customers restored early, inconsistent manual processes restored some Confluence and Insight databases to earlier points. Atlassian found this in a post-restoration audit and recovered the remaining data.
Why "we have backups" wasn't enough
"Using these backups, we regularly roll back individual customers or a small set of customers who accidentally delete their own data. However, the site-level deletion did not have runbooks that could be quickly automated for the scale of this event."
"What we have not (yet) automated is restoring a large subset of customers into our existing (and currently in use) environment without affecting any of our other customers."
Selected changes Atlassian committed to
- Prohibit deleting an entire site and move to soft delete: data is only removed from production after a retention period.
- Standardised, verified reviews for soft-delete actions, with staged rollouts (Atlassian's own sites first) and a tested rollback plan before running in production.
- Automate disaster recovery for multi-site, multi-product deletion events.
- Fix how customer identifiers and contacts are stored, so affected customers can still be reached and supported.
Keep reading to the end to earn XP.Read. XP earned.
Failure replay
Step by step, what broke and what it hit next. Showing the key steps. Switch to Engineer or Deep dive for every step.
- PlanningRequesting teamdegraded
To remove a legacy app, the requesting team hands over a list of IDs, but they're whole-site IDs, not app IDs.
Affects: Deletion script
- Earlier runDeletion scripthealthy
A first run on 30 sites works, because those IDs were collected correctly. Confidence grows.
- 07:38 UTCDeletion scriptfailing
The next run starts on 883 sites. The API accepts site IDs without asking what kind of deletion is intended.
Affects: Customer sites
- 07:38–08:01Customer sitesdown
Entire sites are deleted one by one, with customer contacts too. Monitoring sees normal workflows and stays silent.
Affects: Customers
- 07:46Customersdown
The first customer ticket arrives. Some admins can't even file tickets because their contact records are gone.
- 08:53Incident teamdegraded
The cause is confirmed within an hour. But there's no automated way to restore hundreds of sites into shared databases.
Affects: Backups
- Apr 5–14Backupsrecovering
Restoration 1 rebuilds sites in batches of about 48 hours each, recovering 53% of users.
Affects: Customer sites
- Apr 9–18Customer sitesrecovering
Restoration 2 reuses old site IDs, removing over half the steps. Every site is back by 18 April.
Affects: Customers
Impact
- Who was affected
- 775 Atlassian cloud customers (883 sites) lost access to products such as Jira and Confluence; over 99.6% of customers were unaffected.
- How long
- Up to 14 days for some customers (5 April to 18 April 2022).
- Cost
- not disclosed (data loss capped at five minutes before deletion, per Atlassian).
Lessons
- Destructive APIs should require the caller to state exactly what kind of object they mean to delete.
- Prefer soft delete with a retention window to permanent deletion in production.
- Code review must check the data (IDs) a script runs on, not just the code.
- Disaster recovery must be practised at the scale of realistic mistakes, including multi-tenant restores.
- Don't let the same failure delete the contact details you need to reach affected customers.
Quiz
Why were entire customer sites deleted?
The answer is The deletion script was given site IDs instead of app IDs, and the API accepted either. A communication gap meant site IDs were supplied, and the API had no check on the type of deletion.
Check answer
The deletion script was given site IDs instead of app IDs, and the API accepted either. A communication gap meant site IDs were supplied, and the API had no check on the type of deletion.
Why didn't Atlassian's monitoring catch the deletions?
The answer is The sites were deleted through a standard workflow, so nothing looked abnormal. The first signal was a customer support ticket at 07:46 UTC.
Check answer
The sites were deleted through a standard workflow, so nothing looked abnormal. The first signal was a customer support ticket at 07:46 UTC.
Why did restoration take up to 14 days even though backups existed?
The answer is Data stores were shared by many customers, and recovery tooling was built for small-scale restores, not hundreds of sites at once. Atlassian had to extract individual customers' data into live, shared stores without affecting other customers.
Check answer
Data stores were shared by many customers, and recovery tooling was built for small-scale restores, not hundreds of sites at once. Atlassian had to extract individual customers' data into live, shared stores without affecting other customers.
What key change did Atlassian commit to?
The answer is Soft delete with a retention period, and prohibiting deletion of an entire site. Soft delete means production data is only removed after a retention window, so mistakes can be undone quickly.
Check answer
Soft delete with a retention period, and prohibiting deletion of an entire site. Soft delete means production data is only removed after a retention window, so mistakes can be undone quickly.
Interview prep
Try answering out loud before you open the model answer.
- system design
Design a safe deletion API for a multi-tenant SaaS platform, using Atlassian's 2022 incident as a cautionary example.
Show model answer
Make the operation explicit and reversible. Separate endpoints or a required type parameter (deleteApp vs deleteSite) so an ID of the wrong kind is rejected. Validate that every ID matches the expected type and show a dry-run summary ("this will delete 883 sites, 0 apps"). Use soft delete with a retention window and staged execution, with internal tenants first and rate limits. Require extra approval for tenant-level deletion. Emit audit events and alert on unusual deletion volume, since Atlassian's monitoring didn't notice because deletion looked normal.
A strong answer hits:
- Type-safe, explicit deletion endpoints
- Dry run with impact summary
- Soft delete with retention
- Staged execution, approvals and volume alerting
How did your answer compare? - system design
Your backups are fine for restoring one customer. What changes when you need to restore hundreds of tenants into a live multi-tenant database?
Show model answer
Restoring a whole database snapshot would overwrite other tenants' current data, so you must extract per-tenant data from backups and merge it into live stores without collisions. That needs per-tenant export and import tooling, stable tenant identifiers (Atlassian sped up by reusing old site IDs), restore of all related systems (identity, billing, catalogue, third-party apps), and parallelism. It also needs validation at scale. All of this should be automated and rehearsed in DR drills at realistic scale.
A strong answer hits:
- Can't roll back shared stores wholesale
- Per-tenant extract and merge tooling
- Stable identifiers and cross-system restore
- Automate and drill at realistic scale
How did your answer compare? - behavioural
A teammate asks you to run a script against production with a list of IDs they provide. What do you check before running it?
Show model answer
Verify the input, not just the code. Confirm what the IDs represent by looking up a sample and checking their type and owner. Run a dry run that reports what will be affected. Start with a small batch and verify the result. Confirm there's a tested rollback. Atlassian's script passed review and a successful 30-site run, but the second list contained site IDs. Ask for the request in writing with clear intent ("delete app X from sites Y") so there's no gap between the requester and the operator.
A strong answer hits:
- Validate IDs against their intended type
- Dry run and small batch first
- Tested rollback plan
- Clear written intent from the requester
How did your answer compare?
Go deeper
- Official postmortemPost-Incident Review on the Atlassian April 2022 outageAtlassian, link checked 2026-11-25