brushing up backups
This commit is contained in:
parent
e9bb90f8f8
commit
2ebb2f9a64
5 changed files with 185 additions and 3 deletions
|
|
@ -22,7 +22,12 @@ pull_{{ src.name | replace('-', '_') }}() {
|
|||
local dir="${STORE}/{{ src.name }}"
|
||||
mkdir -p "$dir"
|
||||
log "Pulling {{ src.name }} from {{ src.source }}..."
|
||||
if rsync -az --timeout=120 \
|
||||
# --exclude '*.partial': a dump that died mid-write leaves one behind, owned
|
||||
# root:root 0600 because the chown only happens after a successful mv. Without
|
||||
# this exclude the pull account cannot read it and rsync fails for the WHOLE
|
||||
# source — so one failed dump would silently block every subsequent pull of
|
||||
# that service. An incomplete artefact is never worth transferring anyway.
|
||||
if rsync -az --timeout=120 --exclude '*.partial' \
|
||||
-e "ssh -i $SSH_KEY -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15" \
|
||||
"{{ src.source }}" "$dir/"; then
|
||||
log " {{ src.name }}: ok ($(find "$dir" -maxdepth 1 -type f | wc -l) artefacts, $(du -sh "$dir" | cut -f1))"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue