Rsync

rsync -avz --exclude-from 'exclude-list.txt' ssh source_dir/ user@hostname.com:/opt

-v : Verbose (try -vv for more detailed information)
-a : archive mode
-z : compress file data

[root@sms opt]# cat exclude-list.txt
img
logs
src
bin
web
deploy
dist
staging
backup

Running rsync in background:

ctrl + z

When you press ctrl + z then the process stopps and goes to background.

^Z
[1]+  Stopped                 rsync -avz --exclude-from 'exclude-list.txt' ssh source_dir/ user@hostname.com:/opt

Now press bg and will start in background the previous process you stopped.

[1]+ rsync -avz --exclude-from 'exclude-list.txt' ssh source_dir/ user@hostname.com:/opt

Press jobs to see the process is running

[1]+ Running rsync -avz --exclude-from 'exclude-list.txt' ssh source_dir/ user@hostname.com:/opt

If you want to to go in foreground press fg 1 1 is the process number

  1. Now RSYNC seems easy :mrgreen: 😆 😀 thanks for such easy post

Leave a Comment

Array ( [marginTop] => 100 [pageid] => @techish1 [alignment] => left [width] => 292 [height] => 300 [color_scheme] => light [header] => header [footer] => footer [border] => true [scrollbar] => scrollbar [linkcolor] => #2EA2CC )