Skip to Content
Atlassian Confluenceacs2mdv1.0.xCheck Against a Backup

Check Against a Backup

space check compares a backup taken with space get with the space as Confluence holds it now, and reports the difference page by page. It only reads: nothing changes in Confluence or in the backup.

Use it to verify that a backup is still a faithful copy, to see what a restore would bring back before running one, or to make a scheduled job fail when a governed space drifts from its reference copy.

Available from acs2md v1.0.12.

Check by key

acs2md space check by-key SPACE_KEY --backup-dir DIR [flags]

Aliases: key, k — the check command itself also answers to verify and diff.

--backup-dir is the directory space get wrote to: its --output-dir, or <output-dir>/<space-key>.

Examples

# Compare the live space with its backup acs2md space check by-key DEVOPS --backup-dir ./backups # Compare page bodies too, not only versions (one API call per page) acs2md space check by-key DEVOPS --backup-dir ./backups --deep # Every page as JSON, for a report or a script acs2md space check by-key DEVOPS --backup-dir ./backups --all -f json > check.json # Fail a scheduled job when the space drifted from the backup acs2md space check by-key DEVOPS --backup-dir ./backups --fail-on-drift

Flags

FlagShortDefaultDescription
--backup-dir——Backup to compare with: the --output-dir of space get
--deep—falseCompare page bodies too (one API call per page)
--all—falseList pages that match the backup too
--format-ftableOutput format: table or json
--fail-on-drift—falseExit with an error when anything differs
--concurrency—4Lookups run at once (extra API calls)

Example output

🧾 Backup: ./backups/DEVOPS (manifest, storage, last updated 2026-10-31 10:17) 🌐 Live: DevOps (DEVOPS) on mycompany.atlassian.net 📄 Pages: 300 in the backup — 1 missing, 1 trashed, 1 archived, 1 changed, 1 renamed, 1 extra, 295 ok 📁 Folders: 15 in the backup — 1 renamed, 14 ok ┌──────────┬────────┬────────────┬──────────────────────┬────────┬──────┬───────────────────────────────────┐ │ STATE │ KIND │ ID │ TITLE │ BACKUP │ LIVE │ DETAIL │ ├──────────┼────────┼────────────┼──────────────────────┼────────┼──────┼───────────────────────────────────┤ │ missing │ page │ 3134096570 │ Legacy Deploy Notes │ v11 │ │ not in Confluence: purged, or … │ │ trashed │ page │ 3134096571 │ Update DataLake │ v13 │ v4 │ in the space's trash │ │ archived │ page │ 3134096572 │ Environment Variables│ v28 │ v11 │ archived │ │ changed │ page │ 3134096573 │ Ingestion Flow │ v66 │ v67 │ live v67 is newer than backup v66 │ │ renamed │ page │ 3134096574 │ Release Checklist │ v6 │ v6 │ now titled "Release Checklist v2" │ │ extra │ page │ 3134096575 │ Firehose Workflow │ │ v7 │ not in the backup │ │ renamed │ folder │ 5989695572 │ Explanation │ │ │ now titled "Explanations" │ └──────────┴────────┴────────────┴──────────────────────┴────────┴──────┴───────────────────────────────────┘ ⚠️ 7 difference(s) between the backup and Confluence.

Progress messages go to stderr, so -f json output can be piped as it is.


Check by ID

acs2md space check by-id SPACE_ID --backup-dir DIR [flags]

Aliases: id

The flags and behaviour mirror space check by-key.


Page states

A page can be in more than one state at once, for example changed and renamed.

StateMeaning
okConfluence holds the version the backup holds
changedThe live version differs. With --deep, also a page whose version is the same but whose body is not
renamedThe live title differs
movedThe live parent differs (needs a backup with a manifest)
trashedThe page is in the space’s trash
archivedThe page is archived
elsewhereThe page now lives in another space
missingConfluence no longer has it: purged, or not visible to these credentials. Confluence’s API cannot tell the two apart
extraA live page the backup does not hold

Folders are compared the same way, and so are the space’s name and homepage.

Older backups

A backup with .backup-manifest.json — every backup space get takes from v1.0.12 on — is compared in full. Older backups are still compared, as far as they allow:

  • With a .get-sync-state.json (the default --incremental mode): pages are matched by ID and version. Parents are inferred from the folder layout, so moves are not reported.
  • With page files only: pages are matched by the file name space get derives from each title, so renames cannot be told.

The report says which kind of backup it read and what that backup could not record.

After a restore

A page that space restore recreated has a new ID. space check reads the restore’s progress file in the backup, so restored pages and folders are matched to their originals and reported as ok, with “restored as page …” in the detail.

Use cases

  • Backup verification — confirm after a scheduled space get that the copy is complete and current.
  • Incident triage — see what was deleted, trashed or edited since the last good backup before deciding to restore.
  • Governance and drift alerts — run nightly with --fail-on-drift against a reference backup of a controlled space.
  • Restore preview — the pages space check reports as missing, trashed or archived are what space restore brings back by default.
Last updated on