Migration e mirroring

Good evening everyone
I’ve read a few posts and would like some advice. I have OH3.3 on RP3 and would like to migrate to version 4. At the same time I purchased another SD card to perform mirroring, all connected with an SD reader to the Raspberry’s USB port. Should I first set up mirroring, disconnect the SD (to have a backup) and then upgrade? thanks for the replies

Assuming you are using openHABian (you did not tell), there’s an option to mirror once.
Then yes you can upgrade running off your old SD.

Don’t set up mirroring as that’ll sync cards in daily intervals.

yes, I have been using it for about a month and I have already configured the main components.

I read the documentation and some posts. So to perform the mirroring only once and obtain a bootable SD (the cards are the same size 32 GB) in case of problems, from openhab-config I have to execute the following options in sequence: 53 - 54 -55 and then I can extract the sd to secure it and perform the migration…right?

just 54 once, check booting from that before you start to migrate

I apologize but I’m a beginner, I’m trying to mirror, but I’m getting the following errors from openhabian-config (option 54):

The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or partx(8).
Syncing disks.
Error: Partition(s) 3 on /dev/sdd have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
Taking a raw partition copy, be prepared this may take long such as 20-30 minutes for a 16 GB SD card
FAILED (raw device copy of /dev/sdd2)
The partition table has been altered.```

the backup SD is 128 GB, while that of OH3 is 32 GB

my version is 3.3.0 release build…maybe this is the problem?

I assume your OS is so old that you better reinstall. Search the forum forOH4 migration FAQ it tells you how to do that best.

ok thanks, I’ll proceed step by step, first I’ll update to 3.4.5 and see if it does mirroring and then to the latest 4.0.1… I think

I also had sometimes strange things happen, when running the option 54.
My suggestion is to clean the sd-card before calling 54 and use a proper sd-card device.

e.g. run

sfdisk --delete /dev/sd?

with “sudo” (and be sure to replace the ? with the right letter :wink:)

btw.: my upgrade path from 3.x to 4.x was 3.4.1 → 3.4.5 → 4.1.0 (and after release 4.1.1)
and I had no problems - but it’s really important to read carefully the release notes and “breaking changes”-section for the specific step . And test the upgraded system after every upgrade step about problems.

I apologize, I upgraded to java 17 and it started again. Thank you all for your patience and precious advice. If I need to I will disturb you again. Good evening everybody