Jump to content

Recommended Posts

Posted (edited)

I have just got a new laptop and I want to install Ubuntu 9.10 on it. My desktop PC has 8.10 and has all my videos/music/docs. I would like a fast way of transferring all my files across without too much fuss.

 

I don't really want to go out and buy a portable hard drive or anything as cash is pretty limited right now. Both computers have a connection to my router so I have considered a network share but is there any other way to transfer all my files to my laptop? I only have about 2 GB HDD space left on my desktop machine so I cant install anything huge.

 

I am quite used to SFTP but I'm not sure about using it for my entire home folder as I have had it stall on me in the past when transferring big files.

Edited by llawwehttam
Posted
rsync has a switch "-n, --dry-run" to show what would have been transferred - you can use this safely to see what's going to happen; if it shows the right files being copied the right way then you just run it without the switch and all is well.
  • Thanks 1
Posted (edited)

So with rsync to copy a folder from my desktop machine 192.168.0.3 to my laptop 192.168.0.4 would I be right in

rsync -v -e ssh [email protected]:/home/llawwehttam 

from my laptop to copy my home directory 'llawwehttam' from my desktop?

 

Hmm or would it be easier to use

rsync -v -e ssh [email protected]:/* 

or would that be too risky?

 

I suddenly like rsync!!

EDIT:I think I forgot to specify the location I was copying to. Would it just copy to the folder I was in or would I need to specify a folder such as /desktopbackup ?

rsync -v -e ssh [email protected]:/home/llawwehttam /Desktopbackup 

 

for instance

Edited by llawwehttam
Posted (edited)

Close. Assuming you are in your home directory, I suggest:

 

rsync -avz 192.168.0.3:~/ .

 

This enables archive mode (preserve file states) and gzip compression (faster), and copies the contents of your home directory on 192.168.0.3 to the current directory, which you should ensure is your home directory on your laptop. It assumes your remote username is the same as your local; if not, use user@host notation to specify it, like you did in your post. '~' is short-hand for your home directory and '.' is short-hand for the current directory (like '..', which is the directory one level above current).

 

You probably don't need to specify '-e ssh' because modern rsyncs will try to use ssh by default. The man page is your friend, but it's quite long.

 

Ubuntu One is a nice service, but it seems silly to upload everything there and then download it a machine a few yards away again. You might as well do it locally :)

Edited by powdarrmonkey
  • Thanks 1
Posted

Thanks again .

 

I really need to improve my knowledge of the command line as Ive been using it for 6 years now. I kinda want to learn a programming language as well, as writing in shell script has its limits. Might learn Python.

Posted
At the moment I use ubuntu, What would the best editor be for writing python. I do like to have colour coding and a possible test output. I have tried bluefish but don't seem to have colour and gedit is a bit basic.
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...