Upgrade 3.4 to 4, but how?

Yes but the amount of work may vary depending on how you’ve created your config.

It depends on how you’ve created your config. If you are using managed configs (i.e. done through the UI) once you restore you’ll run the upgradeTool and it will do a lot of the upgrades for you.

If file based configs you’ll need to do everything manually.

Always do this before making a major change of any variety.

Yes but RAM will likely be a problem. It’s going to depend on your specific configuration and whether you are running other stuff (e.g. InfluxDB) on the same machine.

Docker is going to require even more RAM than running as apt installed. If you are looking to use an RPi 3, I cannot recommend Docker. It exacerbates an already existing problem, lack or RAM.

There is one post that shows the steps for restoring a 3.4 backup to a 4.0 instance. I can’t seem to find it at the moment. But the steps were

1, install OH 4
2. restore the backup
3. run the upgradeTool
4. start OH
5. fix all the breaking changes.