Is there any good existing solution for moving files from host A to host C, using host B a an passive intermediate storage area.
A -> B -> C
Limitations
- Host A and host C are on separate networks and can not access each other. No tunnels can be opened between A and C.
- Both host A and host C can run and schedule periodic processes.
- Host B only provides a storage area and can be accessed from both host A and host C through SSH.
- B will be "passive" and will only provide the storage area.
- Thus A will act as writer (of files on B), and C will act as a reader (of files on B).
- Files that are successfully copied from host A to host C (via B) can then be deleted on host A.
- No files on host A should be deleted until there is a guarantee (a receipt containing a file checksum?) it has successfully landed on host C.
- Corner cases includes management of network downtime, disk full, interrupted processes etc
The aim is to, at regular intervals, move files from A to C, using B as intermediate storage area.
We can assume that all host are running Unix/Linux. Tools preferred: ssh/rsync/bash + other "standard" tools.
I was thinking of creating a solution by using some bash scripts around rsync in two steps and using receipts containing checksums to detect when a file is successfully moved all the way.
Are there any existing solutions?