Overview
Borg UI’s scheduler automates backups using cron expressions, allowing you to:- Schedule regular backups (hourly, daily, weekly, monthly)
- Back up multiple repositories in a single schedule
- Run pre/post backup scripts
- Automatically prune and compact repositories
- Track execution history and logs
Creating Your First Schedule
Configure Basic Settings
Schedule Name: Descriptive name (e.g., “Nightly Home Backup”)Description (optional): Additional notes about the scheduleEnabled: Toggle to activate/deactivate schedule
Set Schedule Timing
Choose how to define the schedule:
- Presets
- Visual Builder
- Custom Expression
Select from common patterns:
- Every 5 minutes
- Hourly
- Daily at 2 AM
- Weekly on Sunday
- Monthly on 1st
- Weekdays at 9 AM
Select Repositories
Choose which repositories to back up:Single Repository: Select one repositoryMultiple Repositories: Select multiple repositories (run in sequence)
Multi-repository schedules back up each repository one after another, not simultaneously.
Configure Archive Naming (Optional)
Customize archive names using templates:Available Variables:
{job_name}: Schedule name{repo_name}: Repository name{now}: Full timestamp (2024-01-15T02:00:00){date}: Date only (2024-01-15){time}: Time only (02:00:00){timestamp}: Unix timestamp
Add Schedule-Level Hooks (Optional)
Run scripts before/after all backups:
- Pre-Backup Script: Runs once before backing up any repository
- Post-Backup Script: Runs once after all repositories complete
- Run Repository Scripts: Enable to also run per-repository hooks
Schedule-level hooks are ideal for global preparation/cleanup tasks. See Backup Scripts guide for examples.
Configure Maintenance (Optional)
Automatically maintain repositories after backup:Prune Settings:
- Run Prune After Backup: Remove old archives
- Keep Hourly: Number of hourly backups to keep
- Keep Daily: Number of daily backups (default: 7)
- Keep Weekly: Number of weekly backups (default: 4)
- Keep Monthly: Number of monthly backups (default: 6)
- Keep Quarterly: Number of quarterly backups
- Keep Yearly: Number of yearly backups (default: 1)
- Run Compact After Prune: Reclaim disk space after pruning
Cron Expression Examples
Common scheduling patterns:Borg UI uses 5-field cron format (minute, hour, day, month, weekday). Use the visual builder to avoid syntax errors.
Multi-Repository Schedules
Schedule backups for multiple repositories in a single job:Configuration
- Create schedule as normal
- In Repositories section, select multiple repositories
- Repositories are backed up sequentially in the order shown
- Drag to reorder execution sequence
Execution Flow
Benefits
- Single schedule: Manage timing in one place
- Sequential execution: Prevents resource contention
- Unified monitoring: Track all backups together
- Global hooks: Run setup/cleanup once for all repositories
Prune and Compact
Understanding Pruning
Pruning removes old archives according to retention policy: Retention Strategy Example:- Newest archive in each time bucket is kept
- Older archives are pruned
- Multiple retention rules can apply to same archive
Understanding Compacting
Compacting reclaims disk space after pruning:- Prune: Marks archives as deleted
- Compact: Removes deleted archive data and defragments repository
When to Run Maintenance
Run After Every Backup:- Small repositories (< 100 GB)
- Frequent backups (hourly/daily)
- Storage space is constrained
- Large repositories (> 1 TB)
- Weekly/monthly backups
- Separate maintenance schedule
- Create schedule: “Weekly Maintenance”
- Cron:
0 4 * * 0(Sunday 4 AM) - Select repositories
- Enable prune and compact
- Disable backup (maintenance only)
Borg UI supports maintenance-only schedules that skip backup and only run prune/compact.
Execution History and Logs
Viewing Past Executions
- Navigate to Schedules
- Click on a schedule
- View Execution History tab:
- Execution timestamp
- Status (success, failed, running)
- Duration
- Repositories backed up
- Link to backup jobs
Backup Job Logs
- From execution history, click View Jobs
- See individual backup jobs for each repository
- Click a job to view:
- Detailed progress
- Borg output
- Hook execution logs
- Error messages
Managing Schedules
Edit Schedule
- Navigate to Schedules
- Click schedule name
- Click Edit
- Modify settings
- Save changes
Changing cron expression updates “Next Run” time immediately.
Disable/Enable Schedule
Quick Toggle:- Navigate to Schedules
- Click toggle switch next to schedule name
- Edit schedule
- Toggle Enabled checkbox
- Save
Run Schedule Manually
- Navigate to Schedules
- Click schedule name
- Click Run Now
- Schedule executes immediately (doesn’t affect next scheduled run)
Manual runs are useful for testing schedules or running ad-hoc backups outside the normal schedule.
Duplicate Schedule
- Navigate to Schedules
- Click schedule name
- Click Duplicate
- New schedule created with name “Copy of [Original Name]”
- Edit and customize as needed
Delete Schedule
- Navigate to Schedules
- Click schedule name
- Click Delete
- Confirm deletion
Advanced Scheduling Patterns
Staggered Backups
Spread backups throughout the day to avoid resource spikes:Tiered Retention
Different retention policies for different data: Critical Data (frequent, long retention):Business Hours vs Off-Hours
Adjust backup frequency based on activity:Notifications
Borg UI integrates with 100+ notification services via Apprise:Configure Schedule Notifications
- Navigate to Settings → Notifications
- Add notification service (Email, Slack, Discord, etc.)
- Create notification profile:
- Name: “Backup Alerts”
- Services: Select configured services
- Events: Choose when to notify
- ✅ Backup Started
- ✅ Backup Success
- ✅ Backup Failed
- ✅ Backup Warning
- Assign profile to repositories or schedules
Monitoring and Alerts
Dashboard Overview
The dashboard shows:- Recent Backup Jobs: Latest executions with status
- Upcoming Schedules: Next scheduled runs
- Failed Jobs: Backups needing attention
- Repository Health: Archive counts, sizes, last backup
MQTT Integration
Publish backup events to MQTT broker for external monitoring:borgui/backup/startborgui/backup/progressborgui/backup/completeborgui/backup/failed
Troubleshooting
Schedule Not Running
Check schedule is enabled:- Navigate to Schedules
- Verify toggle is “On”
- Check “Next Run” time is in the future
- Edit schedule
- Check “Next Runs” preview
- If empty, expression may be invalid
Schedule Runs But Backup Fails
Review backup job logs:- Navigate to Backup Jobs
- Find job from schedule (shows “scheduled_job_id”)
- Review error messages
- Repository locked (previous backup still running)
- Permissions denied (source directories not accessible)
- Disk space exhausted
- SSH connection failed (remote repositories)
Prune/Compact Hangs
Check repository lock:- Navigate to Maintenance Jobs
- View compact job status
- Check progress messages
Hooks Fail
Review hook logs:- Find backup job from schedule
- View logs for hook stderr output
- Check hook exit codes
- Script syntax errors
- Timeouts (increase timeout in schedule settings)
- Permission issues (Docker socket not mounted)
- Missing dependencies
Best Practices
Test Schedules Thoroughly
Test Schedules Thoroughly
Before relying on schedules:
- Create test schedule with frequent interval (e.g., every 5 minutes)
- Verify backups complete successfully
- Check logs for warnings
- Test restore from scheduled backup
- Update to production timing after validation
Use Descriptive Names
Use Descriptive Names
Schedule names should indicate:
- What’s being backed up
- Frequency
- Purpose
- “Hourly Database Snapshots”
- “Daily Full Server Backup”
- “Weekly Offsite Sync”
Set Appropriate Retention
Set Appropriate Retention
Balance between:
- Disk space: More archives = more storage
- Recovery granularity: More frequent backups = better point-in-time recovery
- Compliance: Regulatory requirements for retention periods
Monitor Schedule Health
Monitor Schedule Health
Regularly review:
- Failed backup jobs
- Growing repository sizes
- Schedule drift (jobs taking longer than interval)
- Hook execution times
Document Schedule Purpose
Document Schedule Purpose
Use the Description field to document:
- Business requirements
- Change history
- Special considerations
- Contact for issues
Next Steps
Backup Scripts
Add pre/post backup hooks to schedules
Notifications
Set up alerts for scheduled backups
Repository Maintenance
Optimize and verify scheduled backups
Remote Repositories
Schedule backups to remote storage