LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-04-2012, 07:10 PM   #1
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 316

Rep: Reputation: 32
move /home to new computer


I want to move my /home directory to a new computer ("NEW") from my old workhorse ("OLD") which is having intermittent hardware problems losing connectivity (ethernet port stops working).

Both computers are running Ubunutu 10.04, but this may not be significant since the guidance I am trying to follow, i.e.,

http://www.novell.com/coolsolutions/feature/11865.html

is for the command line. This article was written in 2005, but is the most clearly written and complete set of instructions I have found and since it is all command line, I am assuming that the syntax is still applicable?

Unfortunately I am rather "command line challenged" and suspect that the difficulties that I am having are consequent to this, and hope someone will hold my hand.

I have gotten as far as

creating the tarball of /home on the old computer (it is in the /home directory of OLD and is 20G's in size-see post: "Huge tarball-what gives?" also in Linux-Newbie) and am ready to move it to NEW (for the moment, I have connectivity between the two computers). I can ping NEW from OLD but run into a problem trying to transfer the file from OLD to NEW.

When I give the command (while in OLD):

"scp home.tar.gz root@192.168.0.104:" (as shown in the above-referenced article

it returns

"home@192.168.0.104's password:"

I enter the password and it returns

"Permission denied. Please try again."

The thing is that I am absolutely sure that I am entering the correct password (and have repeated my attempt several times.) The username is the same on both computers and the password is the same on both computers.

So I expect that there is some sort of permission problem or addressing problem in my syntax or I am in the wrong directory in one or both computers. (I am in the /home directory of both). Can anyone see anything in the above that I am doing wrong? or have any suggestions or questions?

I really am a complete beginner at the command line, so please take into account in your reply. Thanks.

Last edited by Odyssey1942; 03-04-2012 at 08:55 PM.
 
Old 03-04-2012, 09:06 PM   #2
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73
Blog Entries: 1

Rep: Reputation: 2
You input the following command:
scp home.tar.gz root@192.168.0.104:"

The user of 192.168.0.104 is root.

And What user's password you input?
 
Old 03-04-2012, 09:15 PM   #3
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 316

Original Poster
Rep: Reputation: 32
I am the only user of this computer and AFAIK I am root (which I get to using SUDO).

How do I check to see if the password that I use for myusername works as root?

P.S. You might want to have a quick read through the article that I mentioned at novell.com. About halfway through is where I found that command.

Last edited by Odyssey1942; 03-04-2012 at 09:18 PM.
 
Old 03-04-2012, 09:20 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Probably 192.168.0.104 is configured to disallow scp for root. Changing root in root@192.168.0.104 to your personal user name will likely solve the problem.
 
Old 03-04-2012, 09:23 PM   #5
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 316

Original Poster
Rep: Reputation: 32
Catkin,

Thanks for the suggestion, but I am a total beginner and do not know how to do that.

Could I instead scp to myusername and then move it out of /home to unzip it?
 
Old 03-04-2012, 09:35 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
You can scp in either direction. This is the syntax that works for me.

To scp a file FROM one computer to another:

Quote:
scp [ipaddress]:/path/to/file/name /home/username/path/to/target/directory
To scp TO one computer from another:

Quote:
scp /path/to/filename [ipaddress]:/path/to/target/directory
 
Old 03-04-2012, 09:38 PM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
At this point the need is to get home.tar.gz onto the new computer. Once it is there you can easily move it where the procedure requires it. You just have to change the /root in mv /root/home.tar.gz /home accordingly.

For example, if your personal user name on the new computer is Odyssey1942, then on the old computer you run
Code:
scp home.tar.gz Odyssey1942@192.168.0.104:
and on the new computer, using sudo to gain root privileges
Code:
mv ~Odyssey1942/home.tar.gz /home
 
1 members found this post helpful.
Old 03-04-2012, 09:49 PM   #8
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 316

Original Poster
Rep: Reputation: 32
That was it. By sending it to my username instead of root on NEW, it is now busy transferring files from OLD to NEW.

However, I now need to know if I am actually accomplishing anything. Could I please refer you to the post:

Quote:
Huge tarball-what gives?
also in Linux-Newbie, and ask for your thoughts on this. I may be sending gibberish to NEW.

Many thanks.
 
Old 03-04-2012, 10:22 PM   #9
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 316

Original Poster
Rep: Reputation: 32
I do have a couple of other question regarding the move command on NEW.

Can I also do this from Gnome instead of the command line or is this going to cause problems with open files etc?

If better from the command line, do I need to rename or move the current /home directory first so that I can recover in the event that the tarball is gibberish? Any place I should (or should not) move the current /home to?

Thanks.
 
Old 03-05-2012, 06:53 AM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by Odyssey1942 View Post
Can I also do this from Gnome instead of the command line or is this going to cause problems with open files etc?

If better from the command line, do I need to rename or move the current /home directory first so that I can recover in the event that the tarball is gibberish? Any place I should (or should not) move the current /home to?
It needs root privilegess so probably easier to do at the command prompt.

With root privileges you could move /home to /home.aside (actually a rename but the mv command is used) and then mkdir /home. If the new /home does not have the same owner, group and permissions as the old you can (again with root privileges) use the chown and chmod commands to change as required.
 
1 members found this post helpful.
Old 03-06-2012, 09:46 AM   #11
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 316

Original Poster
Rep: Reputation: 32
In my new computer used ctrl-alt-f1 to get to the console at the login screen.

In /home exists /username with the tarball from the old computer in it. So I have renamed /username as /usernameold so that I will have it in case something goes very wrong with the unpack.

This O/S is a new install although it had been used for testing to be sure that everything (including internet and browsers)works correctly. Can I just move the tarball to /home and if I unpack the tarball from there, will it set up /username?

Otherwise how do I ensure a minimum of conflicts or other problems when I unpack the tarball? Thanks.

Last edited by Odyssey1942; 03-06-2012 at 10:51 AM.
 
Old 03-06-2012, 12:08 PM   #12
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by Odyssey1942 View Post
Can I just move the tarball to /home and if I unpack the tarball from there, will it set up /username?
If you created the tarball in the way shown in the procedure linked in the OP then "yes".
 
  


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
[SOLVED] Can't move /home in 11.10. n5kzw Ubuntu 5 11-02-2011 09:53 AM
move /home to another computer Odyssey1942 Linux - Newbie 22 12-08-2010 04:14 PM
How to move open office doc from Linux computer to Windows computer Phoenixink Linux - Software 6 02-15-2007 07:09 AM
Can I move /home ? MikeyDIUP Linux - Newbie 3 09-11-2005 01:36 AM
I want to move home fannymites Linux - General 1 12-04-2004 05:45 AM

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

All times are GMT -5. The time now is 05:51 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