Skip to content

Commit

Permalink
avoid syncing time for checksum-based rsync
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Mar 3, 2024
1 parent c5cd440 commit abbb2d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions deploy-server
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ echo target is $target
echo

ssh $remote "rm -rf $target && cp -a $active $target"
rsync -prctv --chmod=D755,F644 --fsync --preallocate systemd/system/ $remote:/etc/systemd/system
rsync -prctv --chmod=D755,F644 --delete --fsync --preallocate build/libs/ $remote:$target
rsync -prcv --chmod=D755,F644 --fsync --preallocate systemd/system/ $remote:/etc/systemd/system
rsync -prcv --chmod=D755,F644 --delete --fsync --preallocate build/libs/ $remote:$target
ssh $remote "ln -snf $target $path/deploy && sync $path/deploy && systemctl daemon-reload && systemctl restart attestation"

echo
Expand Down
12 changes: 6 additions & 6 deletions deploy-static
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ echo target is $target
echo

ssh $remote "rm -rf $target && cp -a $active $target"
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ $remote:$target
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ $remote:$target
ssh $remote "ln -snf $target /srv/attestation.app && sync /srv/attestation.app"

echo "root $target;" > nginx-tmp/root_attestation.app.conf
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate nginx-tmp/{nginx.conf,mime.types,root_attestation.app.conf,snippets} $remote:/etc/nginx/
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate nginx-tmp/{nginx.conf,mime.types,root_attestation.app.conf,snippets} $remote:/etc/nginx/
ssh $remote nginx -s reload

echo
echo active is now $target

rsync -ptcv --chmod=755 --fsync --preallocate remote-backup $remote:/usr/local/bin/
rsync -ptcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.timer $remote:/etc/systemd/system/remote-backup.timer
rsync -ptcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.service $remote:/etc/systemd/system/remote-backup.service
rsync -ptcv --chmod=644 --fsync --preallocate backup-public-key.txt cloud-archive-password.txt attestation@attestation.app:
rsync -pcv --chmod=755 --fsync --preallocate remote-backup $remote:/usr/local/bin/
rsync -pcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.timer $remote:/etc/systemd/system/remote-backup.timer
rsync -pcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.service $remote:/etc/systemd/system/remote-backup.service
rsync -pcv --chmod=644 --fsync --preallocate backup-public-key.txt cloud-archive-password.txt attestation@attestation.app:

0 comments on commit abbb2d4

Please sign in to comment.