MaxBack Watchdog — Service Monitoring
The Watchdog monitors all VssWriter service instances and restarts them automatically if they stop unexpectedly. It also tracks backup schedules and alerts you when a database misses its backup window.
Why this matters
After host-level incidents — IO errors, system crashes, failed Windows updates — services can silently remain stopped. Without monitoring, this can go unnoticed for hours or days, meaning backups quietly stop working.
The Watchdog catches these situations and acts on them before they become a problem.
How service restarts work
The Watchdog uses two layers of recovery, each handling different failure scenarios.
Layer 1: Windows SCM recovery (immediate)
Each VssWriter service is registered with Windows Service Control Manager (SCM) failure recovery actions. If a service crashes, Windows restarts it automatically:
- First failure: restart after 30 seconds
- Second failure: restart after 60 seconds
- Subsequent failures: restart after 120 seconds
- Failure count resets after 1 day
This handles the most common case — a service process crash — with minimal delay.
Layer 2: Watchdog recovery (delayed)
The Watchdog handles cases that SCM recovery cannot detect, such as services that are stopped but did not crash (for example, after an IO error or a system event that stops the service gracefully).
The recovery sequence:
- The Watchdog checks all VssWriter services every 2 minutes
- When it finds a stopped service (with automatic startup type), it starts a 5-minute grace period
- After the grace period, it attempts to restart the service
- On failure, it retries with increasing delays: 15 minutes, 30 minutes, 60 minutes
- After 3 failed attempts, it stops retrying and logs a warning
If notifications are configured, the Watchdog sends a Service down alert when the grace period expires, and a Service restart failed alert when all retries are exhausted.
Why the grace period?
The 5-minute grace period prevents the Watchdog from interfering with:
- SCM recovery — which acts within seconds after a crash
- Your own operations — service install, uninstall, stop, start via the console client
- System shutdown and Windows updates
Stopping services for maintenance
If you need to stop a VssWriter service intentionally (for example, for maintenance), stop the Watchdog service first — otherwise it will restart the service after the grace period.
sc stop MaxBack.Watchdog
Remember to start it again when you're done:
sc start MaxBack.Watchdog
Watchdog options
You can adjust the Watchdog behavior with these settings:
| Setting | Default | Description |
|---|---|---|
CheckIntervalMinutes | 2 | How often the Watchdog checks service status (minutes). Set to 0 to disable service monitoring entirely. |
GracePeriodMinutes | 5 | How long to wait before attempting a restart |
MaxRetries | 3 | Number of restart attempts before giving up |
StartupDelayMinutes | 2 | Delay after the Watchdog service starts before it begins checking |
The defaults work well for most environments. If you want to use the Watchdog only for notifications and backup schedule monitoring — without automatic service restarts — set CheckIntervalMinutes to 0.
To change options, use the watchdog options commands:
maxback.vssclient watchdog options list
maxback.vssclient watchdog options set -o CheckIntervalMinutes -v 5
See Watchdog options reference for the full command documentation.
Backup schedule monitoring
Beyond watching services, the Watchdog can track whether your databases are actually being backed up on schedule. You define backup windows using cron expressions, and the Watchdog alerts you if a window closes without a successful backup.
Setting up a schedule
Each database can have one or more backup schedules. A schedule consists of:
- Backup type —
Full,Copy, orAny(matches any backup type) - Cron expression — When the backup window opens (standard 5-field cron: minute, hour, day, month, weekday). Use crontab.guru to build and verify expressions.
- Window — How many hours the window stays open (default: 24)
For example, to monitor that a daily full backup runs for database PRD:
maxback.vssclient options backupmonitor add -d PRD --type Full --cron "0 22 * * *" --window 12
This expects a full backup to complete between 10 PM and 10 AM the next day. If the window closes without a successful full backup, the Watchdog sends a Missing backup alert.
Managing schedules
maxback.vssclient options backupmonitor list -d PRD
maxback.vssclient options backupmonitor set -d PRD --index 0 --window 18
maxback.vssclient options backupmonitor remove -d PRD --index 0
Schedules are identified by their index (starting at 0), which you can see in the list output.
See Backup schedule reference for all options.
Service management
The Watchdog service is managed automatically by the MaxBack installer:
- Install/Upgrade — The Watchdog is stopped before VssWriter services are stopped, and started after all VssWriter services are running again.
- Uninstall — The Watchdog is removed together with all other MaxBack components.
To check the Watchdog status manually:
sc query MaxBack.Watchdog