Migrating to new SD image

I have been using Wheezy for years now. Now I am thinking of using the Jessie Raspbian instead. I am wondering what's the best way to migrate my home directories from the current SD card to the new SD card.

Will simply copying the old /home directory to the new SD's /home directory work? Or should I do some more elaborate maneuvers to get my current home directories to the new SD card?

I am thinking of using a USB thumb drive to hold the /home directory when swapping the SD cards.

Any comments?

Thank you very much,

Reply to
abc
Loading thread data ...

Why not upgrade in place, I went from Wheezy to Jessie to Stretch. I think the only thing that didn't work after in Jessie sound, to solution to which took a couple of minutes to google on the Pi forums.

Copying home will bring in all your data and application settings, but you'll still need to reinstall any additional packages, and recreate and system settings you've changed.

Upgrading in place eliminate the need for any additional installation or setup, and as long as you've backed up your SD card just before, is completely risk free.

Very easy to do, lots of guides on the internet, and if you get the right stick (see Improving Pi Desktop Performance) makes a huge difference to the speed of machine and the longevity of the storage.

---druck

Reply to
druck

I did try an in-place upgrade, and it rendered the Sonic Pi inoperative, and the Ephiphany browser crashing all the time. So I reversed to the old Wheezy.

Fortunately, I don't have a lot of third party applications, so maybe it is easier to simply migrate the home directory.

I will do another try to see if this time I will have a better luck or not...

Is this _Improving Pi Desktop Performance_ an online document? Can I have the URL?

Thanks,

Reply to
abc

It's the title of a post I made in this newsgroup a couple of days ago. Message-ID:

---druck

Reply to
druck

There's another trick you can use BEFORE you take a final backup and start on making a clean install on another disk. This makes sure that the places you should be putting 3rd party and your own scripts and programs will be automatically backed up each time yo back up /home, which is where anything yo do as a logged-on user will end up. Do the following as root or by prefixing each command with 'sudo '

Take a backup of the whole SD card. sudo mv /usr/local /home sudo ln -s /home/local /usr/local

Doing this moves the local directory from /usr to /home and puts a symbolic link in /usr that points to local in its new location. After its done, everything works exactly as before, but now everything in local will get backed up along with everything else in /home. To get best use from this trick, make sure that:

- any third party scripts and programs as well as the ones you write are in /usr/local/bin

- their manpages are in /usr/local/man rather than /usr/man

- their config files are in /usr/local/etc rather than /etc Any properly written program should look for it by searching - the current directory - /usr/local/etc - /etc in that order

- $PATH includes /usr/local/bin and /usr/local/sbin in its search path after /bin, /sbin, /usr/bin and /usr/sbin

Now back up /home before you do a clean Raspbian install. After that's done, replace /home in it from your backup and re-create any extra users you set up, making sure thy have the same UID values as before:

ll /home

will show you what those are.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Thank you, I found your post.

Best,

Reply to
abc

Martin,

Thank you very much! I will try this while backing up my home directory.

If I use a FAT32 USB flash drive to hold the home directory copy, the UID and permissions will be lost, right?

Will making a tarball preserve the UID, GID, and permissions on the FAT32 drive?

Thank you,

Reply to
abc

Why not just back up /usr/local as well as /home ?

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

That depends on how you do the backup. Doing a straight copy of files and directories or using a zip archive will mess up permissions and ownership details, but using tar to make either a plain or a compressed tarball will preserve them.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.