On Thu, Oct 30, 2008 at 11:07 AM, Richard Thomas <[EMAIL PROTECTED]> wrote:
> Brandon Valentine wrote:
>> % rsync -a /my/local/dir/ [EMAIL PROTECTED]:/my/remote/dir/
>>
> This is most of what you need. The -a option turns on most of the useful
> transfer options. Other useful options I commonly use are
>
> z - Compress the data. Handy if you have a lot of text or otherwise
> compressible files and are transferring over a slow connection
> i - Itemize changes. Not so useful if you're automating things
> v - Verbose. Again, not quite so useful if you're automating things. You
> may want to pipe the output somewhere though
> --delete - delete items that don't exist on sender. Useful if you will
> be doing repeatedly and don't want to keep old files.

These are some good suggestions.  Things to note:

If your data set is largely uncompressible, turning on compression
will actually slow down the overall transfer.  However, if a
significant portion of your data set is compressible, then if you are
on a slow link on either end of the connection, turning it on can be a
huge boost.  If you've got fast pipes at both ends however, you're
again probably just going to slow down the overall transfer.  It comes
down to whether the bandwidth available to you would make the file
transfer take less time than the CPU cycles necessary to compress the
data.  If it's a live server running other applications you may also
want to avoid compression just to avoid causing CPU contention
problems for the other applications.

If you're transferring a large number of files, turning on verbose
output can actually slow you down, as can turning on the progress
meter.  The additional system calls necessary to output to the
terminal add up over time and in a very large transfer with a large
number of files can comprise a non-trivial amount of time.  If you're
transfering 5 10GB files, then I wouldn't worry about the output.

Also, if this is going to be a long running process and you're
starting it on a remote machine, I heartily recommend you run it under
GNU screen.  This should be installed by default on most Linux
distributions and if not is usually just an apt-get or yum command
away.  If you lose your connection to the remote server you won't lose
the tty controlling the rsync process and will be able to reconnect to
it.

Hope this helps,

-- 
Brandon D. Valentine
http://www.brandonvalentine.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to