Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am facing the following doubt.

I installed Arch time ago with a home separate partition. My issue is that I need to reinstall the system and I don't have a backup of my /home.

Would a new installation overwrite my home and leave it empty or keep my current files?

The question is because theorically keeping the data is the main purpose of having one I guess, but it happened to me before that left my home partition empty as new (had a back-up before, but not now). In the installation, when specifying the mounting points, I selected home as /home mounting point and deleted the previous data it had.

I will appreciate if someone passed through a similar issue and knows for sure a safe way of reinstalling the system, selecting home mounting point in /home partition and managed to keep the old home data intact.

Would installing the system with home included in the partition A / and then manually specify in fstab partition B /home mounting point the cleanest/safer way to do it?

EDIT:

I finally backed up my data there as is the only real safe thing to do, and I dont feel so comfortable with luck. Anyway my old home partition I will divide it again, will left around 5 GB partition just to have my recovery partition and avoid having to deal with this again.

I'm not sure if its correct to ask it here or should I open a new question but my doubt is if I copy *.* from my fresh installation / to my new 5 GB recovery partition, next time I run into a similar situation, I just boot with a live USB and copy *.* from recovery partition to normal / partition and it is restored as brand new, am I right?

share|improve this question
    
What installation procedure are you using? If you're following the arch linux Installation Guide, I think you just need to skip the create the new file system step for your home partition. –  Mikel Aug 9 '12 at 19:22
    
I followed and will follow the arch installation guide in combination with the beginers guide. should i skip the 'Configure block devices, filesystems, and mountpoints'point doing only swapon /dev/sda2? so then just mount partitions and create fstab (im thinking in just copying my actual)? I will reinstall the system this weekend, i will let you know how it went, thanks PD jmathew i will try that tar -cpvjf home.tar.bz2 /home and see the size, im short of space. –  Santiago Rebella Aug 10 '12 at 8:27

4 Answers 4

up vote 2 down vote accepted

If you have enough space somewhere you can

tar -cvjf home.tar.bz2 /home

And if anything goes wrong when you try to do it a more appropriate way you can be sure you'll still have your data.

share|improve this answer
    
accept this answer as was what i finally did, backup the home –  Santiago Rebella Aug 17 '12 at 12:30
1  
@jmathew: the -p option is ignored when creating an archive with tar; it is taken in consideration only when extracting. –  Francesco Turco Sep 13 '12 at 12:22

I think you have two choices, the one you already mention, installing just in / and then adding /home to fstab later or do the "manual" installation where you create your storage layout then you don't format your /home and set it up from the beginning.

share|improve this answer
    
thank you tripledes, the thing is that when this happened last time i made the manual installation specifying from there /home mounting point but wiped it. –  Santiago Rebella Aug 9 '12 at 18:48
    
If you do the archlinux manual installation, you use fdisk and mkfs for creating your own partitions and write your fstab by hand...so if you did that and wiped your partition, it was you using mkfs. –  tripledes Aug 9 '12 at 20:44

Another reason I bit the bullet and went for the 100 Gb dropbox account :D. With trucrypt for personal files, of course.

If dropbox (or other services) isn't an option, you could always not select a /home partition and only select your / partition. Then, after then installer is finished, add an entry on fstab pointing your home partition to /home. Reboot create a new user and move everything to the new account (this is to make sure the user is set up to use whatever OS you're installing).

A bit hackish, but the installer won't touch your home partition.

share|improve this answer

I don't have experience with Arch Linux installation, but most distros let you choose if a partition needs formatting or not. For example both in Debian based distros and Red Hat based distros you can specifiy a /home partition and not format it.

Be careful to choose something like manual partitioning and don't let the installer guess "the best way to partition the disk".

Also, you should choose a different username, if asked, for the normal user as Arch installer could recreate the home directory and erase its contents... I don't really know, so play safe ;)

You can afterward create your usual user(s) and point it (them) to the correct home directories. And don't forget to upgrade the owners of the directories as new users could have different UIDs from the old system even with the same username.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.