Migrating from rpi3 to rock64

My YunoHost server

Hardware: Raspberry Pi at home
YunoHost version: (stable).
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no / yes
If yes, please explain:

Description of my issue

hi again ynh,

i’m looking to migrate my beloved ynh install from an rpi3 to a rock64, and i wonder if / how this is possible?

i currently run the root file system on a USB HDD, with only the boot partition on the SD card.

i understand that a rock64 won’t run Raspbian OS.

if there any way i can wrangle things with an SD card such that i can simply plug the usb HDD into the rock64 and run it like before?

i understand this is more a hardware issue, but i’m unsure of what to look out for.

perhaps the best i can do is install armbian on a new sd card and then direct it to the usb HDD?

Hi Mouse!

Yes, for sure!

Armbian is the way to go, plain Armbian and then the curl https://install.yunohost.org | bash as described on the remote server installation page. Instead of postinstall, run yunohost backup restore ...

I don’t run rock64, you probably know already how it will boot (uSD boot partition as with your RPi, or everything on USB or SD, etc). You will be re-using the USB HDD, I think? If I had space elsewhere, I’d run backups -with data(!) for apps such as Nextcloud- for system and apps, and start with a clean slate (depending on your situation, that could be a seperate partition on the USB HDD with your current system in kept behind partitions at first.

I migrated Yunohosts from Armbian on Orange Pi’s to (x86) containers on Proxmox, and later from there to VPS’s all via the backup mechanism. It has proved very dependable for me.

To run the backup restoration instead of the postinstallation, the backups need to be available in /home/yunohost.backup/archives/ on your new installation.

If your Debian experience is mainly through Raspbian, be aware that it diverges from Debian for some helper tools, and Armbian diverges in another direction. There are some Armbian-specific configuration utilities for managing boot loader and partition resizing of installation media, if I recall correctly. Give it a dry run and you will find your way around quick enough!

@wbk thanks for explaining your process, it’s v helpful.

yeah i was hoping to get away with reusing the same install on the USB HDD, because of so much data and no other hdd’s lying around for a full backup, but perhaps i can’t get away with it.

I am sure it is doable. In that case there is gain in valuable lessons, besides saving money for an HDD. The cost is your time (unknown amount) and possible data loss (if the data is not important, you can wipe the disk immediately and save a lot of time :wink: )

If the data is of any value to you, now is the best time to get an extra HDD and start making back ups. Your future self will be grateful to you.

When moving from one ‘regular’ PC-style computer to another, switching HD’s is quite doable because the BIOS/UEFI abstracts enough of the hardware for Linux to keep running when the old disk is in a new computer. ARM devices are not so interchangable; from one Armbian to another Armbian I’d hesitate, but expect success. When moving from Raspbian to Armbian I have little idea what to expect, but it will involve handwork:

  • Start flashing the Armbian image to SD card; for now be sure to get the Debian 10 based image (I expect you are not on the beta Yunohost 11)
  • Install Armbian on your rock64
  • Install Yunohost
  • Copy (scp/other way) your Yunohost system backup to /home/yunohost.backup/archives
  • Run ‘yunohost backup list’ to get the name of the backup
  • Run ‘yunohost backup restore name_of_sys_backup’

Now the basics are in place, but on the SD-card.

If both ARM platforms are binary compatible, chances are you can edit your /ect/fstab to point to your USB HDD instead of your SD card. I expect it is all in a single partition, and that you will have to use bind mounts for the seperate directories in the root directory, except for /boot.

The bind mounts should mask the existence of the directory structure on the SD card, and let the booting Linux kernel use the directory structure on the USB HDD instead.

Unfortunately, when facing strange things later on (or earlier), you always first have to check whether it is because of a mismatch between the Raspbian roots of the USB disk and the Armbian running kernel, and wonder if it is a bug in the system or a bug in your migration.

That way it sounds like defeat :wink: If you can afford a second disk, this is really the reason not to postpone start making backups. The new disk should be large enough to serve as backup target and have enough space to restore the backup:

  • install rock64-yuno on the new disk
  • move yuno system backup to it, run restore instead of postinstall
  • now connect the new disk to the old yunohost, and mount the new home/yunohost.backup/ directory over the old one, so that there will be enough space for the backup and that it will be in the right location
    • with some Towers-of-Hanoi-scheme you can start with a backup of the largest app, reconnect the new disk to the new Yuno, restore the app from backup and upon success, delete the backup; now you have space again for the next app.

Roughly how much data will you be moving?

@wbk thx a lot for the details! makes me feel much less bewildered.

at the moment i have only non-data backups for ynh, as my data is all synced to my laptop anyway, and has its own separate, non-ynh backup. i think with data i prob have around 500gb.

in the past, i attempted a full full full ynh backup, and it crashed out on my nextcloud data, leaving the ynh backup mechanism itself broken. after that scare, i only ever did non-data backups.

thx a lot for laying out the basic process tho! when i have some time to spend i’ll take a crack at it.

1 Like

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