Rsync for cross-site snapshot copy
Replace scp with rsync in the site-prefixed snapshot copy transfer introduced by "Cross-site snapshot copy verb", so a repeated transfer of a large snapshot moves only what changed.
Why. The transfer ships the whole triple (.dump, .files.tar.gz when present, .meta). SceneBook's photos tar can be gigabytes, and scp re-sends it in full on every copy. A production pool holding a snapshot that was already copied once still pays the whole transfer again, on the home uplink in the push direction.
What. Rsync over the same ssh Host alias the verb already uses (the site name), with delta transfer against the staged destination file — the shape rsync --inplace or --partial gives, pointed at the temp name the verb stages. The existing guarantees stay as they are:
- the size and sha256 check per file still runs after the transfer, and a file that fails it is never moved onto the slot name;
- a failed transfer still leaves nothing behind, or leaves only a temp file the next run can complete against (which of the two is a plan decision — the second is what makes the delta possible);
- same-site copies never leave the pool, so they are untouched.
Why it is separate. Donnie: "I love rsync, but we don't have time." The first version ships with scp plus the checksum; this item swaps the transport once the MVP deadline is past.
Plan questions. Whether the remote side needs rsync installed (prod-2 runs from the golden AMI, so that is an ops/prod-2-host.sh change and a re-bake), and whether the pool should keep its temp files between runs or clean them up.
- Slot
- 7282
- Status
- 10 Open
- Tags
- mvp, scripts, ops, prod
- Contributors
- Donnie, Sofia