Budibase/budibase · error
App export does not appear to be valid - no DB file found.
Error message
App export does not appear to be valid - no DB file found.
What it means
importApp validates the extracted package contains DB_EXPORT_FILE (the database dump, e.g. db/dump.txt). If absent the archive is not a valid app export and the import aborts with this message, preventing creation of a broken app without database contents.
Source
Thrown at packages/server/src/sdk/workspace/backups/imports.ts:283
template.file && (await fsp.lstat(template.file.path)).isDirectory()
let tmpPath: string | undefined = undefined
if (template.file && (isTar || isDirectory)) {
tmpPath = isTar ? await untarFile(template.file) : template.file.path
if (isTar && template.file.password) {
await decryptFiles(tmpPath, template.file.password)
}
const contents = await fsp.readdir(tmpPath)
const stillEncrypted = !!contents.find(name => name.endsWith(".enc"))
if (stillEncrypted) {
throw new Error("Files are encrypted but no password has been supplied.")
}
const isPlugin = !!contents.find(name => name === "plugin.min.js")
if (isPlugin) {
throw new Error("Supplied file is a plugin - cannot import as app.")
}
const isInvalid = !contents.find(name => name === DB_EXPORT_FILE)
if (isInvalid) {
throw new Error(
"App export does not appear to be valid - no DB file found."
)
}
// have to handle object import
if (importOpts.importObjStoreContents) {
const promises = []
const excludedFiles = [GLOBAL_DB_EXPORT_FILE, DB_EXPORT_FILE]
for (let filename of contents) {
const path = join(tmpPath, filename)
if (excludedFiles.includes(filename)) {
continue
}
filename = join(objectStoreProdAppId, filename)
if ((await fsp.lstat(path)).isDirectory()) {
promises.push(
objectStore.uploadDirectory(ObjectStoreBuckets.APPS, path, filename)
)View on GitHub (pinned to a81a902e9a)
Solutions
- Re-export the app from the source environment using the standard export feature and import that archive
- Verify the archive contains the DB dump path (db/dump.txt) with `tar -tzf export.tar.gz`
- Re-upload the file if the transfer was truncated/corrupted and confirm sizes match
- Check Budibase version compatibility between exporting and importing environments
Example fix
// before tar -czf bundle.tar.gz assets/ // no db dump inside // after budibase export --output export.tar.gz // contains db/dump.txt
Defensive patterns
Strategy: validation
Validate before calling
const listing = execSync(`tar -tzf ${archivePath}`).toString()
if (!listing.includes("dump.txt")) {
throw new Error("Archive lacks the app DB export")
} Try / catch
try {
await importApp(template)
} catch (err: any) {
if (err.message.includes("no DB file found")) {
// obtain a fresh valid export
} else {
throw err
}
} Prevention
- Verify export archives contain db/dump.txt before import
- Use the official export feature only
- Check upload integrity via checksums to prevent truncation
When it happens
Trigger: importApp called with an archive that lacks the expected DB export file — e.g. a zipped folder of assets, an object-store-only export, an archive from an incompatible/older format, or a truncated upload that lost the db directory.
Common situations: Hand-crafted or third-party archives renamed to .tar.gz and imported; exports from very old Budibase versions with a different layout; uploads truncated in transit so files are missing after extraction; importing a workspace backup file through the app import endpoint.
Related errors
- Invalid import url
- Only HTTP(S) URLs are allowed for query import
- Import url must not contain credentials
- Import data or url is required
- Unsupported import type
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/5cb612d85fa02071.
Report an issue: GitHub.