How to back up multiple devices? Can we specify an alias to mark the backup image?

Hi All,

I am trying to use the backup and restore method to copy the entire working environment of one Jetson to multiple devices.

Currently, I have encountered some usage problems. For example, I can only do one-to-one backup, but cannot do one-to-multiple restore.

Here are the questions.

Q1:

Workflow 3: To massflash the backup image

Steps:

  • Make sure you have only ONE device in recovery mode plugged in the host
  • Run this command from the Linux_for_Tegra folder:
    $ sudo ./tools/backup_restore/l4t_backup_restore.sh -b -c
    Where are similar to the corresponding variables used
    in the flash.sh command. (See more details in the official documentation’s
    board name table).
  • If this command completes successfully, an initrd flash image is stored in
    Linux_for_Tegra/tools/kernel_flash/images.
  • Put the device in recovery mode again and generate a massflash package using backup image:
    $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash mmcblk0p1
    Where is the highest possible number of devices to be flashed concurrently.
    are similar to the corresponding variables used
    in the flash.sh command. (See more details in the official documentation’s
    board name table).
  • After generate the massflash image and environment, you can flash new device by putting the device into recovery mode:
    $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash --network usb0
    Alternatively, use the generated mfi_.tar.gz tarball. More
    detailed instruction can be found in the Initrd flash README.

I think the last step of workflow3 is wrong, the command sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 5 --network usb0 is just to mass flash the device, NOT to mass resotre the images.

Relate question: Workflow 3: Fail to make the massflash backup image, device is orin nx 8gb - #21 by HeapCorrupt

Q2:
Is it possible to use aliases for backup images of different devices so that I can use alias to restore a backup image at will? Currently, only one image is allowed to exist, whether it is a backup-restore or a newly compiled image.

Thanks! Please give some help.

Hi,

Did you remember to use the -c option when backing up images?
The backed up images will be copied and converted for generating images for initrd flash,
and you should see log like this:

nvbackup_partitions.sh: Backup complete (after command prompt popping up)
Backup image is stored in /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p1.tar.gz:	 49.5% -- replaced with mmcblk0p1.tar
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p2_bak.img:	 82.1% -- replaced with mmcblk0p2_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p3_bak.img:	 91.1% -- replaced with mmcblk0p3_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p4_bak.img:	 99.6% -- replaced with mmcblk0p4_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p5_bak.img:	 82.1% -- replaced with mmcblk0p5_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p6_bak.img:	 91.1% -- replaced with mmcblk0p6_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p7_bak.img:	 99.6% -- replaced with mmcblk0p7_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p8_bak.img:	 67.4% -- replaced with mmcblk0p8_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p9_bak.img:	 91.1% -- replaced with mmcblk0p9_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p10_bak.img:	 99.5% -- replaced with mmcblk0p10_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p11_bak.img:	 99.6% -- replaced with mmcblk0p11_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p12_bak.img:	 99.6% -- replaced with mmcblk0p12_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p13_bak.img:	 99.6% -- replaced with mmcblk0p13_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p14_bak.img:	 99.6% -- replaced with mmcblk0p14_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
mmcblk0p15_bak.img:	 99.6% -- replaced with mmcblk0p15_bak.
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra/tools/backup_restore/images /mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra
/mnt/1T-HDD/BSP/r35.4.1/Linux_for_Tegra

I just verified the whole workflow and confirmed all the files got restored correctly.
(I installed the whole JetPack SDK, so the disk usage should be significantly different.)

NO.
I think you have to manage those images manually, or just extract a new BSP for a different environment/image.

Hi All,

Q1:

the -c option for backking up command, Do I need to add it or not. I SAW you suggest me to try to drop it in the last dialogue. I can not find it in command’s help.

./tools/backup_restore/l4t_backup_restore.sh --help
Usage: l4t_backup_restore.sh -b [ -c ]
l4t_backup_restore.sh -r

This script creates a backup image of a Jetson device or restores a Jetson device using a backup image.

This script should be run inside initramfs.

Options:
Indicate which board to use.
-u PKC key used for odm fused board.
-v SBK key used for encryptions
-h | --help : Display this message
-e : Specify the device for backup
-b : Generate the backup image and store it in /home/hengyongchao/NVIDIA/masss_flash_project/jetson_linux_35.4.1/Linux_for_Tegra/tools/backup_restore/images
-r : Restore the backup image from /home/hengyongchao/NVIDIA/masss_flash_project/jetson_linux_35.4.1/Linux_for_Tegra/tools/backup_restore/images
–raw-image ---------------- Specify the path of the raw disk image to be restored into storage devce.

Q2:

If I want to manage those images, and backup them manually. Which folders should I need to backup?

Thanks for help!.

You should add it, or it won’t be used for generating the massflash pacakge.
Sorry if I confused you before.

You may try backing up Linux_for_Tegra/mfi_<board_dev>.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.