Skip to content

feat(backups): add optional custom name for backup files - #4964

Open
narcisonunez wants to merge 2 commits into
canaryfrom
feat/backup-custom-file-name
Open

feat(backups): add optional custom name for backup files#4964
narcisonunez wants to merge 2 commits into
canaryfrom
feat/backup-custom-file-name

Conversation

@narcisonunez

@narcisonunez narcisonunez commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

What is this PR about?

  • Add an optional customName field to backup schedules so the generated backup file can be prefixed with a user-defined name instead of only the raw ISO timestamp (closes Name custom in the BACKUP #4961).
  • Sanitize the custom name (sanitizeBackupCustomName) and validate it via zod (^[a-zA-Z0-9._-]*$, max 100 chars) on both the form and the API input.
  • Fix keepLatestNBackups retention pruning, which previously relied on filenames sorting lexicographically in hronological order, but this is no longer true once a custom name can be prepended. It now sorts by real S3 modification time (rclone lsf --format "tp") instead of by filename.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

closes #4961

Screenshots (if applicable)

Screenshot 2026-08-04 at 12 31 23 AM Screenshot 2026-08-04 at 12 31 30 AM Screenshot 2026-08-04 at 12 31 44 AM

Greptile Summary

The PR adds optional sanitized custom names to backup artifacts and changes retention pruning to sort objects by modification time rather than filename.

  • Adds the nullable customName backup field, migration, API validation, and dashboard controls.
  • Applies custom names consistently across database, compose, and web-server backup generation.
  • Updates retention pruning and tests it against mixed timestamp-only and custom-prefixed filenames.
  • Improves long backup-path display in the restore interface.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile

Context used:

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Aug 4, 2026
@narcisonunez
narcisonunez force-pushed the feat/backup-custom-file-name branch from 5485dae to 623ed06 Compare August 4, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Name custom in the BACKUP

1 participant