backupjobs

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package backupjobs schedules and runs Volume backup jobs — a trigger-and- status wrapper around a user-supplied backup command (restic/borg/etc, already pointed at its own repository) run against a volume's or project's data via a short-lived Docker helper container (see internal/docker/volumebackup.go). Not a backup engine: no repository, retention or storage logic of our own — only trigger + status.

Index

Constants

View Source
const (

	// TriggeredBySchedule marks a run started by the scheduler rather than a
	// user-initiated "Run now".
	TriggeredBySchedule = "schedule"
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, st *store.Store, dm *docker.Manager)

Run polls for due jobs once a minute until ctx is cancelled, running each one that's due. A plain ticker, mirroring monitor.Monitor's watchManagerLoop shape, not a general cron — this app has no cron parser anywhere else and shouldn't gain one just for this.

func RunJob

func RunJob(ctx context.Context, st *store.Store, dm *docker.Manager, job store.BackupJob, triggeredBy string) error

RunJob executes one backup job's command via a helper container and records the outcome as a new run — including a failure to even resolve the job's mounts/env, so "why didn't this ever run" is answered in the same history, not silently swallowed.

func TriggerNow

func TriggerNow(ctx context.Context, st *store.Store, dm *docker.Manager, jobID int64, triggeredBy string) error

TriggerNow runs one job immediately, bypassing its schedule — used by the manual "Run now" API action. triggeredBy is the acting username.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL