1.Overview of Clone Packages
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 captures the entire operational state of the device.
1.2 What Exactly Gets Cloned?
- Bootloader Partition: Core hardware initialization and OS.
- Kernel Partition: The Linux kernel.
- Rootfs Partition (Read-only): The factory-standard operating system.
- Overlay Partition (Read/Write): All user-level changes, including installed Docker containers, Python apps, custom scripts, and all network/system configurations.
🚫 What is NOT Cloned?
To ensure deployment stability, the following hardware-specific or volatile data are excluded from the package:
- 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.
- 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.
- 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 replicate system-level identities, including static IP addresses, SSH host keys, TLS/SSL certificates, VPN credentials, and cloud/application identifiers.In large-scale deployments, failure to regenerate device-specific identities may result in:
- Network conflicts
- Authentication failures
- Duplicate cloud registration
- MQTT client collisions
For production deployments,it is strongly recommended to implement first-boot provisioning mechanism to regenerate device-specific identities.
⚠️ CRITICAL WARNINGS
- Identity Duplication: Cloning replicates everything, including 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.
- Hardware Binding: Clone package are hardware-specific. A clone package created on an EG5120 can only be restored to another EG5120 with the same hardware variant and memory configuration. Even if you are deploying to the same base model line(e.g.,EG5120), a package created on a unit with 2GB RAM cannot be restored to an EG5120 variant with 1GB of RAM. Doing so will result in a restoration failure.
- Data Overwrite: Restoring a clone package will permanently erase all existing data on the target device.
Baseline Reset Transformation: Successful installation of a clone package establishes a new system baseline. Consequently, the standard "Factory Reset" function will no longer return the device to its original out-of-the-box state, but will instead revert it to this specific cloned configuration. To restore the original factory firmware state, a factory image reinstallation is required.
Quick-Start Workflow:
1. Prepare: Upgrade template gateway to v2.4.0+ and create a sudo account.
2. Clean: Run sudo apt-get clean to minimize package size.
3. Create: Insert ext4 USB and run: sudo rbt-system-mgmt clone -D /media/sda1.
4. Restore: On target device, run: rbt-system-mgmt clone restore <file>.
5. Verify: Reboot and check status with rbt-system-mgmt restore status.

2.Prerequisites
Hardware: Supported models (EG3110, EG5100, EG5101, EG5120, EG5200, LG5100, R1520LG and EV8100.).
Firmware: RobustOS Pro V2.4.0 or higher
Storage Buffer: The /overlay partition must have a least 50% free space for temporary compression overhead during creation to handle temporary compression overhead during the creation phase, If a user installs massive Docker containers or custom Python applications that push storage utilization over 50%, the clone will fail due to 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 can restore the complete operating environment within 1 hour, maximizing business continuity.
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)
Requirements: Following the prerequisites, the clone package functionality requires the firmware version to be V2.4.0 or higher. You need to check and update your firmware version first.
Operation Steps:
Log in to the gateway's web management interface (default address: 192.168.0.1).
Navigate to "System > Update," and upload the V2.4.0 firmware file (e.g., factory-eg5120_2.4.0_arm64.deb).This operation will upgrade the read-only system partition to the target version, restore the template gateway to the factory state of the target version, and help reduce the space occupied by clone package and system backups.
Warning: The factory package isused for local upgrades only, and it will erase all data on the device, just like flashing via USB disk. Please back up any important data before proceeding.
- After the upload is complete, click "OK" to proceed with the firmware upgrade.

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

- 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.


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

Step 3: Deploy Applications and Validate Configuration
Application Deployment: On the template gateway, install and configure all necessary applications according to actual business needs.
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 all applications, ensure the remaining available space on the overlay partition is 50% or more.
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
The clone package is created using the rbt-system-mgmt clone create command, which supports custom storage paths and optional backups
Parameter Description Example
| Parameter | Description | Example |
|---|
-D <directory> | Custom storage path for the clone package. The default path is /overlay/clone/. | -D /media/usb-storage (to store the clone package in /media/usb-storage) |
| -b | Includes the backup file in the clone package. Note: Ensure a backup file already exists on the gateway before use. | If a backup exists, add the -b parameter to include it. |
| -s | Includes the snapshot backup file in the clone package. Note: Ensure a snapshot backup already exists on the gateway before use. | Add the -s parameter to include the snapshot backup. |
| -f | Includes the factory backup file in the clone package. Note: Ensure a factory backup already exists on the gateway before use. | If a factory backup exists, add the -f parameter to include it. |
Snapshot: A manually created and restored system archive, allowing users to save and revert to a specific system state.
Backup: A manually created but automatically restored system copy, designed for the system to invoke automatically upon failure to ensure service continuity.
Factory Backup: A manually restored baseline image that returns the device to its original state, used for data purging or as a last-resort recovery method.
Command Example: Save the clone package to a USB storage device and include backup files.
Step 1: System "Slimming" (Recommended)
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 -D /media/sda1
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 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)
In this section, we 'll prove the package is deployment-ready via physical and logical indicators.
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
| Indicator | Expected Behaviour |
|---|
| LED Pattern | RUN LED flashes rapidly during writing. A "Chasing Light" pattern appears when finished. |
| Software Status | After reboot, run sudo rbt-system-mgmt restore status. It will return: Restore result: success.
|
| Image test
Connectivity
| Perform a Factory Reset. The device should revert to the Clone Package state, NOT the original factory state.
Verify the device automatically connects to the network using the cloned credentials.
|
- Reboot the gateway. The RUN LED will flash rapidly during installation.When the LEDs display a chasing light pattern, the installation is complete. Remove the USB drive at this point, and the device will reboot again
- 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, perform a thorough audit of the system, applications, and configurations on the test gateway to ensure they are fully synchronized and consistent with the template gateway.
⚠️ CRITICAL WARNING:
Factory Default Override: Upon successful installation of the clone package, this configuration becomes the new factory default state. Consequently, any subsequent "Factory Reset" operation will revert the device to the state of this installed clone package rather than the original factory settings.
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.
Insufficient Storage Space
Cause: The device has less than 50% free overlay space, or the destination USB drive is full.
Solution: Delete unnecessary logs/data from the gateway or use a higher-capacity USB drive.
Incorrect File System Format
Cause: The external USB drive is not formatted correctly.
Solution: Ensure the USB drive is formatted to ext4 before attempting to create the clone.
Write Permission Errors
Cause:The system cannot write to the designated path.
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:
- Hardware or RAM Mismatch
- Cause: The clone package was created on a different model or a device with a different RAM size.
- Solution: Only deploy clone packages to identical hardware models ( Not only the Device Type, but also RAM size).
- Firmware Incompatibility
- Cause: The target device is running an unsupported firmware version.
- Solution: Ensure the target device is upgraded to RobustOS Pro v2.4.0 or higher before restoration.
- Premature Media Removal
- Cause: The USB drive was unplugged before the reboot and background restoration processes were finished.
- Solution: Keep the USB drive inserted until the device fully reboots and the status indicator light confirms completion.
- Corrupted Clone Package
- Cause: The package file is broken or incomplete.
- Solution: Run rbt-system-mgmt clone info <file> to verify the package metadata. If it fails, recreate the clone from the template device
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 suggestionsor corrections to support@robustel.com 。