tar czf - SOURCE_DIR | ssh USER@REMOTE_HOST "cd REMOTE_DIR; tar xzf -"
# or if the tar is sufficient on the other side:
tar czf - SOURCE_DIR | ssh USER@REMOTE_HOST "cat >REMOTE_DIR/backup.tgz"
####
-j, --bzip2
filter the archive through bzip2
-J, --xz
filter the archive through xz
-z, --gzip, --gunzip --ungzip
filter the archive through gzip
####
-T, --files-from FILE
get names to extract or create from FILE
####
-X, --exclude-from FILE
exclude patterns listed in FILE
####
tar czf - SOURCE_DIR | pv | ssh USER@REMOTE_HOST "cd REMOTE_DIR; tar xzf -"
# or if the tar is sufficient on the other side:
tar czf - SOURCE_DIR | pv | ssh USER@REMOTE_HOST "cat >REMOTE_DIR/backup.tgz"