I run some services on machine A. I want to backup the data to machine B. It's around 40 gigabytes in thousands of small files. I would prefer to compress the data, but there's not enough space on machine A to keep the data twice (original + tar archive). I would like to avoid copying that many files via scp/rsync since it's taking forever and a bit fragile.
Any solutions on how to solve this? Is it possible to compress live on machine A and stream into the archive on machine B without the need to keep the big archive file on A?
Eventually, it's supposed to be automated and B has like the last 3 dailys, 1 weekly, 1 montly.
B can ssh into A.
Have the filesystem compress by default and ship that?
I know you can do it with zfs. Export a snapshot of a fs with compression enabled. I'm less sure if you can do it with a btrfs, lvm, or xfs though. I know they support fs level compression though.
One machine is a cloud VM with LVM I think, the other is my NAS with zfs. I think with zfs to zfs it would easily work!