[Howto] Odroid-Backup tool - backup and restore tool

noobs4u
Posts: 133
Joined: Fri Apr 01, 2016 1:56 am
languages_spoken: english
ODROIDs: XU4, C2
Has thanked: 14 times
Been thanked: 5 times
Contact:

Re: [Howto] Odroid-Backup tool - backup and restore tool

Post by noobs4u »

I'm using the CloudShell2 with XU4Q. Ubuntu 20.04 is installed on a 64GB SD. I have 2 2TB HDD drives connected. I performed a backup of the SD card to one of the HDD drives. I have to purchase a new eMMC because my originals performance is now degrading and is unreliable (hence the 64GB SD card). In the meantime:
1. Is there a way to use the backup to create an ISO image that I can flash onto the new eMMC using Etcher?
2. Will it exclude the unused space from the current backup?
3. Will the share paths be intact or will it cause me to reformat the HDD's when I boot from the successfully flashed eMMC?

I only ask the last question because on my last fresh install of 20.04 apparently I performed steps that wiped my drives and the 3TB of data across them. If the image already has the paths/samba/cloudshell set up, I should be able to access my shares after booting up without any configuration or re-formatting of drives or loss of data? The whole purpose of my post.

mad_ady
Posts: 9250
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 622 times
Contact:

Re: [Howto] Odroid-Backup tool - backup and restore tool

Post by mad_ady »

1. No, the backups can be restored either through odroid-backup, or manually, using fsarchiver, sfdisk, dd and partimage.
2. odroid-backup only backs-up used space from the partition
The restore procedure should be as follows:
- connect the emmc to CS2 via a usb adapter (you could connect it directly to the emmc port, but make sure it's empty and the boot switch is set to sd)
- run odroid-backup in restore mode. It should expand the last partition to fill the disk automatically. Select the emmc as a restore destination. Make sure it's not the sd though!

Once restore is done you should power off, remove the sd, place the emmc in the emmc connector, flip the boot switch in the emmc positon and it should boot.

The backup/restore process does not break your hdds (unless you restore to /dev/sda!). It should behave like booting off your old, backuped system.

Possible issues:
- if the emmc doesn't boot post restore check that it has a valid xu4 bootloader in the secret sectors (those are not backed up/restored)
- if your boot.ini/fstab uses disks like /dev/mmcblk1p2 instead of uuids you'll need to change those to /dev/mmcblk0p2 or use uuid.
These users thanked the author mad_ady for the post:
noobs4u (Wed Jan 27, 2021 4:29 am)

noobs4u
Posts: 133
Joined: Fri Apr 01, 2016 1:56 am
languages_spoken: english
ODROIDs: XU4, C2
Has thanked: 14 times
Been thanked: 5 times
Contact:

Re: [Howto] Odroid-Backup tool - backup and restore tool

Post by noobs4u »

Possible issues:
- if the emmc doesn't boot post restore check that it has a valid xu4 bootloader in the secret sectors (those are not backed up/restored)
- if your boot.ini/fstab uses disks like /dev/mmcblk1p2 instead of uuids you'll need to change those to /dev/mmcblk0p2 or use uuid.
[/quote]

Code: Select all

mmcblk0      179:0    0  58.2G  0 disk
|-mmcblk0p1  179:1    0   128M  0 part /media/boot
`-mmcblk0p2  179:2    0  58.1G  0 part /
mmcblk0boot0 179:16   0     4M  1 disk
mmcblk0boot1 179:32   0     4M  1 disk
Is there a method to backup/restore mmcblk0boot0 and mmcblk0boot1? Or is performing the uboot reinstall the only method?

[UPDATE]
I tried Odroid-Backup tool to backup both mmcblk0boot0 and mmcblk0boot1as they were both selectable but got errors because they are not a supported type.

mad_ady
Posts: 9250
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 622 times
Contact:

Re: [Howto] Odroid-Backup tool - backup and restore tool

Post by mad_ady »

No, odroid backup doesn't back up/restore those partitions, because they are typically locked. I know you can unlock them, but they don't get written, so I never added support.
If you can boot the official ubuntu image from the emmc, then you can restore to it because it has those blocks already.
If you can't, you'll need to run the emmc recovery guide to restore those blocks before restoring.
These users thanked the author mad_ady for the post:
noobs4u (Fri Jan 29, 2021 3:29 am)

Post Reply

Return to “Ubuntu (All Linux'es)”

Who is online

Users browsing this forum: No registered users and 1 guest