..::capture of life::..

...my thoughts, learnings & captured images...

remote copy using rsync

Sometimes its better to use rsync then scp command for copying file from remote machine where bandwidth is one of the issue. You can specify the bandwidth usage in the rsync but this facility is not available in scp.

command format:

rsync [OPTION]... --bwlimit=XX [USER@]HOST:SRC DEST

-v, –verbose increase verbosity
-a, –archive archive mode; same as -rlptgoD (no -H, -A)
-u, –update skip files that are newer on the receiver
-r, –recursive recurse into directories
-e ssh = specify the remote shell to use
--bwlimit=KBPS limit I/O bandwidth; KBytes per second

e.g.: rsync -av --bwlimit=XX -e ssh user@host:/path_of_the_SRC_file /path_where_it_will_stored

Some times you will find error like
ld.so.1: rsync: fatal: libgcc_s.so.1: open failed: No such file or directory
i.e. no libgcc found on /usr/local/lib and rsync always look for libgcc_s.so.1 on /usr/local/lib
Then simply make a soft link
ln -s /usr/sfw/lib/libgcc_s.so.1 /usr/local/lib/libgcc_s.so.1 [on Sun host only]

0 comments:

add2any