LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 12-28-2009, 03:12 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,792
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
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
 
Old 12-28-2009, 03:47 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
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.
 
Old 12-29-2009, 02:04 AM   #3
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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.
 
Old 12-29-2009, 03:53 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251

Rep: Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159
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.
Old 12-29-2009, 02:40 PM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,792

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
... I did most of this, BUT ...

Quote:
Originally Posted by syg00 View Post
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 View Post
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
 
Old 12-29-2009, 04:19 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251

Rep: Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
seeking HOWTO -- EmperorLinux(tm) kernel SaintDanBert Linux - Hardware 1 12-08-2009 04:06 AM
mixed mounting of automount and fstab in one folder? &different home folder using NIS herofmm Linux - Software 0 04-06-2009 11:00 AM
Home folder icon does not open home folder CiscoGeek Linux - Newbie 3 12-18-2006 07:00 AM
Reiserfsck stops when rebuilding tree at 50% - trying to recover deleted data vangelis Linux - Software 6 10-23-2006 12:34 PM
Trashing the Trash Folder? Xios Linux - General 1 02-10-2005 11:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration