Configuration snapshots provide fast backup and restore of UFM configurations.
The backup includes:
-
UFM configuration files (
/opt/ufm/files/confall the files that are saved when calling the UFM backup.sh script) -
Plugin configurations
-
UFM Install arguments
-
UFM version and plugin versions
Creating Configuration Snapshot
Basic Snapshot
Create a configuration snapshot. Run:
ufm_versions_mgr backup --config
Snapshot with Label
Create a snapshot with a descriptive label. Run:
ufm_versions_mgr backup --config --label "My own label"
List Snapshots
List available snapshots. Run:
ufm_versions_mgr backup --config --list
Command Options
|
Option |
Description |
|---|---|
|
|
Configuration-only backup |
|
|
Optional description for snapshot |
|
|
List existing snapshots |
|
|
Preview operation without executing |
|
|
Enable detailed output |
Restore Configuration Snapshot
Check Version Compatibility
Check if snapshot can be restored. Run:
ufm_versions_mgr restore --config --check-version --snapshot-number 1
The UFM and plugin versions must be identical for the restore process to complete successfully.
Restore Snapshot
-
Restore latest snapshot (snapshot #1). Run:
ufm_versions_mgr restore --config
-
Restore specific snapshot. Run:
ufm_versions_mgr restore --config --snapshot-number 2
-
A pre-restore backup is automatically created to enable rollback if needed.
-
The UFM service is stopped during the restore process.
Preview Restore (Dry-Run)
Preview restore operation. Run:
ufm_versions_mgr restore --config --snapshot-number 1 --dry-run
Configuration Validation
Upon every backup operation, the tool validates the schema of some configurations.
If the files are not aligned, the operation will be blocked since the current is invalid.
Snapshot Rotation
-
Maximum snapshots: 10
-
Automatic rotation when creating 11th snapshot
-
Oldest snapshot (snapshot-10) deleted after confirmation
-
Snapshots renumbered: 9→10, 8→9, ..., 1→2, new→1
Setting Up Periodic Configuration Snapshots
Option 1: Simple Periodic Snapshot (Recommended for Most Users)
This approach uses a cron job to create a new configuration snapshot at a regular interval.
Keep in mind that UFM supports a maximum of 10 configuration snapshots.
Once this limit is reached, the oldest snapshot is automatically deleted when a new one is created.
Suggested Interval
Since the snapshot limit is 10:
-
Every 12 hours → keeps ~5 days of history
-
Every 24 hours (daily) → keeps ~10 days of history
For most environments, daily backups are sufficient and provide a good balance between retention and frequency.
-
Open the root user’s crontab:
sudo crontab -e -
Add one of the following lines depending on your desired frequency:
Every 12 hours:
0 */12 * * * /usr/bin/ufm_versions_mgr backup --config --label "Periodic config backup"Every day at midnight:
0 0 * * * /usr/bin/ufm_versions_mgr backup --config --label "Daily config backup" -
Save and exit. Cron will automatically schedule and run the snapshots.
Option 2: Advanced Snapshot — Only When Configuration Changes
This approach is more efficient and avoids unnecessary snapshots when UFM configuration files haven’t changed.
It uses a custom shell script that:
-
Computes a checksum of key UFM configuration files and plugin configurations.
-
Compares it with the previous checksum.
-
Creates a new snapshot only if changes are detected.
-
Create custom script in /usr/local/bin/
-
Make the Script Executable
chmod +x /usr/local/bin/ufm_backup_if_changed.sh
-
Open a crontab to edit
sudo crontab -e
-
Add:
0 */6 * * * /usr/local/bin/ufm_backup_if_changed.sh >> /var/log/ufm_periodic_config_backup.log
Summary:
|
Method |
Snapshot Frequency |
Pros |
Cons |
|---|---|---|---|
|
Simple (fixed interval) |
12–24h |
Easy to set up; predictable history |
May create redundant backups |
|
Advanced (config change based) |
On change |
Efficient; avoids duplicates |
Slightly more complex setup |
HA Considerations
In HA environments:
-
Tool automatically detects HA mode
-
Must run from master node
-
Backs up master configuration
-
Stores in shared location
-
The same commands apply to both SA and HA environments.
-
The tool automatically detects and adapts to the environment.
Troubleshooting
|
Issue |
Solution |
|---|---|
|
No configuration snapshots found |
Create first snapshot: sudo ufm_versions_mgr backup --config |
Last updated: