Skip to main content

🗄️ MOS Backup Plugin

The Backup Plugin provides comprehensive backup management for your MOS system. It supports backing up the boot configuration, application data (Docker appdata), and libvirt configurations with flexible scheduling, compression, and retention policies.

Backup Plugin Overview

The Backup Plugin card on the Plugins page.


📦 Installation

The MOS Backup Plugin is available in the MOS Hub. After Installation you can find it in the Plugins section.

  1. Navigate to Plugins in the sidebar
  2. Locate the Backup plugin card
  3. Click Open to access the plugin settings

The plugin version is displayed in the top-right corner of the plugin card (e.g., v0.6.3).


⚙️ Backup Configuration

The Backup Plugin provides four backup types, each of which can be configured independently:

Backup TypeDescription
Backup AllRuns all configured backup types sequentially
Boot BackupBacks up the system boot configuration
Appdata BackupBacks up Docker application data
Libvirt BackupBacks up libvirt (VM) configurations

Backup Settings Overview

The Backup settings page showing Backup All and Boot Backup sections.


🔁 Backup All

The Backup All section allows you to run all configured backup types in a single operation.

SettingDescription
ScheduleToggle to enable or disable scheduled backups
Cron ScheduleCron expression defining when the backup runs (default: 0 3 * * * = daily at 03:00)
Backup NowButton to manually trigger all configured backups immediately

Usage

  • Enable Schedule to automate all backups at a defined time
  • Use Backup Now for manual, on-demand execution of all backup types
  • The Cron Schedule applies to all backup types when enabled
tip

The Backup All section performs a backup of all currently active services.


💾 Boot Backup

The Boot Backup section manages backups of the system boot configuration.

SettingDescription
DestinationTarget directory where boot backups are stored
CompressionToggle to compress backups as .tar.gz archives
Backups to keepNumber of backup copies to retain (default: 3)
ScheduleToggle to enable or disable scheduled boot backups
Cron ScheduleCron expression for scheduled boot backups (default: 0 3 * * *)
Backup NowButton to manually trigger a boot backup

Notes

  • Compression reduces storage usage but increases backup time
  • The Backups to keep setting automatically removes old backups beyond the configured limit
  • When Schedule is disabled, the Backup Now button is greyed out — enable the schedule first to use manual backups

📂 Appdata Backup

The Appdata Backup section manages backups of Docker application data.

Appdata Backup Settings

The Appdata Backup configuration section.

Settings

SettingDescription
SourceSource directory for appdata (read from Docker settings, e.g., /mnt/main/appdata)
DestinationTarget directory where appdata backups are stored
CompressionToggle to compress backups as .tar.gz archives
Backups to keepNumber of backup copies to retain (default: 5)
Backup ScheduleToggle and Cron expression for scheduled appdata backups (default: 0 4 * * *)
Backup NowButton to manually trigger an appdata backup

Exclude Directories

The Exclude Directories feature allows you to exclude specific container directories from the backup:

  • Click Refresh to detect available container directories
  • Click on a directory tag to add or remove it from the exclusion list
  • Excluded directories are skipped during backup

Stop Containers

The Stop Containers feature allows you to stop specific containers before the backup and restart them afterwards:

  • Select containers from the available list
  • Selected containers are stopped before the backup starts
  • Containers are automatically restarted after the backup completes

This is useful for containers that may have open file locks or require a clean state during backup (e.g., databases).


🖥️ Libvirt Backup

The Libvirt Backup section manages backups of libvirt (VM) configurations.

Libvirt Backup Settings

The Libvirt Backup configuration section.

Settings

SettingDescription
SourceLibvirt configuration directory (default: /etc/libvirt)
DestinationTarget directory where libvirt backups are stored
CompressionToggle to compress backups as .tar.gz archives
Backups to keepNumber of backup copies to retain (default: 5)
Backup ScheduleToggle and Cron expression for scheduled libvirt backups (default: 0 5 * * *)
Backup NowButton to manually trigger a libvirt backup

Notes

  • The source directory /etc/libvirt contains VM definitions and configurations
  • This backs up configurations only, not VM disk images
  • For full VM backups, consider using snapshots or disk-level backups separately

⏱️ Cron Schedules

All backup types support individual cron schedules. The default schedules are staggered to avoid overlapping backups:

Backup TypeDefault CronTime
Backup All0 3 * * *03:00 daily
Boot Backup0 3 * * *03:00 daily
Appdata Backup0 4 * * *04:00 daily
Libvirt Backup0 5 * * *05:00 daily
tip

Staggered schedules prevent concurrent backups from overwhelming storage I/O. Adjust schedules based on your backup sizes and storage performance.


📊 Backup Retention

Each backup type has a Backups to keep setting that controls retention:

Backup TypeDefault Retention
Boot Backup3
Appdata Backup5
Libvirt Backup5

When the retention limit is reached, the oldest backup is automatically deleted before a new one is created.


📚 Best Practices

  • Stagger your schedules — Avoid running all backup types simultaneously to reduce I/O load
  • Use compression — Enable .tar.gz compression to save storage space, especially for appdata
  • Choose reliable destinations — Store backups on a separate pool or disk from the source data
  • Stop critical containers — Use the Stop Containers feature for databases or stateful applications
  • Exclude unnecessary directories — Skip containers with ephemeral or cache data to reduce backup size and time
  • Test your backups — Periodically verify that backups can be restored successfully
  • Set appropriate retention — Balance storage usage with backup history needs

✅ Summary

The Backup Plugin provides a centralized interface for managing system backups in MOS.

Key points:

  • Four backup types: Backup All, Boot, Appdata, and Libvirt
  • Flexible scheduling with individual cron expressions per backup type
  • Compression support via .tar.gz archives
  • Retention control with configurable backup count limits
  • Container management — stop and restart containers around backups
  • Directory exclusion — skip specific appdata directories from backups

Proper backup configuration ensures data safety and system recoverability for your MOS installation.


Parts of this documentation were created with the assistance of AI tools. All AI-generated content has undergone review, but it may still contain inaccuracies, omissions, or outdated information.