20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored20,919,685Total Points24,106Total Sites23,382Cell Towers69,500Racks Monitored56,753HVAC Units Monitored31,322UPS Units Monitored24,788Generators Monitored

Chapter 10: Scalability & System AdminLesson 55 of 65

How to Configure NoSQL Time-Series Backup Settings

Configure and manage backups for Mango by Radix IoT's NoSQL time-series database to protect historical point values from data loss.

  • 8 min read
  • Advanced
  • Mango 4.x / 5.x

Overview

By default, Mango by Radix IoT stores historical point values in its own NoSQL time-series database (separate from the SQL configuration database). This data represents your entire measurement history. Losing it means losing historical trends, reports, and baseline data.

Mango already backs it up. Automatic NoSQL backup ships enabled, running daily at 05:00, incremental, keeping 365 versions. So the job on a new system is not to switch backups on — it is to confirm those defaults suit you, point them at storage that can hold them, and know how to restore.

Note

With the TSL module, point values can be stored in TimescaleDB or ClickHouse instead of the NoSQL database. This page does not cover them: the NoSQL backup backs up only the NoSQL store, so back those databases up with their own tools. See How to Choose and Configure Your Mango Database (MySQL, PostgreSQL, MariaDB).

Understanding the NoSQL Database

  • Location: db.nosql.location in mango.properties, default databases. It is relative to paths.data (Mango's data directory), not the install directory, and an absolute path is allowed. Point values sit in a subfolder named by db.nosql.pointValueStoreName, default mangoTSDB
  • Structure: Data is stored in time-partitioned files called shards, identified by ever-increasing integer Shard IDs. A shard covers roughly 25 days
  • Size: Grows proportional to point count × polling frequency × retention period
  • Content: Only point values and timestamps — no configuration data
  • Distribution: Shard folders can be spread across drives using a links directory of symbolic links. If your deployment uses that, a naive directory copy may not follow them

Backup Methods

Method 1: Mango Built-In Backup

Mango can create backups of the NoSQL database on a schedule:

  1. Go to Administration > System settings and choose Mango NoSQL from the section list
  2. The backup controls are:
    • Enable auto backup — on by default
    • Incremental backups — on by default; each backup then contains only what changed since the previous one
    • Last run — read-only, the timestamp of the last successful backup
    • Backup directory — where the zip files go. It defaults to paths.backup, which is backup relative to Mango's data path and is shared with the configuration and SQL backups, so give NoSQL its own directory if you want to size or retain it separately
    • Backup every — a count plus a period. Default is every 1 day
    • Backup hour and Backup minute — time of day, 0 to 23 and 0 to 59. Default 05:00
    • Versions to keep — how many to retain. Default 365
  3. Save. Backup now queues one immediately without waiting for the schedule

Backups are zip files named MangoNoSQL-MMM-dd-yyyy_HHmmss.zip, or MangoNoSQL-incremental-MMM-dd-yyyy_HHmmss.zip when Incremental backups is on, which is the default. Where Mango keeps a separate point-data store, each run also writes a matching MangoNoSQLPointData- file. The date is always in the name, whatever Versions to keep is set to; after each run Mango keeps that many of the newest files of each kind and deletes the rest.

Warning

NoSQL backups can be large, and the shipped default keeps 365 of them. Zip compression helps, and incremental backups keep later versions small, but a full first backup is on the order of the data directory itself — size the backup volume before you trust the defaults.

Method 2: File System Backup

Copy the NoSQL data directory using your organization's standard backup tools:

  1. Identify the NoSQL directory from mango.properties
  2. Stop Mango (recommended for consistency) or use filesystem snapshots
  3. Copy the entire directory to your backup destination
  4. Restart Mango

Note: File system backups taken while Mango is running may be inconsistent for the currently active shard. Stopping Mango first is safer. If downtime isn't acceptable, use filesystem-level snapshots (LVM, ZFS, or cloud snapshots).

Method 3: Rsync or Incremental Copy

For large databases where full copies take too long:

  • Use rsync to copy only changed files
  • Most of the data is cold: once a shard's period has passed, new values stop landing in it, so run after run rsync has little to move. That is what makes this fast
  • Older shards are not strictly immutable, so do not skip them. Backdated values are written into the shards they belong to (Mango has a backdate queue and writer for exactly this), and if Purge within shards is enabled the purge task excises samples from inside existing shard files. Let rsync compare the whole tree rather than assuming anything older than the current shard is frozen

Backup Sizing

Sizing the backup volume is not simply "the data directory plus a bit":

  • Backups are already compressed zips, so a full copy is smaller than the live directory — but do not count on a fixed ratio, because time-series data compresses very differently depending on what you log
  • With Incremental backups on (the default) only the first backup is full-sized and later ones hold just the changes
  • But the default keeps 365 versions. Multiply your daily change volume by the versions you keep, and check that against the backup volume
  • Reducing Versions to keep is the fastest way to cut backup storage — with incremental backups, keep enough versions to cover the history you actually want to be able to restore

Restoring from Backup

Mango has its own restore, and on a default installation you want it rather than a directory swap.

Restore in Mango (preferred)

The tool lives on a separate page from the settings, at /ui/admin/no-sql. It is superadmin-only and hidden from the navigation menu, but you do not need the URL: open Administration > Admin home and click Mango NoSQL on the Utilities card. It is a tabbed page, and the last tab is Restore Mango NoSQL database (the others migrate or merge data).

That tab lists the zip files found in the configured backup directory, so you pick one under NoSQL backup and start it with Restore now. The tab also has Source directory and Destination directory fields, and an Incremental Restore switch that starts off, and the job reports progress and can be cancelled. It is gated by its own NoSQL restore system permission, separate from NoSQL backup.

Warning

Incremental backups are on by default, which breaks the naive restore. Each incremental zip holds only the changes since the previous backup, so a single zip is not a complete database. Use the restore tool, or unzip the files over the existing database files in order. Copying one incremental zip over a wiped directory will not give you a working history.

Restore by hand

  1. Stop Mango
  2. Unzip the backups over the existing NoSQL data directory, oldest first, so incremental changes replay in sequence
  3. Verify file permissions match Mango's service account
  4. Start Mango
  5. Check that historical data is accessible (view charts, run reports)

Restoration returns point value history to the backup's state. Any data logged after the last restored backup will be lost.

Backup Schedule Recommendations

Deployment SizeBackup FrequencyRetention
Small (under 10 GB)Daily7 copies
Medium (10-100 GB)Daily (incremental)7 daily + 4 weekly
Large (over 100 GB)Daily incremental + weekly full7 daily + 4 weekly + 3 monthly

Monitoring Backup Health

  • Check backup directory size regularly — if it stops growing, backups may be failing
  • Verify backup timestamps — the most recent backup should be within your expected schedule
  • Periodically test a restore on a staging system to confirm backups are valid
  • Set up disk space alerts on the backup volume

Summary

The NoSQL database holds your entire measurement history. Back it up using Mango's built-in backup, file system copies, or incremental tools like rsync. Keep multiple copies, test restores periodically, and ensure backup storage is sized appropriately. The cost of backups is trivial compared to the cost of losing years of historical data.

Get free access to all 65 Mango by Radix IoT training lessons

One short form unlocks every lesson and its video in this browser.

This form is hosted by Zoho. It loads only after you enable support cookies or choose to load it below.

We honored your browser’s Global Privacy Control signal — optional cookies are off and nothing is tracked.