Plans
Configuring backup plans
A plan defines what to back up, where to store it, and when to run. Plans are the core scheduling unit in Valvet.
Creating a Plan
Navigate to Plans → Create Plan or use the API. A plan requires:
| Field | Required | Description |
|---|---|---|
| Name | Yes | Human-readable name |
| Node | Yes | Target node to run the backup on |
| Repository | Yes | Destination restic repository |
| Paths | Yes | One or more directories to back up |
| Schedule | No | Cron expression for automatic runs |
| Excludes | No | Glob patterns to skip |
| Retention | No | Snapshot retention policy |
| Pre-hooks | No | Commands to run before backup |
| Post-hooks | No | Commands to run after backup |
Schedule
Schedules use standard 5-field cron expressions:
┌───────── minute (0-59)
│ ┌─────── hour (0-23)
│ │ ┌───── day of month (1-31)
│ │ │ ┌─── month (1-12)
│ │ │ │ ┌─ day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
Examples:
0 2 * * *— Every day at 2:00 AM0 */6 * * *— Every 6 hours30 1 * * 0— Every Sunday at 1:30 AM0 3 1 * *— First of every month at 3:00 AM
Plans without a schedule can only be triggered manually via the “Run Now” button.
Retention Policy
Retention defines how many snapshots to keep. Restic’s forget command is run after each backup with the configured policy:
| Field | Example | Meaning |
|---|---|---|
| Keep Last | 7 | Keep the 7 most recent snapshots |
| Keep Daily | 7 | Keep one snapshot per day for 7 days |
| Keep Weekly | 4 | Keep one per week for 4 weeks |
| Keep Monthly | 12 | Keep one per month for 12 months |
| Keep Yearly | 2 | Keep one per year for 2 years |
Hooks
Pre-hooks run before the backup starts, post-hooks run after (regardless of success or failure). Common uses:
- Pre-hook: Database dump, stop a service, create a consistent snapshot
- Post-hook: Restart a service, send a notification, clean up temp files
Hooks are shell commands executed on the node.
Plan Duplication
You can duplicate an existing plan from the plan detail page. This creates a copy with all the same settings, ready to be modified (useful for setting up similar backups on different nodes).