LinuxQuestions.org
Register a domain and help support LQ
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 07-25-2004, 04:39 PM   #1
bumpert
LQ Newbie
 
Registered: Dec 2002
Distribution: RedHat
Posts: 29

Rep: Reputation: 15
Moving my /home directory to another hd [SOLVED]


i would like to move my home directory to another hd

i tried to make a cp -a of my /home directory
but cp had problem to keep the permission... (had operation not permitted error)

got this error too when i trieds to chown of each username folder


so how can i move correctly my home directory????

thx

Last edited by bumpert; 07-25-2004 at 09:39 PM.
 
Old 07-25-2004, 04:54 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
just sounds like you're not doing it as root. a cp command should normally work, but generally i use:

find -xdev /home | cpio -pvd /mnt/

where the new home partition is mounted as /mnt/home. works just fine. you're also fine to test the copy immediately and, once loged out of a normal user account, mount the new home drive directly as /home/ and log straight back in again
 
Old 07-25-2004, 05:27 PM   #3
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: Debian Wheezy
Posts: 2,872

Rep: Reputation: 88
Check this article out.
 
Old 07-25-2004, 05:27 PM   #4
bumpert
LQ Newbie
 
Registered: Dec 2002
Distribution: RedHat
Posts: 29

Original Poster
Rep: Reputation: 15
i did this as root

when i tried your command i got this:

find: paths must precede expression
Usage: find [path...] [expression]
0 blocks


sorry i'm new
 
Old 07-25-2004, 05:28 PM   #5
bumpert
LQ Newbie
 
Registered: Dec 2002
Distribution: RedHat
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by 2damncommon
Check this article out.
i'll check it and give you feedback
 
Old 07-25-2004, 09:39 PM   #6
bumpert
LQ Newbie
 
Registered: Dec 2002
Distribution: RedHat
Posts: 29

Original Poster
Rep: Reputation: 15
thx that work
 
Old 07-26-2004, 04:27 AM   #7
Gnuru
Member
 
Registered: Jan 2004
Posts: 53

Rep: Reputation: 15
Best ways to move directories while maintaining permissions is to use rsync. Second best way is to use a tar. Both ways are explained here:

http://gnuru.org/index.pl?node_id=692
 
  


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
moving out home directory during ftp session saeed_zarea Linux - Networking 8 07-12-2011 08:07 AM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 03:37 PM
Moving /home Directory? NovaBurst DamnSmallLinux 1 04-18-2005 11:59 PM
moving /home to / abu_abdullaah Linux - Newbie 3 07-18-2004 02:15 PM
Moving /home xodeus Slackware 7 10-06-2003 04:33 PM


All times are GMT -5. The time now is 11:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration