Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-28-2009, 03:12 PM
|
#1
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,792
Rep:
|
seeking HOWTO recover after trashing /home folder tree
I was happy running Ubuntu Hardy. /home was a separate LVM partition file system. / (root) file system also part of this same LVM partition. Something went wrong [don't ask] and I needed to re-install my distribution.
If I'm going to do the install thing as opposed to the ferret out and fix-things thing, I'll use Ubuntu Jaunty (v9.04) instead of Hardy (v8.04) -- Koala (v9.10) is too new.
To make things easy(er?) I put Jaunty into its own partition, leaving the Hardy files intact. In fact, I put everything into the Jaunty partition so that I could (1)disrupt the old files the least and (2) recover everything that I might want to recover at a later time when I'm not so upset with myself for the something that went wrong.
... type, type ... spin, spin ...
Now I have the new Jaunty /home folder in its own, non-LVM file system so that this is not an issue for the future.
Now I have two folders with $HOME-data contents -- oldHome and newHome.
The old one is Hardy. The new one is Jaunty.
QUESTION: (begging and pleading and praying) How do I migrate all of my hidden-folder (dot-something) settings from oldHome to newHome? Can I simply cp -av $OldHome/* $NewHome/ and be happy?
I can and mostly have moved the dumb-data files -- docs, pix, vids, tunes, etc. I have a good backup of these so I'm not worried about the survival of that stuff. It is the other stuff that I've no clue how to migrate without self destruction. Two big examples are Firefox and Thunderbird. Another is everything Gnome.
There are literally dozens of dot-something folders that I'm sure (1) get generated whenever a given program needs them, and (2) I have no idea if any of the contents or settings are important enough to migrate forward now that I've updated the distro in general.
QUESTION: If I clone a random dot-something file from oldHome to newHome and the owning application changed between Hardy-of-old and
Jaunty-of-new, will this trash data or show complaints and recover nicely? [Yes, I know this is a huge generic question and the answer likely contains "it depends" but I'm looking for the general case here.]
Thanks,
~~~ 0;-Dan
Last edited by SaintDanBert; 12-28-2009 at 03:17 PM.
Reason: clarification
|
|
|
12-28-2009, 03:47 PM
|
#2
|
Senior Member
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833
Rep:
|
That about sums it up, you could use cp or you could use rsync, anything that gets the old files in place of the new files should do it for you.
You may have some issues but back up the new directory before copying stuff from the old directory over. If you have issues with something breaking just copy the backup back in place. I'd suggest doing all this of course in the console and not while running x.
Last edited by rweaver; 12-28-2009 at 03:51 PM.
|
|
|
12-29-2009, 02:04 AM
|
#3
|
Senior Member
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591
|
You're likely to have a lot of breakage copying application data between versions. As far as firefox and thunderbird goes, all you need is the profiles. More info here.
|
|
|
12-29-2009, 03:53 AM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251
|
If you can still get into the Hardy LVM (from a liveCD is best), create a new (I use non-LVM) partition for /home, and "cp -a ..." everything over. Maybe update the Hardy fstab as well, just for completeness.
I would re-mkfs on your Jaunty partition then re-install Jaunty from a CD - it will detect the /home, and offer to migrate the user(s) over - use the same name(s) and password(s).
Nothing more to do. And you can even re-install Hardy using the same /home if you have to - been there, done that.
*Edit:* sorry - cancel that. I've only tested Hardy <-> Intrepid <-> Jaunty. I.e. just only jump at a time, not two releases at once.
Last edited by syg00; 12-29-2009 at 04:03 AM.
|
|
1 members found this post helpful.
|
12-29-2009, 02:40 PM
|
#5
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,792
Original Poster
Rep:
|
... I did most of this, BUT ...
Quote:
Originally Posted by syg00
If you can still get into the Hardy LVM (from a liveCD is best), create a new (I use non-LVM) partition for /home, and "cp -a ..." everything over. Maybe update the Hardy fstab as well, just for completeness.
|
I made a new partition from "unused" space on the disk /dev/sda9. I installed Jaunty there putting everything into that folder as a single file system. This offered minimal disruption of existing file systems.
I made a second new partition /dev/sda10. Copied the contents of the new, Jaunty /home onto the new partition. Edited the new Jaunty fstab and mounted /dev/sda10 as the new $HOME for Jaunty.
With Jaunty booted, I could mount the olde Hardy LVM file systems read-only to grab contents from /dev/hd/root and /dev/hd/home respectively. The old, LVM home remains intact
so I can cp -av $oldHome/* $newHome/ or whatever.
Quote:
Originally Posted by syg00
I would re-mkfs on your Jaunty partition then re-install Jaunty from a CD - it will detect the /home, and offer to migrate the user(s) over - use the same name(s) and password(s). Nothing more to do. And you can even re-install Hardy using the same /home if you have to - been there, done that.
|
Is there any way to run the home-migration stand-alone and separate from during the actual install of Jaunty? Since $oldHome exists and is intact, a stand-alone migrate tool would work wonders.
Thanks, again,
~~~ 0;-Dan
|
|
|
12-29-2009, 04:19 PM
|
#6
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251
|
The reason for the separate /home partition is that re-installs will find and use it. Only needs to be done once. Set it up, then install Intrepid, then do likewise to Jaunty.
Might work as one step, but I haven't tested it.
|
|
|
All times are GMT -5. The time now is 10:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|