{"record":{"id":"bb632bdb92bb084e","repo":"appsmithorg/appsmith","slug":"could-not-find-the-contents-of-the-backup-archive","errorCode":null,"errorMessage":"Could not find the contents of the backup archive.","messagePattern":"Could not find the contents of the backup archive\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/client/packages/rts/src/ctl/restore.ts","lineNumber":446,"sourceCode":"        return path.join(root, subfolder.name);\n      } catch (error) {\n        // Ignore\n      }\n\n      try {\n        // If that fails, look for the MongoDB data archive, since backups from v1.7.x and older won't have `manifest.json`.\n        await fsPromises.access(\n          path.join(root, subfolder.name, \"mongodb-data.gz\"),\n        );\n\n        return path.join(root, subfolder.name);\n      } catch (error) {\n        // Ignore\n      }\n    }\n  }\n\n  throw new Error(\"Could not find the contents of the backup archive.\");\n}\n","sourceCodeStart":428,"sourceCodeEnd":448,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/client/packages/rts/src/ctl/restore.ts#L428-L448","documentation":"Thrown by the restore controller after it walks the extracted backup archive's subfolders looking for either a manifest.json (newer backups) or a mongodb-data.gz (backups from v1.7.x and older). If no subfolder contains either, the archive has unrecognized/unexpected contents and restore aborts because it cannot locate the payload to restore.","triggerScenarios":"Running appsmith restore on an archive whose top-level extracted directory has no subfolder containing manifest.json or mongodb-data.gz — e.g. a manually constructed tarball, a truncated/partial download, an archive from an unsupported layout, or a non-backup tar.gz passed by mistake.","commonSituations":"Operator passes the wrong .tar.gz (e.g. an app export instead of a DB backup); backup upload/download was interrupted leaving a partial archive; archive from a much newer Appsmith whose layout changed; archive re-packed with a different folder structure.","solutions":["Inspect the archive layout before restoring: 'tar -tzf backup.tar.gz' and confirm a subfolder with manifest.json or mongodb-data.gz.","Re-download or regenerate the backup from a known-good source if the archive is truncated.","Match the archive to an Appsmith version that produced it; older layouts need the mongodb-data.gz path.","If migrating layouts, convert/re-pack the archive so a subfolder contains the expected entry before restoring."],"exampleFix":"# before\n$ tar -tzf my.tar.gz | head\n# (no subfolder with manifest.json or mongodb-data.gz)\n$ appsmith restore my.tar.gz  # -> Could not find the contents...\n\n# after\n$ tar -tzf good-backup.tar.gz | grep -E 'manifest.json|mongodb-data.gz'\n# backup_data/manifest.json\n$ appsmith restore good-backup.tar.gz","handlingStrategy":"validation","validationCode":"const { execSync } = require('child_process');\nconst listing = execSync('tar -tzf backup.tar.gz').toString();\nif (!/manifest\\.json|mongodb-data\\.gz/.test(listing)) throw new Error('Archive has no manifest.json or mongodb-data.gz; refusing to restore.');","typeGuard":"const isRecognizedArchive = (listing: string): boolean =>\n  /manifest\\.json|mongodb-data\\.gz/.test(listing);","tryCatchPattern":"try { await restore(archivePath); } catch (e) {\n  if (/Could not find the contents of the backup archive/i.test(e.message)) { /* fetch a known-good archive */ }\n  else throw e;\n}","preventionTips":["Inspect 'tar -tzf' output before invoking restore.","Keep one known-good backup to test the restore pipeline.","Verify archive integrity (size/checksum) after download."],"tags":["backup","restore","archive","filesystem","operations"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}