What is a Backup Plan?
A backup plan defines the complete configuration for automated backups:
- Source paths — Directories and files to back up
- Exclusions — Patterns for files and directories to skip
- Repository — Where to store the backup archives
- Schedule — When to run backups automatically
- Retention policy — How many backups to keep and for how long
- Plugins — Optional pre/post backup actions (database dumps, S3 sync, etc.)
Creating a Backup Plan
Navigate to the client detail page, click the Schedules tab, then click Create New Plan.
Plan Name
Choose a descriptive name like "Daily System Backup", "Hourly Database Snapshots", or "Weekly Full Backup".
Repository
Select the target repository from the dropdown. Only repositories belonging to the current client are shown. If you haven't created one yet, see the Repositories guide.
Directories
Specify the paths to back up, one per line using absolute paths:
/etc
/var/www
/homeExclusions
Specify files and directories to skip using borg patterns:
*/node_modules
*/__pycache__
*.log
*.tmpSchedule Frequency
Choose when backups run automatically:
- Manual — No automatic scheduling. Run with the "Run Now" button only.
- Hourly — Runs at specified minutes past each hour (0, 15, 30, or 45)
- Daily — Runs once per day at a specified time (e.g., 03:00)
- Weekly — Runs once per week on a specified day and time
- Monthly — Runs once per month on a specified day (1-28) and time
Retention Policy
The retention policy controls how long backups are kept. After each backup, old archives beyond the retention limits are automatically pruned:
- Keep last N days — Number of daily archives to keep (default: 7)
- Keep last N weeks — Number of weekly archives to keep (default: 4)
- Keep last N months — Number of monthly archives to keep (default: 6)
- Keep last N years — Number of yearly archives to keep (default: 0)
For example, keeping 7 days, 4 weeks, and 6 months means you always have your last week of daily backups, plus one backup per week for the last month, plus one backup per month for the last 6 months.
Attaching Plugins
Optionally attach plugin configurations to extend the backup workflow:
- MySQL/PostgreSQL Backup — Dump databases before backup starts
- Shell Hook — Run custom scripts before or after backup
- S3 Sync — Mirror the repository to cloud storage after backup
See the Plugins guide for configuration details.
Managing Backup Plans
Enable / Disable
Toggle a plan's schedule on or off without deleting it. Disabled plans won't run automatically, but you can still trigger manual backups with "Run Now".
Run Now
Trigger an immediate backup regardless of the schedule. The backup is queued and the agent picks it up within 30 seconds.
Edit
Modify any plan setting. Changes take effect immediately — the next scheduled backup will use the updated configuration.
What Happens During a Backup
When a backup job runs, the following sequence occurs:
- Pre-backup plugins execute (database dumps, shell hooks)
- borg create reads files, deduplicates, compresses, encrypts, and transfers to the repository
- borg prune removes old archives based on your retention policy
- borg compact reclaims disk space from pruned archives
- Post-backup plugins execute (S3 sync, shell hooks, notifications)
Progress updates are sent to BBS every 10 seconds and visible on the Queue page.