Skip to content

Commit 29589c7

Browse files
committed
restore to rsync
1 parent 12d065c commit 29589c7

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

scripts/deploy-nginx.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@ ssh $REMOTE_HOST "cd $REMOTE_PATH && \
2222
find . -type f | wc -l && \
2323
2424
# Only possible to skip with rsync --delete
25-
echo 'Clearing contents of the folder...' && \
26-
rm -rf * && \
27-
echo 'List after clearing:' && \
28-
ls && \
29-
echo 'Count after clearing:' && \
30-
find . -type f | wc -l && \
25+
26+
# echo 'Clearing contents of the folder...' && \
27+
# rm -rf * && \
28+
# echo 'List after clearing:' && \
29+
# ls && \
30+
# echo 'Count after clearing:' && \
31+
# find . -type f | wc -l && \
3132
3233
echo 'Copying new contents...'"
3334

3435
# Copy new contents, 320 MB
3536
# Using scp -rq, slowest, not resumable
3637
# scp -rq $LOCAL_PATH/* $REMOTE_HOST:$REMOTE_PATH
37-
time scp -rq $LOCAL_PATH/* $REMOTE_HOST:$REMOTE_PATH
3838

3939
# Using rsync, fastest, resumable, deletes without clearing, lot faster with reusing unchanged files (--delete)
40-
# rsync -az --delete --info=stats2,progress2 $LOCAL_PATH/ $REMOTE_HOST:$REMOTE_PATH
40+
rsync -az --delete --info=stats2,progress2 $LOCAL_PATH/ $REMOTE_HOST:$REMOTE_PATH
4141

4242
# Using tar, fast for cleaned dir
43-
# tar cf - -C "$LOCAL_PATH" . | ssh "$REMOTE_HOST" "tar xvf - -C $REMOTE_PATH"
43+
# tar cf - -C "$LOCAL_PATH" . | ssh "$REMOTE_HOST" "tar xvf - -C $REMOTE_PATH" >/dev/null 2>&1
4444

4545
# List all files after copying
4646
ssh $REMOTE_HOST "cd $REMOTE_PATH && \

0 commit comments

Comments
 (0)