{"record":{"id":"0c41717d22d57a1d","repo":"Dokploy/dokploy","slug":"not-found-0c4171","errorCode":"NOT_FOUND","errorMessage":"Volume backup not found","messagePattern":"Volume backup not found","errorType":"error_code","errorClass":"TRPCError","httpStatus":404,"severity":"error","filePath":"apps/dokploy/server/api/routers/volume-backups.ts","lineNumber":210,"sourceCode":"\t\t\t\texistingVb.postgresId ||\n\t\t\t\texistingVb.mysqlId ||\n\t\t\t\texistingVb.mariadbId ||\n\t\t\t\texistingVb.mongoId ||\n\t\t\t\texistingVb.redisId ||\n\t\t\t\texistingVb.libsqlId ||\n\t\t\t\texistingVb.composeId;\n\t\t\tif (serviceId) {\n\t\t\t\tawait checkServicePermissionAndAccess(ctx, serviceId, {\n\t\t\t\t\tvolumeBackup: [\"update\"],\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst updatedVolumeBackup = await updateVolumeBackup(\n\t\t\t\tinput.volumeBackupId,\n\t\t\t\tinput,\n\t\t\t);\n\n\t\t\tif (!updatedVolumeBackup) {\n\t\t\t\tthrow new TRPCError({\n\t\t\t\t\tcode: \"NOT_FOUND\",\n\t\t\t\t\tmessage: \"Volume backup not found\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (IS_CLOUD) {\n\t\t\t\tif (updatedVolumeBackup.enabled) {\n\t\t\t\t\tawait updateJob({\n\t\t\t\t\t\tcronSchedule: updatedVolumeBackup.cronExpression,\n\t\t\t\t\t\tvolumeBackupId: updatedVolumeBackup.volumeBackupId,\n\t\t\t\t\t\ttype: \"volume-backup\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tawait removeJob({\n\t\t\t\t\t\tcronSchedule: updatedVolumeBackup.cronExpression,\n\t\t\t\t\t\tvolumeBackupId: updatedVolumeBackup.volumeBackupId,\n\t\t\t\t\t\ttype: \"volume-backup\",\n\t\t\t\t\t});","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/apps/dokploy/server/api/routers/volume-backups.ts#L192-L228","documentation":"Thrown by Dokploy's update-volume-backup mutation when updateVolumeBackup returns a falsy value, meaning no volume backup row matched input.volumeBackupId (or the update affected nothing). The id-based update returns the updated record only when the target exists.","triggerScenarios":"Calling updateVolumeBackup with an id that was deleted, never existed, or came from a different instance; also possible when the update payload matches nothing due to a corrupted id.","commonSituations":"Editing a backup schedule in a stale UI tab after it was deleted elsewhere; double submissions; ids copied across environments (staging vs production).","solutions":["Refresh the volume backups list and edit the current entry","Verify the volumeBackupId string being sent","Treat NOT_FOUND on edit as a signal to re-fetch and re-open the editor"],"exampleFix":"// before\nawait trpc.volumeBackup.update.mutate({ volumeBackupId, ...input });\n\n// after\nconst list = await trpc.volumeBackup.all.query();\nconst current = list.find((b) => b.volumeBackupId === volumeBackupId);\nif (current) await trpc.volumeBackup.update.mutate({ volumeBackupId, ...input });","handlingStrategy":"try-catch","validationCode":"const backups = await trpc.volumeBackup.all.query();\nif (backups.some((b) => b.volumeBackupId === id)) {\n  await trpc.volumeBackup.update.mutate({ volumeBackupId: id, ...input });\n}","typeGuard":null,"tryCatchPattern":"catch (e) { if (e?.data?.code === 'NOT_FOUND') { refetchAndReopenEditor(); } else throw e; }","preventionTips":["Re-fetch the backup list when the edit dialog opens","Absorb NOT_FOUND on update as 'row changed elsewhere'","Scope ids per environment to avoid cross-instance copy-paste"],"tags":["dokploy","trpc","not-found","backups","volumes"],"backgroundTag":"resource-not-found","analyzedSha":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}