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

(!)

Attention:
After time some hardware parameters of compute module can be updated (different RAM, different eMMC). This can require firmware update of compute module for correct functionality. All devices are always shipped with up-to-date firmware for compute module.

When restoring the backup from older device, the older firmware might be incompatible with a newer compute module and the device might not run properly. It is recommended to regularly update and maintain the backup of the devices to be compatible with the newest version. The backups will then be usable for newer devices. For more information follow the PCN from the compute module manufacturer (https://pip.raspberrypi.com/).

If a situation happens, where backup cannot be restored (the device is not starting), it is necessary to restore the backup on some other older device and update the system. Then create a backup from the newly updated system. This new backup will work on newer devices.

  1. Prepare a USB flash disk in FAT32 format with capacity at least as used space on the unit plus approximately 100 MB
  2. Start the device in the service mode
  3. Insert the flash disk into any USB A port on the device and wait for approx. 5 seconds
  4. In the service interface, click on the Backup to USB flash button located in the Backup dialogue window
  5. The unit will start creating the OS backup, the progress of the backup can be monitored in the field under the Messages label.
  6. Upon finishing the process, an “Updated successfully” prompt will be displayed in the service display
  7. You can now reboot the device using a button on the upper right corner of the web interface
  8. 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.

(!)

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.

  1. Start the unit in Initialization mode
  2. 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
  3. 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

  4. The script creates a backup file archive.swu and a script swu2rpiboot.sh used to restore specifically this backup
  5. When finished, disconnect 24 V DC power supply and the USB-C cable
  6. 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

  1. Start the unit in Initialization mode
  2. 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
  3. Open Win32 disk imager (Windows) or use dd utility (Mac / Linux)
  4. 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
  5. When finished, disconnect 24 V DC power supply and the USB-C cable
  6. The created backup can be used to restore unit using the steps in Flash from raw OS image procedure.
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies