Re: Transfer home directory to another box
- From: Vlad_Inhaler <andrew.williams@xxxxxxxxxxx>
- Date: Mon, 02 Jul 2007 23:43:49 -0700
On Jul 3, 6:59 am, Barnacle Bill the Sailor
<mungedandmang...@xxxxxxxxxxxxx> wrote:
So I have got a new box built, and I am going to put Suse on it like I
have on my current one. Based on some positive comments here I will try
the 64 bit version. What I'd like to know is how can I copy the contents
of my present home directory to the new box, and not have to adjust the
permissions file by file. The last time I moved files around from box to
box, file ownership became a mess. Indeed I still have some files on my
present box that I can't edit without first going in as root and
changing the permissions. Since there are so many I do them one at at
time as I need to edit them. But of those that are already assigned to
me, I'd like to to migrate them to the new box in such a way that the
new box recognizes them as belonging to the new me thereon. (I will
assign myself the same user name, not that that means anything to two
different Linux installs.) Thanks!
ok, the first thing that matters is the user number (not the name).
If you look at your entry in /etc/passwd, this is the first of the two
numeric fields. The second numeric field is the group but I am not
expecting that to be a problem.
How are you expecting to physically copy the files over?
- network (nfs or Samba)
- attaching the old disc to the new machine
- CD-Rom or similar.
I'd clean up ownership first with houghi's chown -R user:group /
home/username
With a network, I am not sure if Samba gets the ownerships and the
permissions right. The smb protocols were designed for Windows which
does not have this stuff. Samba has extensions nowadays to handle
unix extras but I am not sure how far they go.
nfs should work. I'd copy the entire /home tree to the destination
(as root). This also applies if you attach the old disc to the new
system (or new disc to old system - get it right from the start!)
I believe you lose ownership / permissions if you use a CD. Can
someone post if this is wrong?
The way I copy entire trees is (as root):
- Mount the source and destination partitions (one will be /home, you
really need /home on the new system to be a partition)
cd /from_dir
tar cf - . | (cd /to_dir ; tar xf - )
Change the names 'from_dir' and 'to_dir' to fit.
If you do not have many local users, you might just as well create
them anew on the new system. Just make sure the numbers match.
Otherwise I agree with houghi - copy those 3 files.
.
- Follow-Ups:
- Re: Transfer home directory to another box
- From: Unruh
- Re: Transfer home directory to another box
- References:
- Transfer home directory to another box
- From: Barnacle Bill the Sailor
- Transfer home directory to another box
- Prev by Date: Re: Transfer home directory to another box
- Next by Date: Re: Problems Starting A Second Permanent X Display
- Previous by thread: Re: Transfer home directory to another box
- Next by thread: Re: Transfer home directory to another box
- Index(es):
Relevant Pages
|