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

mrperfekotne
Posts: 109
Joined: Fri Nov 10, 2017 12:40 am
languages_spoken: Danish
ODROIDs: XU4
Contact:

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

Unread post by mrperfekotne » Sun Sep 30, 2018 4:59 pm

Yes but I have not mounted it since the partition "mmcblk1p2" is a completely new partition that is being created during recovery with your script :/ -

Which you can also see in the log - Therefore, I do not understand openmediavault mount it :)

User avatar
mad_ady
Posts: 5426
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Contact:

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

Unread post by mad_ady » Sun Sep 30, 2018 6:48 pm

Maybe omv has an automount feature? I mount it only if I need to

oddulf
Posts: 6
Joined: Mon Nov 12, 2018 8:42 pm
languages_spoken: english, swedish
ODROIDs: C1+
Contact:

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

Unread post by oddulf » Tue Nov 13, 2018 7:54 pm

Hi, thank you for such a good summary on cloning and backup odroids!

When I first run odroid-backup.pl I get

Code: Select all

root@kir1:~# odroid-backup.pl
Can't call method "msgbox" on an undefined value at /usr/local/bin/odroid-backup.pl line 936.
I started installing the dependencies, but it fails with

Code: Select all

root@kir1:~# apt install libui-dialog-perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libui-dialog-perl
Since you said the program does a self-check on startup, I'd thought I won't go searching for PPAs until it tells me to.

Odroid C1+, eMMC 8GB, official Ubuntu 18.04.01 minimal

Many thanks!
Ulf

User avatar
mad_ady
Posts: 5426
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Contact:

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

Unread post by mad_ady » Tue Nov 13, 2018 8:40 pm

Ubuntu 18.04 dropped the libui-dialog-perl package. If you update the odroid-backup script with the latest git version it will tell you need to install "UI::Dialog" from CPAN instead.
Try

Code: Select all

sudo perl -MCPAN -e 'install UI::Dialog'

oddulf
Posts: 6
Joined: Mon Nov 12, 2018 8:42 pm
languages_spoken: english, swedish
ODROIDs: C1+
Contact:

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

Unread post by oddulf » Fri Nov 16, 2018 12:00 am

Thank you! - worked a treat on my Linux PC - will install it on the odroid too when the card is back in its place.

Apologies for the late reply - didn't get an email notification about your response...

ulfben
Posts: 106
Joined: Thu Jul 20, 2017 11:56 pm
languages_spoken: english
ODROIDs: XU4Q
Contact:

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

Unread post by ulfben » Mon Jan 28, 2019 9:07 pm

I just did a fresh install from the github master, following the instructions there. Two observations: it seems the dependencies listed isn't quite complete, and the interactive console GUI shuts down instead of letting me select an output folder.

The dependencies listed on github says:

Code: Select all

$ sudo apt-get install zenity dialog libnumber-bytes-human-perl libjson-perl fsarchiver udev util-linux coreutils partclone parted
$ sudo perl -MCPAN -e 'install UI::Dialog'
Which leaves out mtd-utils? Running the script with no arguments (or just --backup) provided no output, until I ran it with --text, at which point the (ncurses?) GUI rendered and told me what was missing.

So dumping diagnostics / help text to console by default would help, I think.

Currently running a test backup. Thanks for putting this together!

User avatar
mad_ady
Posts: 5426
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Contact:

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

Unread post by mad_ady » Mon Jan 28, 2019 9:11 pm

Yes, mtd-utils was added later (indended for N1 with a SPI flash chip). Sadly, GUI and text are both a bit problematic on recent ubuntu distros because of some problems with the libraries I'm using. Might need a redesign/rewrite.

User avatar
emk2203
Posts: 40
Joined: Fri Oct 16, 2015 12:29 am
languages_spoken: english, german
ODROIDs: C1+, C2, XU4, HC1
Contact:

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

Unread post by emk2203 » Wed Mar 13, 2019 9:32 pm

With the --text setting, I cannot restore a backup.

The menu says that I should select a directory, but whenever I press RETURN even after trying to select the NEXT button with TAB, the only action happening is that the directory opens.

When I try to select the /. entry there, I get a log of the backup process displayed in ncurses, but no restore action.

When I try to use command line only with

Code: Select all

root@XU4CS2T:/srv/samba/Stick60G/eMMC_backup# odroid-backup.pl --restore --disk mmcblk0 --partitions bootloader,mbr,1,2 --directory 20190205
an error occurs: Disk mmcblk0 is not a valid disk. Valid options are: sdb at /usr/local/bin/odroid-backup.pl line 559.

But obviously, mmcblk0 exists:

Code: Select all

root@XU4CS2T:/srv/samba/Stick60G/eMMC_backup# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda            8:0    0  1.8T  0 disk 
└─sda1         8:1    0  1.8T  0 part 
sdb            8:16   1 60.1G  0 disk 
├─sdb1         8:17   1    4G  0 part 
└─sdb2         8:18   1 56.1G  0 part /srv/samba/Stick60G
mmcblk0      179:0    0 58.2G  0 disk 
├─mmcblk0p1  179:1    0  128M  0 part 
└─mmcblk0p2  179:2    0 58.1G  0 part 
mmcblk0boot0 179:16   0    4M  1 disk 
mmcblk0boot1 179:32   0    4M  1 disk 
mmcblk0rpmb  179:48   0    4M  0 disk 
mmcblk1      179:64   0 14.9G  0 disk 
├─mmcblk1p1  179:65   0  128M  0 part /media/boot
└─mmcblk1p2  179:66   0 14.7G  0 part /
A bit inconvient for my barebones rescue over SSH now. What can I do to make the script work again? I don't want to manually do every step...

User avatar
mad_ady
Posts: 5426
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Contact:

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

Unread post by mad_ady » Wed Mar 13, 2019 10:14 pm

Sorry about that. The perl modules I relied on for display are a bit broken. Try adding -a to show all disks, because mmcblk0 is not considered removable by default.

User avatar
emk2203
Posts: 40
Joined: Fri Oct 16, 2015 12:29 am
languages_spoken: english, german
ODROIDs: C1+, C2, XU4, HC1
Contact:

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

Unread post by emk2203 » Thu Mar 14, 2019 3:52 am

Wow, I feel stupid now. I always have to use --text -a when doing backups for the exact same reason, but I overlooked that it is missing in my 'restore' command line.

Thanks!

leo117
Posts: 7
Joined: Fri Feb 02, 2018 11:13 am
languages_spoken: english
ODROIDs: Odroid-C2
Contact:

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

Unread post by leo117 » Sat Mar 23, 2019 1:49 am

I just made a backup but when i try to restore, it just shows the backup status window and does not do anything

User avatar
mad_ady
Posts: 5426
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Contact:

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

Unread post by mad_ady » Sat Mar 23, 2019 3:42 am

As I said a few posts above, the display modules I rely on are broken and some dialogs (directory selection) are not shown anymore. For now you can still use the command line parameters:

Code: Select all

sudo ./odroid-backup.pl -a --restore --directory /path/to/backup/dir --disk /dev/sdd --partitions mbr,bootloader,1,2

Post Reply

Return to “Ubuntu (All Linux'es)”

Who is online

Users browsing this forum: No registered users and 0 guests