...
On Linux filesystems we strongly recommend to use rsync to copy data. Here are some useful examples:
Example | Command | Note |
---|
Basic usage | rsync -Pauv $SDIR $SERV:/$DDIR/ | Copies a source directory from the local server to the destination directory on a specified server. Only newer files are copied. Interrupted transmissions are continued
|
---|
Set group/user and permissions | rsync -Pvrupog --chown=$USR:$GRP --chmod=D770,F660,Dg+s $SDIR $SERV:$/DDIR/ | Sets user, group and sgid at the destination please google yourself for more information on the specified options
|
---|
Parallel rsync |
---|
find . -maxdepth 1 -type d -print0 cd $SDIR ls | parallel -j8 |
-0 '$/DDIR/'$DDIR/ ls | xargs -n1 -P8 -I% rsync -Pauv % $SERV:$DDIR/ | Copy several (e.g. 8) directories at once. Use with care, with a huge number you can easily jam the network (and you do surly not want to do that )
|
On Windows you can install rsync via Cygwin or you can use https://en.wikipedia.org/wiki/Robocopy
...