diff options
author | Dante Catalfamo | 2020-06-18 19:28:27 -0400 |
---|---|---|
committer | Dante Catalfamo | 2020-06-18 19:28:27 -0400 |
commit | fb6f627cb7940091ab0e981c6acf085e852a51ca (patch) | |
tree | eb956dca074c6cb9fbcfb49dbd95fe579c7f9174 | |
parent | b6bf28afd9016fc282d85992d37c9fc85cec7cd1 (diff) | |
download | blog-fb6f627cb7940091ab0e981c6acf085e852a51ca.tar.gz blog-fb6f627cb7940091ab0e981c6acf085e852a51ca.tar.bz2 blog-fb6f627cb7940091ab0e981c6acf085e852a51ca.zip |
Add --delete to rsync options
-rw-r--r-- | content/posts/how-this-blog-works.org | 4 | ||||
-rwxr-xr-x | deploy.sh | 2 |
2 files changed, 4 insertions, 2 deletions
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 @@ -4,4 +4,4 @@ set -e cd "$(dirname "$0")" git submodule update --init hugo -rsync -va --progress --rsync-path="/usr/bin/openrsync" public/ blog@lambda.cx:/var/www/htdocs/blog.lambda.cx/ +rsync -va --progress --delete --rsync-path="/usr/bin/openrsync" public/ blog@lambda.cx:/var/www/htdocs/blog.lambda.cx/ |