/
Backing up and Restoring a SmartServer to Multiple Sites

Backing up and Restoring a SmartServer to Multiple Sites

The CMS Import/Export button is available with SmartServer 3.5 and higher. For SmartServer 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 back up 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.

You can clone a SmartServer by creating a backup image and restoring it on or multiple SmartServers. This method replicates a reference (source) SmartServer to another (target) SmartServer(s) so that each cloned SmartServer's configuration is identical to the reference SmartServer. A SmartServer full system restore preserves the new SmartServer's MAC addresses and changes the serial number, host name, install code, segment ID (SID), and apollo password.

Since the SmartServer software is part of the cloned image, the clone has to be rebuilt with every new release to stay current, or each cloned SmartServer has to be updated to the latest release as part of the update process. If you have multiple SmartServers, then you cannot restore the same backup image more than once onto the same network. 

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

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.

This section describes how to backup and restore a SmartServer to multiple sites and consists of the following:

Prerequisites

Backing up the SmartServer IoT

SmartServer backups are stored on the SD Card in the /media/sdcard/backups directory. There can be multiple backup files on the SD Card. System backups that were created using the Download method will appear similar to the following example: 

17qes5s-System-2024-10-12-140227.zip

The SmartServer'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. However, for efficiency in a production environment, you can use a Linux PC to read or write to the SD Card. If you do not want to modify your existing PC configuration, then you can use a trial version of Ubuntu to do this, where you boot the PC from a USB drive with a bootable version of Ubuntu installed. To create a bootable USB drive from an Ubuntu ISO image, use an application such as Rufus. Alternatively, install a dual-boot Ubuntu/Windows or an Ubuntu-only configuration.

Storing User Applications and Data

User applications and data are located in the directory that is specified in the APOLLO_DATA environment variable. Typically the directory is /var/apollo/data) to ensure that user applications and data are not affected by updates and are included in the SmartServer's backup mechanism.

Connecting to the Console

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

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 ifconfig. See 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. Open the SmartServer CMS.

  7. Perform a full system backup. See Creating Backups.

Continue with the SmartServer cloning process by following the steps in the Copying the Source SmartServer Backup File to the Target SmartServer section below.

Copying the Source SmartServer Backup File to the Target SmartServer

Follow the appropriate procedure to copy the source SmartServer backup file to the target SmartServer for your environment below:

  • Using Windows

  • Using Ubuntu

Using Windows

You can use an SFTP application such as WinSCP to read the backup file from the source SmartServer IoT's SD Card, then store it on the Windows PC, and finally write the backup file to the target SmartServer IoT's SD Card. This process assumes that the Windows PC, as well as the source and target SmartServer IoT, are all connected to the same subnet and their addresses are known.

The backup file can be read from /media/sdcard/backups on the source SmartServer IoT, copied to a temporary location on the Windows PC, and written to /media/sdcard/backups on the target SmartServer IoT. Depending on the infrastructure, this process will take at least 120s to read and write the backup file. Once the process is completed, the USB console cable should be removed from the source SmartServer.

Continue with the SmartServer cloning process by following the steps in the Restoring the Source SmartServer Backup File to the Target SmartServer section below.

Using Ubuntu

To copy a source SmartServer backup file to the target SmartServer, perform the following steps:

  1. Copy the SmartServer backup file from the source SmartServer's SD Card to the Linux PC. Although you can copy the backup file from the source SmartServer to the target SmartServer using an intermediate flash drive, in a production environment, it is more efficient to copy the backup file from the source SmartServer's SD Card to the Linux PC first, and then copy the backup file to the target SmartServer’s SD Card. 

  2. Copy the file from the Linux PC to the target SmartServer SD Card.

  3. Once reboot has completed after the backup operations, power-down the source SmartServer.

  4. Remove the SD Card from the source SmartServer.

  5. Using a suitable USB micro SD Card adapter, insert the SD Card into the adapter (unless the PC has a built in SD Card reader).

  6. Insert the USB adapter into the Linux PC.

  7. Copy the backup file from the SD Card's backups directory to the Linux PC.

  8. Determine the SD Card device by entering the following command at the console:

    sudo fdisk -l


    Messages similar to the following will appear on the console:

    ubuntu@ubuntu:~$ sudo fdisk -l Disk /dev/loop0: 1.9 GiB, 2029981696 bytes, 3964808 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop1: 89.1 MiB, 93417472 bytes, 182456 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop2: 54.7 MiB, 57294848 bytes, 111904 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop3: 44.9 MiB, 47063040 bytes, 91920 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop4: 160.2 MiB, 167931904 bytes, 327992 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop5: 4.2 MiB, 4403200 bytes, 8600 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop6: 14.8 MiB, 15462400 bytes, 30200 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop7: 956 KiB, 978944 bytes, 1912 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x96d7c2b4 Device     Boot   Start        End    Sectors  Size Id Type /dev/sda1  *       2048    1187839    1185792  579M  7 HPFS/NTFS/exFAT /dev/sda2       1187840 1953521663 1952333824  931G  7 HPFS/NTFS/exFAT Disk /dev/sdb: 28.7 GiB, 30752636928 bytes, 60063744 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x0033a204 Device     Boot Start      End  Sectors  Size Id Type /dev/sdb1  *     2048 60063743 60061696 28.7G  c W95 FAT32 (LBA) Disk /dev/loop8: 3.7 MiB, 3825664 bytes, 7472 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/sdc: 29.8 GiB, 32010928128 bytes, 62521344 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device     Boot Start      End  Sectors  Size Id Type /dev/sdc1        8192 62521343 62513152 29.8G  c W95 FAT32 (LBA)

     

    In the example above (last line), the SD Card appears as device /dev/sdc1/. If you are unsure which device it is, then enter the command both with and without the SD Card adapter plugged-in.

  9. Create a local directory to mount the SD Card by entering the following command:

    sudo mkdir /media/mysdcard

     

  10. Mount the SD Card to the new directory by entering the following command (use the appropriate device determined in step #8):

    sudo mount <device> /media/mysdcard

    Example

    sudo mount /dev/sdc1 /media/mysdcard

     

  11. Determine the backup file name by entering the following command (there may be multiple backup files):

    ls /media/mysdcard/backup

     

    Messages similar to the following will appear on the console:

    ubuntu@ubuntu:~$ ls /media/mysdcard/backups SmartServer-System-Backup-2022-03-03-154632.tgz SmartServer-System-Backup-2022-03-10-114532.tgz SmartServer-System-Backup-2022-03-12-091112.tgz Copy the name of the backupfile by selecting the text, right clicking and selecting copy.

     

  12. Create a directory to store the backup file on the Linux PC by entering the following command:

    sudo mkdir /home/clone

     

  13. Copy the required backup file the local directory by entering the following command (use the backup file name appropriate for your environment):

    sudo cp SmartServer-System-Backup-2022-03-12-091112.tgz /home/clone

     

  14. Unmount the SD Card by entering the following command (use the appropriate device for your environment):

    sudo umount /dev/sdc1

     

  15. Insert the SD Card into the source SmartServer.

  16. Power-down the target SmartServer.

  17. Remove any USB devices.

  18. Remove the SD Card.

  19. Replace the SD Card into the USB SD Card adapter in the Linux PC.

  20. Mount the SD Card by entering the following command (use the appropriate device for your environment):

    sudo mount /dev/sdc1 /media/mysdcard

     

  21. Copy the backup file from the Linux PC to the SD Card's backups directory by entering the following command (use the backup file name appropriate for your environment): 

    sudo cp /home/clone/System-Backup-2022-03-12-091112.tgz /media/mysdcard/backups

     

  22. Unmount the SD Card by entering the following command (use the appropriate device for your environment):

    sudo umount /dev/sdc1

     

  23. Remove the SD Card from the USB adapter.

  24. Insert the SD Card into the target SmartServer.

  25. Remove the USB console cable from the source SmartServer.

Continue with the SmartServer cloning process by following the steps in the Restoring the Source SmartServer Backup File to the Target SmartServer section below.

Restoring the Source SmartServer Backup File to the Target SmartServer

To restore a source SmartServer backup file to the target SmartServer, perform the following steps:

  1. Save the apollo password for any backed-up SmartServer system image. If you restore a system image onto a new SmartServer, then the new SmartServer will have its password changed to the old SmartServer's password (from the backup image file).

  2. Connect an Ethernet patch lead from the target SmartServer's RJ45 LAN connector to an Ethernet switch port on your local LAN with a DHCP server running (this assumes a new SmartServer).

  3. Connect your PC to the same subnet as the target SmartServer using an Ethernet lead. Alternatively, use the SmartServer's Rapid Fallback feature to set the SmartServer's address to 192.168.1.222, which will allow a direct Ethernet connection from the PC to the SmartServer.

  4. Remove any USB devices from the target SmartServer.

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

  6. Find the SmartServer's IPV4 address using the ifconfig command from a console connection. When using the ifconfig command from the console, either log in as root or enter sudo ifconfig. See Step 2 - Connect to Your SmartServer IoT

  7. Open the SmartServer CMS.

     

  8. Click the Import/Export button () located on the SmartServer app bar.


    The Import/Export dialog appears.

    image-20250227-221941.png
    Example: SmartServer Manager

     

    image-20250304-212923.png
    Example: SmartSupervisor

     

  9. Verify or select the SmartServers (if multiple) to be used for the restore.

  10. Select the Import Source (i.e, Upload to upload a backup file from your PC or Local Storage to retrieve a backup file from a directory on the SmartServer).

    image-20250227-222051.png

     

  11. If you selected Upload as the Import Source, then select the full system backup file from your PC and place it into the Drop files to import area, or use the browse feature to navigate to the backup file on your PC.

    image-20250227-222106.png

     

  12. If you selected Local Storage as the Import Source, then set or verify Import Location.

    image-20250227-222122.png

     

  13. If you selected Local Storage as the Import Source, then select the full system backup file to be imported from the pulldown list.

    image-20250227-222154.png

     

  14. Click Import and wait for the import process to be completed. An indicator will appear showing that the restore is in progress.You will not be able to access the CMS during the system restore operation. 

  15. To ensure full functionality after the reboot process completes, perform the following steps:

    1. Power-cycle the target SmartServer IoT to ensure full functionality. The target SmartServer IoT may not be accessible over the current IP infrastructure due to IP address changes, and that its password may have changed to that of the source SmartServer IoT.

    2. Verify target SmartServer IoT operations.

Related content