Create an OS backup
Note:
Different product lines can differ in these methods slightly or do not have them at all. This methods are valid only for Unipi Edge products.
Which method for backup to use? Also consider how the backup will be restored. Different backup method can produce different backup file types. They are sorted from easiest to hardest.
-
- Recommended method to backup
- Backed-up device must have USB A port
- PC / Notebook connected to same network
- Backup can be restored via USB or web interface
- Progress of the backup process and any errors are shown in web interface
- An USB flash drive with enough storage size
-
- Another device with Linux OS connected directly to the backed-up device
- USB-C cable is needed
- The backup can be later restored using USB flash drive or service web interface
- Primarily for more experienced users
- Cannot be used on units with secure boot enabled
-
- Another device connected directly to the backed-up device
- USB-C cable is needed
- Primarily for more experienced users
- File with backup will have the same size as storage capacity of the backed-up device
- The backup can be restored only with reverse operation
- Cannot be used on units with secure boot enabled
Creating an OS backup on a USB flashdisk
- Prepare a USB flash disk in FAT32 format with capacity at least as used space on the unit plus approximately 100 MB
- Start the device in the service mode
- Insert the flash disk into any USB A port on the device and wait for approx. 5 seconds
- In the service interface, click on the Backup to USB flash button located in the Backup dialogue window
- The unit will start creating the OS backup, the progress of the backup can be monitored in the field under the Messages label.
- Upon finishing the process, an “Updated successfully” prompt will be displayed in the service display
- You can now reboot the device using a button on the upper right corner of the web interface
- To flash the backup back or to another device of the same product line, follow the instructions in Flashing the OS using USB flashdisk article.
Note:
The backup process should always finish, but restoring from the backup can cause problems.
If restoring the backup OS image fails, you need to use a different flash drive for the backup.
Note:
Not every model of Unipi Edge has an USB A port. To backup the OS on such models see backup using initialization mode.
Backup using initialization mode
Attention:
The following guides are for more experienced users.
Backup an OS image as .swu
Attention:
This procedure is only possible on devices with Linux OS and root access.
- Start the unit in Initialization mode
- Enter the lsblk command and identify which device is the attached eMMC storage, typically sda, sdb, etc. or find it from kernel log using dmesg
[114570.735872] usb 1-1.3: New USB device found, idVendor=0a5c, idProduct=0104, bcdDevice= 1.00 [114570.735903] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [114570.735917] usb 1-1.3: Product: Raspberry Pi multi-function USB device [114570.735928] usb 1-1.3: Manufacturer: Raspberry Pi [114570.735938] usb 1-1.3: SerialNumber: 10000000ff00a88e [114570.797566] usb-storage 1-1.3:1.0: USB Mass Storage device detected [114570.798207] scsi host0: usb-storage 1-1.3:1.0 [114570.806660] cdc_acm 1-1.3:1.1: ttyACM0: USB ACM device [114571.803910] scsi 0:0:0:0: Direct-Access mmcblk0 PQ: 0 ANSI: 2 [114571.805093] scsi 0:0:0:0: Attached scsi generic sg0 type 0 [114571.806559] sd 0:0:0:0: Power-on or device reset occurred [114571.808665] sd 0:0:0:0: [>>sda<<] 15269888 512-byte logical blocks: (7.82 GB/7.28 GiB) [114571.940909] sd 0:0:0:0: [sda] Write Protect is off [114571.940937] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00 [114572.072867] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
- Download and extract the rpiboot2swu.sh script from Git repository
- Run the rpiboot2swu.sh script
sh rpiboot2swu.sh /dev/sdX [output_directory]
Replace the sdX with the device, sda in this case. Current directory is chosen by default and if given it must exist
- The script creates a backup file archive.swu and a script swu2rpiboot.sh used to restore specifically this backup
- When finished, disconnect 24 V DC power supply and the USB-C cable
- The resulting backup file archive.swu can be used to flash the OS using service interface, using USB flashdisk or using the rpiboot2swu.sh script
Backup as raw OS image
- Start the unit in Initialization mode
- Identify which device is the attached eMMC storage
- Mac / Linux - Use lsblk command, the storage will typically be sda, sdb, etc.
- Windows - Find the device label in My PC
- Open Win32 disk imager (Windows) or use dd utility (Mac / Linux)
- Copy the content of the block device to local machine / unit
- example of using dd
dd if=/dev/sdX of=backup.raw conv=fsync status=progress
- When finished, disconnect 24 V DC power supply and the USB-C cable
- The created backup can be used to restore unit using the steps in Flash from raw OS image procedure.