- Shell 86.3%
- Nix 13.7%
| .envrc | ||
| .gitignore | ||
| autosync | ||
| flake.lock | ||
| flake.nix | ||
| package.nix | ||
| README.md | ||
| shell.nix | ||
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
rsyncinotify-toolsflock
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!