Reputation: 1095
As the question states, I want to backup many small files and send them via ssh to a destination. Does rsync speed things up significantly vs tar?
Upvotes: 0
Views: 1374
Reputation: 1095
This works quite well, significantly faster than gzip.
tar -c --zstd src_dir | ssh user@dest_addr "cd dest_dir && tar -x --zstd"
This does the following
This uses maximum compression (default level is 3) and multithreading.
tar -c -I "zstd -19 -T0" src_dir | ssh user@dest_addr "cd dest_dir && tar -x --zstd"
tar -c --zstd src_dir | pv --timer --rate | ssh user@dst_addr "cd dest_dir && tar -x --zstd"
ssh user@dest_addr "tar --zstd -cf - src_dir" | tar -x --zstd --directory dest_dir
Upvotes: 2