LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-28-2005, 06:01 AM   #1
Thin
LQ Newbie
 
Registered: Jul 2004
Location: Southern England
Distribution: Mandriva / Gentoo / CentOS
Posts: 27

Rep: Reputation: 15
Unhappy Backing Up Home Dirs before upgrade


Hi all

Am about to do a clean install of Mandrake 10.1 (currently running 10). Before doing so I wish to back up my users home directories.

I've tried copying them over to an external hard drive as the user themselves but got errors copying the files. Fine, must be a permission problem - I thought, so went to try it as root and got the same problem.

I'm clearly missing something really obvious here - whats the best way of performing a complete backup of the home dirs (including all the 'hidden' KDEmail folders etc)

TIA

Thin
 
Old 01-28-2005, 06:15 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
I can't help you but can give you some sort of guidance for next time. Put your /home on a seperate partition or hard drive that way upgrading your system, will just leave /home intact.
 
Old 01-28-2005, 06:21 AM   #3
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
Try this... as root...

cd /

tar -czvf users_home_directories.tar.gz /home/*

Copy the resulting file called users_home_directories.tar.gz to some other media.

Install Mandrake 10.1

Copy the file back to root

Then

tar -xzvf users_home_directories.tar.gz /home/*

If you are going to merely "copy" the directory structure, do it from the command line...

e.g.

mount /mnt/newdisk <--- replace with actual device name...
mkdir /mnt/newdisk/home

cd /

cp -raf /home/* /mnt/newdisk/home

The "a" (archive") flag is what is most important to avoid the errors and wrong permissions, etc.
 
Old 01-28-2005, 07:12 AM   #4
johntramp
Member
 
Registered: Sep 2003
Location: Christchurch, New Zealand
Distribution: Gentoo / Slackware
Posts: 72

Rep: Reputation: 15
is it that important if it is a huge hasstle to upgrade? I am not a mandrake user but generally there are no huge changes between such close releases.

Also it would be good if you posted the errors from copying the files.

Last edited by johntramp; 01-28-2005 at 07:13 AM.
 
Old 01-28-2005, 08:40 AM   #5
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
While small version change upgrades tend to work well, a complete re-install usually fixes scripts, etc. that might be skipped by both the user and installation scripts.

Because of this results are usually better with the backup, re-install scenario.

That said;

Your milage may vary.
 
Old 02-01-2005, 11:13 AM   #6
Thin
LQ Newbie
 
Registered: Jul 2004
Location: Southern England
Distribution: Mandriva / Gentoo / CentOS
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for everyones comments.

reddazz - my home dirs were on a seperate partition, I've had hard disks conk out before during upgrades / reinstalls so I like to take a full backup beforehand if poss. While all the really important stuff (documents etc) was backed up to CD there was a whole ton of crap in there that the family didn't want to lose

Opjose - thanks did the trick wonderfully
 
Old 02-01-2005, 11:44 PM   #7
RoofRabbit
Member
 
Registered: Mar 2004
Location: Lenoir, NC USA
Distribution: Mandrake 10.2
Posts: 129

Rep: Reputation: 15
Don't forget some key config files in the /etc directory such as /etc/samba/samba.conf.

When you get errors complaining about not being able to change permissions during copying, the problem is on the drive you are copying to. Backing up to a windows fat32 or ntfs drive will do this. The files are there but in the windows case they are all marked as executable. It's not a real problem, you just have to correct the flags after restoring in this case.

When you copy files back to your home directory, do it as your normal user login NOT root or all the files copied will belong to root instead of you.
 
  


Reply



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
Backing up /home une Mandriva 8 07-10-2005 07:38 AM
Backing up for system upgrade ivelgo Fedora 1 12-14-2004 02:37 PM
give users access to home dirs jonas73 Linux - Newbie 2 03-16-2004 01:42 AM
upgrade/reinstall and /home BrianNJ Linux - Distributions 2 11-25-2003 11:45 AM
vsftpd: restricting users to home dirs groovin Linux - Security 6 11-25-2002 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 09:31 PM.

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