From fb6f627cb7940091ab0e981c6acf085e852a51ca Mon Sep 17 00:00:00 2001 From: Dante Catalfamo Date: Thu, 18 Jun 2020 19:28:27 -0400 Subject: Add --delete to rsync options --- content/posts/how-this-blog-works.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'content/posts') diff --git a/content/posts/how-this-blog-works.org b/content/posts/how-this-blog-works.org index 087c1ed..80fa1ca 100644 --- a/content/posts/how-this-blog-works.org +++ b/content/posts/how-this-blog-works.org @@ -199,7 +199,7 @@ it works. cd '$(dirname "$0")' hugo - rsync -va --progress --rsync-path="/usr/bin/openrsync" public/ blog@lambda.cx:/var/www/htdocs/lambda.cx/blog + rsync -va --progress --delete --rsync-path="/usr/bin/openrsync" public/ blog@lambda.cx:/var/www/htdocs/lambda.cx/blog #+END_SRC Going through it line by line: @@ -219,6 +219,8 @@ it works. - =-a= Stands for "archive": copy recursively, keep permissions, etc. See the =rsync= man page if you're curious. - =--progress= Show progress, also optional + - =--delete= Removed files on the server that no longer exist on + the client - ~--rsync-path="/usr/bin/openrsync"~ This line is very important for OpenBSD servers. OpenBSD has its own =rsync= implementation called =openrsync=. Without this argument, =rsync= will connect -- cgit v1.2.3