Saturday, May 4, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 3491  / 2 Years ago, tue, january 11, 2022, 7:43:21

I'd like to migrate from Ubuntu 12.10 to Mint 14, but it's important that I keep everything which is in my /home directory. Will it work if I just put the directory on a USB stick, then replace the default one by ny old one after the install is complete (I'll use the same username/paaswd on the new install)?


More From » home-directory

 Answers
0

Sure. I'd use something like tar (there are other options, rsync, cp, cpio):



cd /media/usb-stick/
tar -pcvzf home.$USER.tar.gz /home/$USER


To unpack on new computer:



cd /
tar -xvzf /media/usb-stick/home.$USER.tar.gz


If you have any permission problems after, do this:



# own everything in your home dir by you.  This is usually safe/correct,
# unless you have some unusual permissions set up somewhere (like a directory
# for sharing files with other users on the system)
chown -R $USER:$USER ~


Some problems you may run into:




  • Disk Space: make sure your usb stick has enough space

  • File size too big: If your home directory has more than 2G of files, you might create a file too big for a fat32 usb-stick. Either format it ext3, tar up partial directories, copy in batches or use another method to archive things (rsync, network copy it, etc)

  • if you don't use tar, and use cp or rsync, you need to copy to a unix filesystem, like ext3. Copying to a fat usb-disk without using tar will mess up permissions.

  • dot files: make sure if you do partial directories, you don't forget all the files in your home directory that start with a dot (hidden).


[#34002] Wednesday, January 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pantkie

Total Points: 209
Total Questions: 112
Total Answers: 138

Location: Venezuela
Member since Sat, Apr 24, 2021
3 Years ago
;