LinHES Forums
http://forums.linhes.org/

moving files from one LinHES to another over network
http://forums.linhes.org/viewtopic.php?f=5&t=22010
Page 1 of 1

Author:  mattbatt [ Fri Feb 04, 2011 10:03 pm ]
Post subject:  moving files from one LinHES to another over network

I'm moving some files from my old LinHES box to the new one over the network. I'm simple minded and I am using my windows computer and both LinHES's network shares to copy and paste the files. I am assuming that Windows is dragging the files on to itself before pasting them onto the new box.
Is there a better easier way to send files from one LinHES box to another?

Author:  christ [ Fri Feb 04, 2011 10:30 pm ]
Post subject: 

yup.

Look up rsync (man rsync). It will allow you to copy everything from one computer to another preserving permissions and ownership and you won't have to mount anything.

assuming you are at linhes1 and you want to copy to linhes2 it is something like:
Code:
rsync -av -e ssh --progress /path/on/linhes1 username@linhes2:'/path/to/destination/on/linhes2'


The option -av means archive & verbose. archive means preserve a bunch of stuff like permissions, ownership, creation date, etc. "-e ssh" means use the ssh protocol to do the transfer. "--progress" shows you as each file is processed; you can skip that if you find it overwhelming.

Careful with trailing slashes on the source directory. You will note I did not use one. A trailing slash means copy the contents of that directory whereas no slash means copy that directory. See man for more.

rsync also knows what has been done before so if you have to restart it, it will only copy what has not been done or what has changed. Hence it is also an excellent backup tool. I use it extensively.

Hope that helps get you started.

Author:  mattbatt [ Fri Feb 04, 2011 11:32 pm ]
Post subject: 

Thanks Christ that is nice and easy.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/