appsmithorg/appsmith · error · Error

Could not find the contents of the backup archive.

Error message

Could not find the contents of the backup archive.

What it means

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.

Source

Thrown at app/client/packages/rts/src/ctl/restore.ts:446

        return path.join(root, subfolder.name);
      } catch (error) {
        // Ignore
      }

      try {
        // If that fails, look for the MongoDB data archive, since backups from v1.7.x and older won't have `manifest.json`.
        await fsPromises.access(
          path.join(root, subfolder.name, "mongodb-data.gz"),
        );

        return path.join(root, subfolder.name);
      } catch (error) {
        // Ignore
      }
    }
  }

  throw new Error("Could not find the contents of the backup archive.");
}

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Inspect the archive layout before restoring: 'tar -tzf backup.tar.gz' and confirm a subfolder with manifest.json or mongodb-data.gz.
  2. Re-download or regenerate the backup from a known-good source if the archive is truncated.
  3. Match the archive to an Appsmith version that produced it; older layouts need the mongodb-data.gz path.
  4. If migrating layouts, convert/re-pack the archive so a subfolder contains the expected entry before restoring.

Example fix

# before
$ tar -tzf my.tar.gz | head
# (no subfolder with manifest.json or mongodb-data.gz)
$ appsmith restore my.tar.gz  # -> Could not find the contents...

# after
$ tar -tzf good-backup.tar.gz | grep -E 'manifest.json|mongodb-data.gz'
# backup_data/manifest.json
$ appsmith restore good-backup.tar.gz
Defensive patterns

Strategy: validation

Validate before calling

const { execSync } = require('child_process');
const listing = execSync('tar -tzf backup.tar.gz').toString();
if (!/manifest\.json|mongodb-data\.gz/.test(listing)) throw new Error('Archive has no manifest.json or mongodb-data.gz; refusing to restore.');

Type guard

const isRecognizedArchive = (listing: string): boolean =>
  /manifest\.json|mongodb-data\.gz/.test(listing);

Try / catch

try { await restore(archivePath); } catch (e) {
  if (/Could not find the contents of the backup archive/i.test(e.message)) { /* fetch a known-good archive */ }
  else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12). Data as JSON: /api/errors/bb632bdb92bb084e. Report an issue: GitHub.