No "migrating" after upgrade to UmbrelOS on miniPC

I’ve exported my old Umbrel Home (0.5) to an external drive. I flashed and installed the new Umbrel OS on my mini-PC and it installed. When it booted it did not “migrate” my old data, even though the external drive is connected and visible to the OS. I rebooted several times, nothing.

Logs show:
May 06 16:37:54 umbrel umbreld[830]: [migration] Unkown device booting for the first time, checking if we need to migrate legacy Linux install data…
May 06 16:37:55 umbrel umbreld[830]: [migration] No legacy Linux install found, skipping migration

Is there a way to trigger the migration manually, through the command line?

Any advice?

1 Like

Hey @aantonop, sorry for the issue here.

That’s strange that umbrelOS isn’t recognizing the external drive with your exported data (or isn’t recognizing that there is umbrel data on the drive). Even though the export script and migration process are for migrating custom-linux 0.5.x to linux 1.x it should still work just fine with 0.5.x data exported from Umbrel Home.

As long as no user has been created on your new install (e.g., by going through the account setup process in the UI), then subsequent reboots of your miniPC with the exported-data drive attached should trigger migration. The fact that it is not working means either:

  1. The data export from the Umbrel Home was not successful for some reason, so the migration logic doesn’t think there is data to import when it checks the external drive. Can you check the drive containing your exported data and see if there is a .umbrel dotfile at <path-to-mounted-partition>/umbrel/.umbrel. If this does not exist then please try exporting data from the Umbrel Home again (edit: or add the dotfile if you are confident that all other data was exported successfully).

  2. Something is tripping up the script when trying to mount your USB drive. You mentioned that the external drive is visible to the OS. Are you able to mount a partition from your USB drive successfully?

Here is the logic for discovering an external umbrel install if you’re curious:

I can probably hack something to make it so that you can manually trigger migration from the command line. Let me test something and get back to you. That being said, triggering it from the command line will end up running the exact same migration logic as umbrelOS does on every boot if there is no user set up. Perhaps there is something strange happening on boot though that this will get around.

@aantonop to follow up, I have tested a command to modify an os file that will allow you to initiate migration using a command, but I’m thinking this may not be a great idea to post here where others may be tempted to try this lower level change that could end up putting them in a bad state, especially when their issue may be unrelated.

Instead, if you are still having issues you can actually trigger an import another way:

  1. On your miniPC installation, create a directory called import within the main umbrel data directory:

    At this stage, where no user has been created through the UI, the login credentials in the terminal will be:

    • user: umbrel
    • password: umbrel
    sudo mkdir /home/umbrel/umbrel/import
    
  2. Copy your exported data from your mounted USB drive into the import directory.
    For example:

    sudo rsync -avh --progress <path-to-usb-mount>/umbrel/ /home/umbrel/umbrel/import
    

    You want the import directory to look like this afterwards in order for umbrelOS to import properly:

$ tree -L 1 -a /home/umbrel/umbrel/import/
/home/umbrel/umbrel/import/
|-- .env
|-- .github
|-- .gitignore
|-- .umbrel
|-- CONTRIBUTING.md
|-- LICENSE.md
|-- README.md
|-- SECURITY.md
|-- app-data
|-- bin
|-- build
|-- data
|-- db
|-- deps
|-- docker-compose.tor.yml
|-- docker-compose.yml
|-- events
|-- info.json
|-- karen
|-- logs
|-- nginx
|-- repos
|-- scripts
|-- statuses
|-- templates
`-- tor

16 directories, 11 files
  1. Unmount and remove your USB drive

  2. Reboot your miniPC

    The login credentials will now be

    • user: umbrel
    • password: your umbrel password from your data export

Your data should be copied over and you can access http://umbrel.local

Let me know if this ends up working for you or not.

3 Likes

This procedure worked in my case, now my Umbrel is back online. Thanks a lot!

1 Like

For some reason there was no .umbrel file in the drive. This despite the fact the export script had completed without error. I was able to add that file (mounted filesystem read-write and then “touch umbrel/.umbrel” in the mounted filesystem) and the import ran successfully.

Note that I didn’t need to redo the export, which is good because the original disk is overwritten and so I couldn’t export again.

Not sure why the export script didn’t create the .umbrel file. Seems like a bug in the export script.

Glad you were able to resolve by creating the .umbrel file @aantonop. Not the ideal experience all-in-all though. Thanks for following up with the solution. We will look into a potential export script bug.

Does it look like all your data was imported successfully, and that it was only .umbrel that was missing?

@strumi, thanks for the report that manually creating an import directory worked for you. The manual import method (No "migrating" after upgrade to UmbrelOS on miniPC - #3 by nmfretz) will work even if there is no .umbrel file.


For others that make their way to this post because data migration is not running when booting up umbrelOS 1.x, can you please check to see if your exported data has a .umbrel dotfile in the umbrel data directory and post your findings here?

ls -a <path-to-usb-mount>/umbrel

Note the use of the -a flag so you can see dotfiles.

If you find your .umbrel dotfile is missing, it would be great to know which version of umbrelOS you were running on the exported device, your device hardware, and your USB storage device used to export the data.

Hi,
my journey has been a bit more troubled: Umbrel 0.5 is running on a LXC container under Proxmox. I created a virtual disk for the new Umbrel 1.0 VM and rsync’d all the content of /umbrel folder into the new disk.
I then mounted the disk into the new VM at /home/umbrel/umbrel/import but after restart the process is not being triggered.
I changed the ownership of the files as rsync retained the old attributes, but still no luck. Here’s some debugging info:

umbrel@umbrel:~$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0   50G  0 disk
|-sda1   8:1    0  200M  0 part /mnt/root/boot/efi
|                               /boot/efi
|-sda2   8:2    0  9.8G  0 part /mnt/root
|                               /
|-sda3   8:3    0  9.8G  0 part
`-sda4   8:4    0 30.1G  0 part /mnt/root/var/log
                                /var/log
                                /mnt/root/var/lib/docker
                                /var/lib/docker
                                /mnt/root/home
                                /home
                                /mnt/root/data
                                /data
sdb      8:16   0  900G  0 disk
`-sdb1   8:17   0  900G  0 part /mnt/root/home/umbrel/umbrel/import
                                /mnt/root/data/umbrel-os/home/umbrel/umbrel/import
                                /data/umbrel-os/home/umbrel/umbrel/import
                                /home/umbrel/umbrel/import
sr0     11:0    1 1024M  0 rom
umbrel@umbrel:~$ tree -L 1 -a /home/umbrel/umbrel/import/
/home/umbrel/umbrel/import/
|-- .backup
|-- .env
|-- .github
|-- .gitignore
|-- .umbrel
|-- CONTRIBUTING.md
|-- LICENSE.md
|-- README.md
|-- SECURITY.md
|-- app-data
|-- bin
|-- build
|-- data
|-- db
|-- deps
|-- docker-compose.dev.yml
|-- docker-compose.tor.yml
|-- docker-compose.yml
|-- events
|-- info.json
|-- jwt
|-- karen
|-- logs
|-- lost+found
|-- nginx
|-- packages
|-- repos
|-- scripts
|-- statuses
|-- templates
`-- tor

20 directories, 12 files
umbrel@umbrel:~$ ls -la /home/umbrel/umbrel/import/
total 153
drwxr-xr-x 21 umbrel umbrel  4096 May 13 06:53 .
drwxr-xr-x  9 root   root    1024 May 13 06:57 ..
drwxr-xr-x 13 umbrel umbrel  4096 May 10 22:16 .backup
-rw-r--r--  1 umbrel umbrel   990 Nov  2  2022 .env
drwxrwxr-x  3 umbrel umbrel  4096 Jul 14  2022 .github
-rw-rw-r--  1 umbrel umbrel   584 Jul 14  2022 .gitignore
-rw-r--r--  1 umbrel umbrel     0 May 13 06:53 .umbrel
-rw-rw-r--  1 umbrel umbrel  3940 Nov  2  2022 CONTRIBUTING.md
-rw-rw-r--  1 umbrel umbrel  4798 Nov  2  2022 LICENSE.md
-rw-rw-r--  1 umbrel umbrel  8458 Nov  2  2022 README.md
-rw-rw-r--  1 umbrel umbrel  2563 Nov  2  2022 SECURITY.md
drwxrwxr-x 21 umbrel umbrel  4096 Apr  3 12:45 app-data
drwxrwxr-x  2 umbrel umbrel  4096 Jun 25  2023 bin
drwxrwxr-x  2 umbrel umbrel  4096 Nov  2  2022 build
drwxr-xr-x  3 umbrel umbrel  4096 Oct 12  2022 data
drwxrwxr-x  4 umbrel umbrel  4096 Apr  3 12:46 db
drwxrwxr-x  5 umbrel umbrel  4096 Nov  2  2022 deps
-rw-rw-r--  1 umbrel umbrel   366 Jun 25  2023 docker-compose.dev.yml
-rw-rw-r--  1 umbrel umbrel   506 Nov  2  2022 docker-compose.tor.yml
-rw-rw-r--  1 umbrel umbrel  5684 Jun 25  2023 docker-compose.yml
drwxrwxr-x  4 umbrel umbrel  4096 Nov  2  2022 events
-rw-rw-r--  1 umbrel umbrel   696 Jun 25  2023 info.json
drwxr-xr-x  2 umbrel umbrel  4096 Jun 25  2023 jwt
-rwxrwxr-x  1 umbrel umbrel  1762 Nov  2  2022 karen
drwxrwxr-x  2 umbrel umbrel  4096 Jun 25  2023 logs
drwx------  2 umbrel umbrel 16384 May 12 08:06 lost+found
drwxrwxr-x  2 umbrel umbrel  4096 Nov  2  2022 nginx
drwxrwxr-x  4 umbrel umbrel  4096 Jun 25  2023 packages
drwxrwxr-x  3 umbrel umbrel  4096 Nov  2  2022 repos
drwxrwxr-x  7 umbrel umbrel  4096 Jun 25  2023 scripts
drwxrwxr-x  2 umbrel umbrel  4096 Mar 22 10:15 statuses
drwxrwxr-x  2 umbrel umbrel  4096 Nov  2  2022 templates
drwxrwxr-x  4 umbrel umbrel  4096 Nov  2  2022 tor

Thanks for your help
-E-

Hi Nate, thank for your valuable tips.

I was able to migrate to a new host with the “import” directory trick.

I just made a minor change on your rsync command adding a “–update” parameter, in case of a interrupted execution (accidental or not) and save a lot of time syncing contents and avoiding to keep broken files on destination.

Regards.

Hi, I have the same problem as @Super-E does. I’m running it using VirtuaBox, I mounted my old umbrel dir under /home/umbrel/umbrel/import but the migration does not start, I’m only greeted with the onboarding site. How to troubleshoot this? Is there a way to see logs or look into the source to understand what’s going wrong?