We’re often advised to do a clean installation of a major new OS version rather than try to do an upgrade over an existing one. Makes sense to me to do so.
But what if I have accounts, projects, and applications that I built up over a year or more on the old system? Is there a systematic way of moving that “stuff” from an old drive to a newly-installed OS?
A few months ago, after having had trouble with an upgrade over an old version of Raspbian, I did a clean install on a new drive and then transferred the old environment to the new – successfully – following the guidelines here: https://www.raspberrypi.org/forums/viewtopic.php?p=117665
Accounts, passwords, user files, etc. all moved successfully.
I’ve done a couple of clean installs of Leap 15.0 aarch64 on Raspberry Pi 3B (and B+) in the last day or so, and I hoped that I could move my 42.3 environment to one of those installs. I tried the following (UNSUCCESSFULLY – this is not a how-to, it’s a how-to-screw-it-up! lol!):
- dd a fresh install of Leap 15.0 onto a µSD drive following openSUSE guidelines
- Boot that 15.0 and do “zypper dup” (which “reinstalls” openSUSE Leap 15.0, but mostly I wanted to make sure I had everything updated on that new install)
- Reboot that 15.0 install and verify that the new 15.0 install boots properly, connects to the network, supports ssh in, etc.
- Power off the Pi; insert the older 42.3 working µSD; reboot into 42.3; “zypper up” to make sure all is up to date; reboot into that up-to-date 42.3 environment
- Insert the 15.0 µSD into a USB adapter and insert it into a USB slot on that running instance of 42.3
- Mount the “/” partition of that 15.0 install (now seen as /dev/sda2) as “/mnt/tgt”
- Execute the following command, adapted from the Raspbian example cited above:
Pi-6:/mnt # rsync -av \
> --exclude="/proc/*" \
> --exclude="/lost+found/*" \
> --exclude="/dev/*" \
> --exclude="/mnt/*" \
> --exclude="/media/*" \
> --exclude="/sys/*" \
> --exclude="/tmp/*" \
> / /mnt/tgt
- poweroff, remove the 42.3 µSD, insert the 15.0 install with transferred 42.3 environment into the µSD slot, and reboot
- On boot, openSUSE splash screen comes up and offers a choice of 42.3 or 15.0, but neither one succeeds in booting – they both result in a black screen and no further information
So I’m guessing that I missed a few directories in that list of excludes, and some things got copied over that I really didn’t want.
Has anyone got a recipe for doing this transfer (old Leap working environment to new Leap install)?
Or can anyone suggest other things I ought to include in that “exclude” list that would make this successful?
I still have my 42.3 working drive, and I’m dd’ing a new install of 15.0 as I write, so I’m ready to give it another try if I get some ideas.
Thanks for any advice you can offer.