Hacker News new | ask | show | jobs
by spatular 2731 days ago
In that setup entr only watches files that existed when systemd service was first started. So new files won't trigger backup. Something like this should work:

while true; do find $ORG_DIR | entr -d -r rclone sync -v $ORG_DIR $REMOTE:org; done

1 comments

That's constantly polling the filesystem, isn't it?

I've never used it myself, but I know systemd has file watching built in. I think using `PathModified=/path/to/org` would also eliminate the need for entr [1].

[1] https://www.freedesktop.org/software/systemd/man/systemd.pat...

It should re-poll only when a new file is added. In op's usage scenario it won't be very ofthen.

The systemd solution may be even better, though it seems there is no way to ignore changes in temporary files that emacs likes to create.