Skip to content

Backing up a Normal Site

Because Normal typically runs at the edge, it is strongly recommended to make periodic backups of data on the site.

Making a manual backup

Use nfcli to make a manual backup of a site. A backup is a single file containing

  • The points database
  • BACnet and Modbus configuration
  • Templates
  • Equipment Types
  • System settings

It creates an output file named nf.backup in the current working directory. You should move the backup to a suitable storage location.

$ nfcli backup
2023-01-25 18:50:05,637 INFO     backing up Default Site at http://localhost:8080
2023-01-25 18:50:05,678 INFO     archived BACnet datalink configuration
2023-01-25 18:50:05,680 INFO     archived up 2 templates
2023-01-25 18:50:05,686 INFO     archived 2 configuration keys
2023-01-25 18:50:05,689 INFO     archived 10 local bacnet objects
2023-01-25 18:50:05,690 INFO     archived 0 modbus profiles
2023-01-25 18:50:05,690 INFO     archived 0 modbus connections
2023-01-25 18:50:09,540 INFO     archived count=29362 layer=model
2023-01-25 18:50:09,614 INFO     archived count=100 layer=test:import
2023-01-25 18:50:13,707 INFO     archived count=16584 layer=hpl:bacnet:1
2023-01-25 18:50:13,733 INFO     archived count=1 layer=automation
2023-01-25 18:50:13,747 INFO     archived count=100 layer=test:output
2023-01-25 18:50:13,748 INFO     archived count=0 layer=hpl:modbus:1
2023-01-25 18:50:13,748 INFO     archive written to nf.backup

Automated backups

Normal also supports creating automatic backups. You may configure this support by going into the Configuration tool and loading the Backup settings page.

Automatic Backup Settings

Automated backups work slightly differently than manual backups; instead of writing the backup archive to disk, it is sent to a web server via HTTP PUT.

There are several options available on the configuration page:

  • Url: the HTTP or HTTPS URL to post the backup archive to
  • Frequency: how often to perform a full backup
  • Timeout: how long to allow the upload to take before canceling

Restoring a backup

You can restore a backup using nfcli restore <filename>

$ nfcli restore nf.backup
2023-01-25 18:52:51,705 INFO     restoring site "Default Site" at "http://localhost:8080"
2023-01-25 18:52:51,705 INFO     restoring BACnet datalink settings
2023-01-25 18:52:51,707 INFO     restoring local BACnet objects
2023-01-25 18:52:51,714 INFO     restoring templates
2023-01-25 18:52:51,720 INFO     enabling template new-template.csv
2023-01-25 18:52:51,728 INFO     restored 2 templates (1 enabled)
2023-01-25 18:52:51,728 INFO     restoring 2 configuration settings
2023-01-25 18:52:51,752 INFO     starting to reload point database