Create and verify a clone package on RobustOS Pro

Create and verify a clone package on RobustOS Pro

Before restoring: A clone can replace configuration and data on the target. Back up the target and use a compatible test device first. Treat clone files as sensitive: they may contain credentials, certificates, keys or site-specific configuration. Verify what is included and how device identity is handled for the exact firmware and hardware before deploying to a fleet.

1.Overview of Clone Packages

A Robustel EG Series gateway can support creating a RobustOS Pro clone package when configurations and applications must be copied across compatible Edge Gateway devices. This guide describes the clone process and its stated scope. Verify the exact included data, hardware identity and restore behavior for the device and firmware in use. The key conclusion is that cloning must not duplicate site-specific IP addresses, SSH keys, certificates or cloud identities across deployed devices.

1.1 What is a Clone Package?

A Clone Package is a comprehensive system snapshot of a "Template Gateway." Unlike a simple configuration backup, it can capture a broader software and configuration state than a settings-only backup. The included data depends on the device, firmware and clone procedure.

1.2 Clone package contents

  1. Bootloader Partition: Core hardware initialization and OS.
  2. Kernel Partition: The Linux kernel.
  3. Rootfs Partition (Read-only): The factory-standard operating system.
  4. Overlay Partition (Read/Write): User-level changes may include installed applications, custom scripts, and network or system configuration. Verify the contents and restore behavior for the exact version; do not assume every container or file is included.

🚫 Items to verify after cloning
The following describes the original example's expectations. Verify identity and runtime behavior on a test target; do not assume every device or release excludes the same data.
  1. Hardware-Bound Identifiers: Hardware-derived identifiers such as physical MAC addresses,IMEI values, and device serial numbers (SN) are typicallypreserved by the target hardware and are not intended to be overwritten by the clone package.
  2. Real-time Volatile State: Temporary runtime data such as active process states,RAM-resident sessions, and transient files under /tmpare not preserved across cloning operations.
  3. Live Cellular Connection States: Temporary modem session states, network registration,dynamic signal metrics (e.g., RSRP/RSRQ), and active carrier attachment states are not preserved.

⚠️ Identity Duplication Risk
Clone packages may include system-level identities, such as static IP addresses, SSH host keys, TLS/SSL certificates, VPN credentials, and cloud/application identifiers. Verify which identities are included and regenerate device-specific values where required. In large-scale deployments, failing to do so may result in:
  1. Network conflicts
  2. Authentication failures
  3. Duplicate cloud registration
  4. MQTT client collisions
For production deployments,it is strongly recommended to implement first-boot provisioning mechanism to regenerate device-specific identities.

⚠️ CRITICAL WARNINGS
  1. Identity Duplication: A clone may include IP addresses, SSH keys, SSL certificates, and device-specific credentials. In large-scale deployments, failure to regenerate device-specific identities may result in network conflicts,authentication failures, or duplicate device registration.
  2. Hardware Binding: Clone compatibility depends on the device and firmware. For this EG5120 example, use a target with the same model, hardware variant and memory configuration; confirm compatibility in the applicable release instructions and test on a suitable target before fleet deployment.
  3. Data Overwrite: Restoring a clone package can replace or erase configuration and data on the target. Back up the target externally and verify the applicable procedure before restoring.
  4. Baseline Reset Transformation: A clone may become the factory-reset baseline. Verify whether this happens on the exact model and firmware, including which configuration and credentials the reset restores. Check the device-specific procedure before attempting to return to an earlier factory image.

Quick-Start Workflow:

1.  Prepare: Check that the gateway has compatible firmware (v2.4.0 or later in this example) and create a sudo account. Upgrade only if required for your device.
2.  Clean: Run sudo apt-get clean to minimize package size.
3.  Create: Insert an ext4 USB drive and run: sudo rbt-system-mgmt clone create -D /media/sda1. The path is an example; use the drive’s actual mounted path.
4.  Restore: On target device, run: rbt-system-mgmt clone restore <file>.
5.  Verify: Reboot and check status with rbt-system-mgmt restore status.

Diagram of system data, system, kernel and bootloader partitions

2.Prerequisites

  • Hardware: Supported models (EG3110, EG5100, EG5101, EG5120, EG5200, LG5100, R1520LG and EV8100.).
  • Firmware: The original EG5120 example uses RobustOS Pro V2.4.0 or later. Confirm clone support and compatibility for the exact source, target and firmware before proceeding.
  • Storage Buffer: The /overlay partition in the original example should have at least 50% free space for temporary compression during creation. Large containers or applications can reduce the available space; cloning may fail if there is insufficient space.
  • Stability: Use a high-quality USB 3.0 drive to prevent data corruption during the compression/decompression phase
  • Mount Point: By default, the system looks for the USB at /mnt/usb or similar. If using a custom path, use the -D parameter during creation

3. Core Value

  • Large-Scale Efficient Deployment: By using clone packages to batch replicate systems, deployment efficiency and accuracy can be significantly improved.
  • Rapid Recovery from Extreme Failures: In extreme situations where the gateway experiences business interruptions due to hardware replacement or system crashes, a clone package may help restore the operating environment. Recovery time and the data restored depend on the device, firmware and procedure; test the recovery process before relying on it.

4.Clone Package Creation Process

4.1 Preparing Stage

Step 1: Select the Template Gateway

For ensuring consistency in the cloned environment,choose a device that is identical to the target gateway model (e.g., EG5120_C2FCZ) as the template. 

Upgrade the Gateway Firmware (Recommend)

Warning: The factory package in this example is for local installation and erases data on the device. Back up important data before proceeding and maintain power during installation. Use a package approved for the exact model and firmware; do not install the example 2.4.0 package over a later release without confirming that the downgrade is supported.
  1. Requirements: The original example requires firmware V2.4.0 or higher. Check clone support for your exact device and firmware; update only if needed.

  2. Operation Steps:

  • Log in to the gateway's web management interface (default address: 192.168.0.1).
  • Navigate to System > Update and select the approved factory package for your device. The file factory-eg5120_2.4.0_arm64.deb is an example for an EG5120 on 2.4.0; it is not a universal upgrade target.
For more devices, you can find their Factory Package from the following link: RobustOS Pro Factory Package v2.4.x

System Update page with firmware file selection and Install button

  • After the upload is complete, click "OK" to proceed with the firmware upgrade.

Warning dialog stating that user data will be destroyed after an upgrade

  • After the installation is complete, click "OK" to reboot the device.

Dialog prompting for a reboot after installation

  •  If succeed, the new firmware version will be updated, and can be seen form the "System Information" page.

Step 2: Create a Sudo account

Creating a clone package requires system permissions in advance. For getting the administrative access, please ensure that you are using an account with sudo privileges to execute the relevant commands.

  • Navigate to "System > User Management", Click "+" to create a Sudo user account.

User Management page showing the Sudo User tab and add button

Sudo user form with username and masked password fields

  • Make sure to click the "Save & Apply" button to save the account. 

Save and Apply icon in the gateway header

Step 3: Deploy Applications and Validate Configuration

  1. Application Deployment: On the template gateway, install and configure all necessary applications according to actual business needs.
  2. Function Validation: To avoid any abnormal states in the clone package, a testing must be conducted to ensure all applications and configurations are functioning correctly.Crucially, after installing applications, check available overlay space. The original example recommends at least 50% free; confirm requirements for your device and workload.

    You can use the df command to verify the overlay partition's remaining space.

    Robustel@Edge-Gateway:~$ df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mmcblk2p4 256512 256512 0 100% /rom
    devtmpfs 908748 0 908748 0% /dev
    tmpfs 976780 0 976780 0% /dev/shm
    tmpfs 390716 25912 364804 7% /run
    tmpfs 5120 4 5116 1% /run/lock
    /dev/mmcblk2p9 13074580 168160 12220472 2% /overlay
    /dev/mmcblk2p6 256 256 0 100% /middle/extend
    overlayfs:overlay 13074580 168160 12220472 2% /
    /dev/mmcblk2p7 14585 14 13425 1% /misc
    /dev/mmcblk2p8 287237 39529 228252 15% /data
    tmpfs 976780 144 976636 1% /tmp
    tmpfs 976780 184 976596 1% /var/config
    tmpfs 976780 0 976780 0% /var/socks
    tmpfs 976780 84 976696 1% /var/status

4.2 Create the Clone Package

Important: Application data, including an active database, can change while a clone is being created. Follow the application's documented backup or quiescence procedure, arrange downtime if needed, and test the restored data on a compatible test device before deployment.

The clone package is created using the rbt-system-mgmt clone create command, which supports custom storage paths and optional backups

Parameter Description Example

Clone package parameters
-D 
<directory>

Description: Custom storage path for the clone package. The default path is /overlay/clone/.
Example: -D /media/usb-storage (to store the clone package in /media/usb-storage)
-b
Description: Includes the backup file in the clone package. Note: Ensure a backup file already exists on the gateway before use.
Example: If a backup exists, add the -b parameter to include it.
-s
Description: Includes the snapshot backup file in the clone package. Note: Ensure a snapshot backup already exists on the gateway before use.
Example: Add the -s parameter to include the snapshot backup.
-f
Description: Includes the factory backup file in the clone package. Note: Ensure a factory backup already exists on the gateway before use.
Example: If a factory backup exists, add the -f parameter to include it.
  • Snapshot: A system archive created and restored manually. On RobustOS Pro 2.4.1, only one snapshot is supported; creating another overwrites the previous snapshot.
  • Backup: A system copy used for recovery. On RobustOS Pro 2.4.1, it can be created manually, and Auto Update creates one before an update. When Automatic Failback is enabled, the device can restore it after a boot failure. Only one backup is supported; a new backup overwrites the previous one.
  • Factory Backup: A factory baseline used for recovery. On RobustOS Pro 2.4.1, if Automatic Failback is enabled and no backup exists after a boot failure, the device restores the factory backup.
  • Command Example: Save the clone package to a USB storage device. To include a backup, use the appropriate option described above.
Clean the APT cache to reduce the package footprint.
sudo apt-get clean
rm -rf /var/lib/apt/lists/*

Step 2: Generation

Insert the ext4 USB drive and run the creation command.

sudo rbt-system-mgmt clone create -D /media/sda1
  • Input: Configured Reference Device.

  • Output: A .tar.gz package file.

If succeed, the executing result will be:
/dev/mmcblk2boot0 is the active uboot partition!
creating clone...
tar: /overlay/upper/var/agentx/master: socket ignored ] 4% ETA 0:03:05
950MiB 0:02:44 [5.76MiB/s] [==============================================================================>] 100%
Archive created successfully: /media/sda1/EG5120_C2FCZ-clone-2.4.0.20251017.e686882b.tar.gz
TYPE=clone
RAW=273
COMPRESSED=253
TAR_SIZE=264294910
HASH=58a1cc9bcd0d3d583908739ee317f5ac244f62862f03a60fa6b2a0c7f4b55e1a
SYS_VERSION=20250927-g87f4040+
MODEL=EG5120-C2FCZ
CREATE_TIME=1760695903
VERSION=2.4.0.20251017.e686882b
SECURE_BOOT=false
The clone has been created successfully, the file is /media/sda1/EG5120_C2FCZ-clone-2.4.0.20251017.e686882b.tar.gz
The result demonstrates that the clone has been created successfully. File will be created,and its path is shown as /media/sda1/EG5120_C2FCZ-clone-2.4.0.20251017.e686882b.tar.gz in USB Drive.

4.3 Validate & QA (Crucial Step)

Use these checks to inspect the package and test a restore on a compatible device. Metadata alone does not establish file integrity, authenticity or successful application recovery. 

Step: check the metadata of the clone package.(Recommend)

To confirm the tar.gz files exists on the USB, use the following command to check the metadata of the clone package:
rbt-system-mgmt clone info /media/sda1/EG5120_C2FCZ-clone-2.4.0.20251017.e686882b.tar.gz
TYPE=clone
RAW=273
COMPRESSED=253
TAR_SIZE=264294910
HASH=58a1cc9bcd0d3d583908739ee317f5ac244f62862f03a60fa6b2a0c7f4b55e1a
SYS_VERSION=20250927-g87f4040+
MODEL=EG5120-C2FCZ
CREATE_TIME=1760695903
VERSION=2.4.0.20251017.e686882b
SECURE_BOOT=false
Key checks: Ensure that MODEL (device model), VERSION (system version), and SECURE_BOOT (whether enable secure boot) are correct.

Step 1: Restore to a Test Device

Select a test gateway of the same model as the template and perform a recovery operation using this clone package.The result of a successful process is shown as below:
rbt-system-mgmt clone restore /media/sda1/EG5120_C2FCZ-clone-2.4.0.20251017.e686882b.tar.gz
The operation would result in removing the existing backup and snapshot, and the current system will be overwritten. (Y/N) Y
checking for restore validity...
OK!
Extracting clone into directory '/overlay/restore'...
Start using clone to restore the system...
tar: Removing leading `/' from member names
252MiB 0:00:07 [31.7MiB/s] [==========================================================================================>] 100%
The system version is the same, skip restore system image.
/overlay/.rbt-system-mgmt-blocked-list will be removed.
/overlay/.rbt-system-mgmt-failback will be removed.
/overlay/lost+found will be removed.
done!
The system has been cloned successfully. Reboot is required to take effect.
root@Edge-Gateway:~# reboot

Step 2: Verification Checklist

Warning: On RobustOS Pro 2.4.1, a factory reset erases data and settings. Back up the target, perform this test on a compatible test gateway, and maintain power throughout the reset.
LED pattern
The original USB example reports rapid RUN LED flashing during writing and a "Chasing Light" pattern when finished. Confirm the indicators for the model, firmware and restore method.
Software status
After reboot, run sudo rbt-system-mgmt restore status. The original example shows Restore result: success.
Factory reset test
Perform a Factory Reset only on a compatible test device after backing it up. In this example, check whether the device returns to the Clone Package state. Verify the documented reset behavior for the model and firmware.
Connectivity
Verify the device connects using the intended configuration. Check for duplicated credentials and provision device-specific values where required.
  • The original USB installation example describes rapid RUN LED flashing followed by a chasing-light pattern and another reboot. Indicator behavior and media removal timing may differ by model, firmware and restore method. Follow the instructions for the specific device and do not remove the drive while it is in use.
Gateway indicator lights including RUN and USR
  • Execute the following command in the device to initiate a reboot:
Robustel @Edge-Gateway:~$ reboot
  • After the system reboots, use the command below to check the results of the restoration process:
root@Edge-Gateway:~# rbt-system-mgmt restore status
Restore command: rbt-system-mgmt clone restore /overlay/clone/EG5120_C2FCZ-clone-2.4.0.20251017.e686882b.tar.gz at 2025-10-17 18:32:26
Restore result: success at 2025-10-17 18:33:17
root@Edge-Gateway:~#
  • Once recovery is complete, check the system, applications, and configurations on the test gateway against your expected results before deploying to other devices.
⚠️ CRITICAL WARNING:
Factory Default Override: A clone can become the factory-reset baseline. Confirm the reset behavior and included credentials for the exact model and firmware before relying on it.


5.Troubleshooting:What if it fails?

In industrial deployments, understanding "Failure" is as critical as following the "Success" path. If the cloning process doesn't results as expeted, refer to the common scenarios below.

5.1 Common Creation Failures

The following scenarios outline common failures during the clone and restore process, accompanied by troubleshooting tips to help identify and resolve them.
  1. Insufficient Storage Space

    1. Cause: The overlay or destination drive may have insufficient free space. The original example uses 50% free overlay space as a planning guideline.

    2. Solution: Preserve any needed logs and data, review available space and use a suitable destination drive. Remove data only when it is safe to do so.

  2. Incorrect File System Format

    1. Cause: The external USB drive is not formatted correctly.

    2. Solution: Ensure the USB drive is formatted to ext4 before attempting to create the clone.

  3. Write Permission Errors

    1. Cause:The system cannot write to the designated path.

    2. Solution: Ensure the USB is correctly mounted (e.g., /media/sda1) and that you are using sudo to execute the command.

5.2 Common Restoration Failures

These are the failures happen sometimes without a clear result, sometimes you can try to locate it in the scenarios we held below:
  1. Hardware or RAM Mismatch
    1. Cause: The clone package was created on a different model or a device with a different RAM size.
    2. Solution: Only deploy clone packages to identical hardware models ( Not only the Device Type, but also RAM size). 
  2. Firmware Incompatibility
    1. Cause: The target device is running an unsupported firmware version.
    2. Solution: Check clone support and source/target compatibility for the exact hardware and firmware. Upgrade only if the applicable device instructions require and support it.
  3. Premature Media Removal
    1. Cause: The USB drive was unplugged before the reboot and background restoration processes were finished.
    2. Solution: Keep the USB drive inserted until the device fully reboots and the status indicator light confirms completion.
  4. Corrupted Clone Package
    1. Cause: The package file is broken or incomplete.
    2. Solution: Run rbt-system-mgmt clone info <file> to inspect the package metadata. If it fails, investigate and recreate the package if appropriate. A successful metadata read alone does not prove file integrity or authenticity; compare against a trusted checksum when one is available and test restoration.

Clone Package Installation

If you require this clone package to be pre-installed during the product manufacturing process, please provide it to our Technical Support team. Otherwise, skip this step.

Document Feedback

We welcome your feedback to improve this document. Please send any suggestions or corrections to support@robustel.com 。

6. Conclusion

A Robustel EG Series gateway is correctly configured for creating a RobustOS Pro clone package when the target boots with the intended software and configuration while unique identity values are regenerated or provisioned separately. This confirms repeatable deployment without creating duplicate device identities.