{
  "id": "backup-cleanup",
  "title": "BACKUP CLEANUP",
  "url": "https://redis.io/docs/latest/commands/backup-cleanup/",
  "summary": "Remove sealed backup files and return to idle.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-07-30T08:54:30-07:00",
  "page_type": "content",
  "content_hash": "e156959240fb4ead2fc3bb15f9603c517642e8f80b51d19d50546a82879577e7",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Removes sealed backup files and returns the backup state machine to idle."
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "details",
      "title": "Details",
      "role": "content",
      "text": "`BACKUP CLEANUP` removes the sealed (or failed) backup artifacts and releases the files that were pinned by hard links, moving the backup state machine from `sealed` back to `idle`. Call it after the data plane has finished copying the files reported by [`BACKUP LIST`](https://redis.io/docs/latest/commands/backup-list).\n\nBy default a sealed backup is kept until you clean it up explicitly. If the `backup-sealed-ttl` configuration setting is non-zero, Redis automatically cleans up a sealed backup after the configured number of seconds; a value of `0` disables automatic cleanup.\n\nFor the full workflow, see [Redis persistence](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence#online-backups-with-the-backup-command-family)."
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`."
    },
    {
      "id": "see-also",
      "title": "See also",
      "role": "related",
      "text": "[`BACKUP START`](https://redis.io/docs/latest/commands/backup-start/) | [`BACKUP SEAL`](https://redis.io/docs/latest/commands/backup-seal/) | [`BACKUP STATUS`](https://redis.io/docs/latest/commands/backup-status/) | [`BACKUP LIST`](https://redis.io/docs/latest/commands/backup-list/) | [`BACKUP ABORT`](https://redis.io/docs/latest/commands/backup-abort/)"
    },
    {
      "id": "related-topics",
      "title": "Related topics",
      "role": "related",
      "text": "- [Redis persistence](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence)"
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "127.0.0.1:6379> BACKUP CLEANUP\nOK",
      "section_id": "examples"
    }
  ]
}
