Rsync
From James's Wiki
To copy files to a remote server
rsync -e 'ssh -p 2222' *.txt username@batman:/tmp
NOTE: It might be possible to set the default ssh port in ~/.ssh/config so specifying the remote port all the time will be unnecessary.
backup dir1 to dir2 and delete missing from dir2
rsync -a --delete /media/hdd1/data-1/ /media/hdd2/data-2/