Skip to content

Instantly share code, notes, and snippets.

@vans163
Created June 29, 2019 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vans163/b08c9cff62e9f4cf7e82154649afb5b0 to your computer and use it in GitHub Desktop.
Save vans163/b08c9cff62e9f4cf7e82154649afb5b0 to your computer and use it in GitHub Desktop.
using lsyncd instead of sshfs
git clone https://github.com/axkibe/lsyncd
apt-get install cmake liblua5.3-dev lua5.3
git apply << EOF
diff --git a/default-rsync.lua b/default-rsync.lua
index 106c58d..8157c26 100644
--- a/default-rsync.lua
+++ b/default-rsync.lua
@@ -669,7 +669,7 @@ end
--
-- By default do deletes.
--
-rsync.delete = true
+rsync.delete = false
--
-- Rsyncd exitcodes
EOF
cmake . && make
make install
lsyncd -nodaemon -insist -delay 0 -rsyncssh /localdir root@remote /remotedir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment