I have a Cassandra node with snapshots broken up into 64 directories with over 350 files per directory. I want to "find" all snapshot files, preserve their location, rsync them across to a host with lots of file space, and then tar/gz them when then land there. Is this possible in one step?
Currently I have to:
find /mnt* -type d -name snapshots -exec /usr/bin/rsync {} -avhr user@host:/mntc/backups/ ';'
Then:
tar -czpf /mntd/backups/mybackup.tgz /mntc/backups/snapshots
It would be nice to do something that would "pour" the files found directly into an archive on the other end during the rsync process. Is this possible?
NOTES:
- Cassandra nodes do not have required 1Tb of free space to pre compress files in find search
- Rsync of files to new host and then tarballing results requires 2Tb on host, reducing the number of Cassandra nodes I can do at a time (20 in total require backup)