Skip to content

feat: add compose backup scheduled task type#12284

Open
jakub961241 wants to merge 1 commit into1Panel-dev:dev-v2from
jakub961241:feat/compose-backup-cronjob-only
Open

feat: add compose backup scheduled task type#12284
jakub961241 wants to merge 1 commit into1Panel-dev:dev-v2from
jakub961241:feat/compose-backup-cronjob-only

Conversation

@jakub961241
Copy link
Contributor

Summary

Adds compose as a new cronjob type for automatic Docker Compose backup. This was requested in #12250 (point 2) - the compose backup feature exists since v2.1.5 but has no scheduled task support.

This is a small, focused PR (~100 lines of logic) that wires the existing ComposeBackup function into the cronjob dispatcher. No new dependencies or models needed.

Backend changes

  • cronjob_backup.go: Add handleCompose() using existing handleComposeBackup() + uploadWithMap()
  • cronjob_helper.go: Add "compose" case to loadTask(), update hasBackup()

Frontend changes

  • helper.ts: Add compose to type list and default spec
  • operate/index.vue: Add compose project selector, update isBackup()
  • import/index.vue: Add compose to import validation
  • en.ts / zh.ts: Add cronjob.compose translation

How it works

  1. User creates cronjob with type "compose"
  2. Selects specific compose projects or "all"
  3. On schedule, calls existing handleComposeBackup() for each project
  4. Uploads to backup account, manages retention - same as app/website backup
feat: Add compose backup scheduled task type for automatic Docker Compose backups (#12250)

Add "compose" as a new cronjob type for automatic Docker Compose
backup on schedule. Users can select specific compose projects or
"all" for backup, with the same backup account, retention, and
retry options as other backup types.

Backend:
- handleCompose() in cronjob_backup.go using existing ComposeBackup
- "compose" case in loadTask() dispatch
- hasBackup() includes "compose"

Frontend:
- compose type in cronjob type dropdown
- compose project selector populated from Docker
- isBackup() includes compose for backup account settings

Partially addresses 1Panel-dev#12250
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Mar 22, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zhengkunwang223 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant