Files
dashback/docs/api/routes/backup/_id/vfs/recover.md
2026-10-14 03:07:21 +02:00

1.3 KiB

POST /backup/{id}/vfs/recover

Protected. Requires a valid session cookie (credentials: 'include').

Recover VFS file from a backup

Recovers a specific virtual filesystem (VFS) file from a backup archive into the active VFS directory for the authorized company.

Path parameters

Param Required Type Description
id yes string Backup identifier (e.g. backup-2026-10-14_02-00-00, backup-2026-10-14, backup-2026-10)

Body (JSON)

Field Required Type Description
path yes string Relative path of the VFS file to recover
companyId no integer Optional company ID (defaults to user's selected company)
{
  "path": "…",
  "companyId": 1
}

Response 200

VFS file recovered successfully

{
  "success": true,
  "backupId": "…",
  "companyId": 1,
  "path": "…",
  "sizeBytes": 1,
  "mime": "…"
}

Errors

Status Description
400 Validation error or path escapes boundary — {"error":"…"}
403 Not authorized for the company — {"error":"…"}
404 Backup or file not found — {"error":"…"}
500 Internal server error — {"error":"…"}

Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.