===== Backup and restore the OS =====
==== Creating an OS back-up on a USB flashdisk ====
- Prepare a USB flash disk in FAT32 format with a capacity of at least 2 GB
- Start the device in the [[en:hw:025-gate:service-mode#startup_in_a_service_mode|service mode]]
- Insert the flash disk and wait for approximately 5 seconds
- In the service interface, click on the **Backup to USB flash** button located in the **Backup** dialogue window
- Unipi Gate will start creating the OS backup - the process is indicated by rapid blinking of **ACT**, **TX** and **RX** diodes ([[en:hw:025-gate:led-indication#pwr_is_on_the_rest_blinks_rapidly_80_ms|demonstration here]])
- Upon finishing the process, a "Updated successfully" prompt will be displayed in the service display and blinking of the LEDs will slow down ([[en:hw:025-gate:led-indication#pwr_is_on_the_rest_is_blinking_600ms|demonstration here]])
- You can now reboot the device using a button on the upper right corner of the web interface
- For loading the backup or uploading the OS into a different device of the same product line, follow [[#restore_the_os_from_back-up_on_the_usb_flashdisk|the guide below]]
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(i)}}
**Note:** \\
If the USB flash disk is not compatible, Unipi Gate will not start the backup process. In that case, you need to use a different flash disk.
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:09_safety-instructions_pseudo-ISO-7010-attention.png?nolink |(!)}}
**Attention:** \\
If you are creating a backup on a device with a lower [[en:hw:025-gate#prehled_modelu|FID]] than the one you will flash the backup OS to (e.g. FID 1.1 -> FID 2.0), always update the following packages first: ''g1-kernel-image'', ''g1-u-boot'', ''g1-altboot''
Update by the following commands:
sudo apt update
sudo apt install g1-kernel-image g1-u-boot g1-altboot
For a Debian 12 based OS you need to update these packages: ''unipi-kernel'', ''unipi-u-boot'', ''unipi-altboot''
sudo apt update
sudo apt install unipi-kernel unipi-u-boot unipi-altboot
===== Restore the OS from back-up on the USB flashdisk =====
{{page>en:hw:fw-compatibility-hidden}}
- Unplug the power supply from the device and insert the flash disk into the device's USB port
- Press **and hold** the **SERVICE** button on the device's face side
- Plug the power supply back. Unipi Gate will automatically start the OS flashing process indicated by rapid blinking of **ACT**, **TX** and **RX** diodes ([[en:hw:025-gate:led-indication#pwr_is_on_the_rest_blinks_rapidly_80_ms|demonstration here]])
- You can now release the SERVICE button
- Finishing the process is indicated by diodes going off and a reboot of the device