No description
  • Shell 86.3%
  • Nix 13.7%
Find a file
2026-06-23 05:57:06 -04:00
.envrc dev: set up dev environment 2026-06-20 01:05:13 -04:00
.gitignore dev: set up dev environment 2026-06-20 01:05:13 -04:00
autosync fix: properly initialize conditional variable 2026-06-23 05:57:06 -04:00
flake.lock dev: set up dev environment 2026-06-20 01:05:13 -04:00
flake.nix refactor(nix): factor out package call into systemLocal 2026-06-22 02:06:44 -04:00
package.nix fix: better display the output of rsync 2026-06-23 04:56:06 -04:00
README.md docs: add README 2026-06-21 06:59:47 -04:00
shell.nix dev: add bash debugger to dev shell 2026-06-23 03:44:56 -04:00

Autosync

A simple script that automatically syncs the contents of a directory with a remote server using rsync.

This is intended to serve as a simpler and more convenient replacement for putting the files into a large version-control system like Git. It automatically watches the specified directories for changes and schedules uploads for modified files.

It can also be used to sync a directory between multiple clients if installed on each system.

Requirements

This script is intended to be run with Bash 4.3+ in modern Linux; trying to run it on any other OS or with an older shell will likely fail.

Aside from basic Linux shell utilities, this script depends on:

  • OpenSSH
  • rsync
  • inotify-tools
  • flock

The remote server must also have rsync installed to receive file transfers, but nothing else is required. This script operates entirely client-side.

Usage

This script should be run as a daemon on startup. This can be done by any number of methods, but the ideal way is through a systemd service, as its process group management allows for better cleanup if the script crashes.

Configuration

Coming soon!