Backing up and Cloning a SmartServer to Multiple Sites (Release 3.5)

Backing up and Cloning a SmartServer to Multiple Sites (Release 3.5)

The CMS IMPORT/EXPORT button is available with SmartServer 3.5 and higher. For SmartServer releases with 2.7 update 1 and higher and prior to 3.5, the CMS import/export feature is available with the CMS Settings button. 

Backup and restore operations are dependent on SmartServer hardware versions

Restore operations are dependent on the SmartServer software and hardware versions for the backup and restore SmartServers. Consequently, you cannot restore a system image on all new SmartServers.

For example, if you backup a SmartServer 3.26 on a dual core SmartServer, then you cannot restore it on a new quad core that uses a Dialog PMIC, which is only supported with SmartServer 3.3 and higher. Doing so could result in the new SmartServer becoming unusable and possibly unrecoverable.

Therefore, only back up the settings and database (not the system) on the old SmartServer, and then on the new Dialog PMIC hardware, install SmartServer 3.3 or higher, and then restore the settings and database.

A SmartServer image can be deployed to one or multiple SmartServers using the cloning method. This method replicates a reference (source) SmartServer IoT to another (target) SmartServer IoT(s). The cloning method provides the ability to deploy a SmartServer image that is identical to the reference SmartServer, including the SmartServer system software and all configuration files. This method is, however, more complex and generally takes longer per SmartServer. Additionally, since the SmartServer software is part of the cloned image, and therefore tied to a particular SmartServer release, the clone has to be rebuilt with every new release to stay current. Or, the update procedure has to include a step for each cloned SmartServer to be updated to the latest release. 

Cloning can be used to replicate a reference (source) SmartServer IoT to another SmartServer IoT(s), where each cloned (target) SmartServer's configuration will be identical to the reference SmartServer. Cloned SmartServers will have the same CMS configuration, external devices, external data points, custom applications, and custom web pages as the source SmartServer IoT. clone restore preserves the new SmartServer's serial number, host name, MAC addresses, and install code, but changes the apollo password and segment ID (SID). In most cases, when you restore a database backup onto a new SmartServer, you will do so by cloning.

full restore overwrites the new SmartServer's serial number, host name, MAC addresses, install code, SID, and apollo password. With this process, the new SmartServer will have identical image as the backed-up imageFor a full restore, see Backing up and Restoring/Replacing a SmartServer for more information.

The reference SmartServer can include the most comprehensive configuration of devices likely to be seen in the field. For subsets of the reference configuration, devices that are not present in some sites can either be ignored or deleted accordingly. Cloned Modbus and BACnet networks should be configured with the same addressing and baud rate information as the reference SmartServer IoT networks. LON networks will need their devices replacing in the CMS with the new UIDs.

To clone a source SmartServer once its configuration is finalized and tested, a system backup image must first be created. Then, the source SmartServer IoT system backup must be restored using the Import/Export button (

) located on the SmartServer app bar. The procedure in this section describes how to perform cloning.

This section consists of the following:

Prerequisites

Backing up the SmartServer IoT

SmartServer IoT backups are stored on the SD Card in the /media/sdcard/backups directory (there can be multiple backup files on the SD Card).

Backup file names will appear similar to the following example: 

SmartServer-System-Backup-2022-03-10-114532.tgz

The SmartServer IoT's SD Card is formatted using the Linux ext4 filesystem and cannot be read directly by a Windows PC. You can use an SFTP application on a Windows PC, such as WinSCP to read and write backup files from and to the SD Card. WinSCP downloads are available at https://winscp.net/eng/docs/guide_install. However, for speed purposes in a production environment, it is recommended that a Linux PC is used to read or write to the SD Card. If you do not want to modify your existing PC configuration, you can use a trial version of Ubuntu to do this, where you simply boot the PC from a USB drive with a bootable version of Ubuntu installed. Ubuntu downloads are available at https://ubuntu.com/download/desktop.

To create a bootable USB drive from an Ubuntu ISO image, you need to use an application such as Rufus. Rufus downloads are available at https://rufus.ie/.

Alternatively, you can install a dual-boot Ubuntu/Windows or an Ubuntu-only configuration.

Storing User Applications and Data

User applications and data should be located in the directory indicated in the APOLLO_DATA environment variable (typically /var/apollo/data). Doing so ensures that user applications and data are not affected by updates and are included in the SmartServer IoT's backup mechanism.

Connecting to the Console

To receive status updates during SmartServer IoT backup and restore operations, you need to be connected to the SmartServer IoT's  serial console port (USB micro B, 115200, 8,1,N) using a terminal emulator, such as PuTTY for Windows or microterm for Ubuntu.

PuTTY downloads are available at https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Microterm downloads are available at https://sourceforge.net/projects/microterm/.

Cloning the SmartServer IoT

You cannot clone a target SmartServer with the same backup file more than once; however, if you re-image the SmartServer, then you can perform another clone. In addition, you cannot put two SmartServer clones on the same network. 

Cloned SmartServers are not supported in a SmartSupervisor configuration (only SmartServer Manager configurations are supported).

The sections that follow describe the necessary steps to clone a SmartServer IoT, including:

  1. Backing Up a Source SmartServer

  2. Copying the Source SmartServer Backup File to the Target SmartServer

  3. Restoring the Source SmartServer Backup File to the Target SmartServer

Backing Up a Source SmartServer

To create a source SmartServer backup, perform the following steps:

  1. Connect an Ethernet patch lead from the source SmartServer IoT's  RJ45 LAN connector to an Ethernet switch port on your local LAN with a DHCP server running (unless you are using a static IP address).

  2. Connect your PC to the same LAN and subnet as the source SmartServer IoT using an Ethernet lead. Alternatively, use the SmartServer's Rapid Fallback feature (if enabled) to set the SmartServer IoT's address to 192.168.1.222, which will allow a direct Ethernet connection from the PC to the SmartServer IoT. In this case you will have to manually configure the PC to be on the same subnet as the source SmartServer IoT.

  3. Remove any USB devices from the source SmartServer. 

  4. Connect the terminal emulator to the console port using a USB cable and power up the SmartServer.

  5. Find the SmartServer IoT's IPV4 address for the eth0 port (shown as inet addr:192.168.168.5 in the example below, third line) using the ifconfig command from a console connection. When using the ifconfig command from the console, either log in as root or enter sudo ifconfigSee Step 2 - Connect to Your SmartServer IoT

    A result similar to the following appears:

    apollo@smartserver-17qes5s:~$ sudo ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.92.3 netmask 255.255.255.0 broadcast 192.168.92.255 inet6 fe80::2d0:71ff:fe0d:29b4 prefixlen 64 scopeid 0x20<link> ether 00:d0:71:0d:29:b4 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 15 bytes 1501 (1.5 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.1.19 netmask 255.255.255.0 broadcast 10.0.1.255 inet6 fe80::2d0:71ff:fe0d:29b5 prefixlen 64 scopeid 0x20<link> ether 00:d0:71:0d:29:b5 txqueuelen 1000 (Ethernet) RX packets 173745 bytes 32293766 (32.2 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 22152 bytes 7542313 (7.5 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ip70: flags=4291<UP,BROADCAST,RUNNING,NOARP,MULTICAST> mtu 1500 inet 172.24.25.128 netmask 255.255.255.0 broadcast 172.24.25.255 inet6 fe80::2d0:71ff:fe0d:29b6 prefixlen 64 scopeid 0x20<link> ether 00:d0:71:0d:29:b6 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 86 bytes 5920 (5.9 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 4889645 bytes 335225008 (335.2 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4889645 bytes 335225008 (335.2 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lon0: flags=67<UP,BROADCAST,RUNNING> mtu 1280 inet 44.137.199.120 netmask 255.255.0.0 broadcast 44.137.255.255 inet6 fe80::2d0:71ff:fe14:bf43 prefixlen 64 scopeid 0x20<link> ether 00:d0:71:14:bf:43 txqueuelen 1000 (Ethernet) RX packets 4253 bytes 200042 (200.0 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4258 bytes 132269 (132.2 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 vlon0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1280 inet 44.137.199.121 netmask 255.255.0.0 broadcast 44.137.255.255 inet6 fe80::2d0:71ff:fef4:bf43 prefixlen 64 scopeid 0x20<link> ether 00:d0:71:f4:bf:43 txqueuelen 1000 (Ethernet) RX packets 4258 bytes 132269 (132.2 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4253 bytes 200042 (200.0 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 apollo@smartserver-17qes5s:~$
  6. Connect to the source SmartServer IoT's CMS from a browser at:

    1. With SmartServer release 2.8 or higher:

      https://<IPV4 address>/cms
    2. With SmartServer release prior to 2.8: 

      https://<IPV4 address>:8443/cms


      The CMS login window appears.



  7. Login using the username and password. Note that the username is always apollo, but the password may have been changed from the one that is printed on the rear label of the SmartServer.

  8. Perform a full system backup. See Backing up and Restoring the SmartServer.