Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perfecto25/isync
real time rsync service
https://github.com/perfecto25/isync
Last synced: 7 days ago
JSON representation
real time rsync service
- Host: GitHub
- URL: https://github.com/perfecto25/isync
- Owner: perfecto25
- Created: 2021-07-14T18:39:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-10T15:15:13.000Z (7 months ago)
- Last Synced: 2024-04-10T17:57:22.492Z (7 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ISYNC
INotify-based instant rsync
## Installation
install using virtual env
cd /opt
# git clone this repo
cd /opt/isync
python3 -m venv venv
source venv/bin/activate
(venv) pip install -r requirements.txtconfigure systemd startup script
cp isync.service /etc/systemd/system/
systemctl daemon-reload## Configuration
open config.py and modify "paths" variable
include any folder paths you want to monitor for changes (Create, Modify, Delete)
once iSync detects a change, it will rsync the file over to the "remote" server thats defined by "remote" variable
## Start / Stop Isync
systemctl start isync
systemctl stop isync## Logging
you can tail the rsync logs in isync directory
cd /opt/isync
tail -f isync.log## SSH Sockets
To reduce number of SSH handshakes due to constant rsyncing between Local and Remote, enable SSH sockets on the local isntance
mkdir /home/user/.ssh/sockets
vim /home/user/.ssh/configHost
TCPKeepAlive yes
ServerAliveInterval 120
Compression yes
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h:%p
ControlPersist yes
ControlPersist 480mchmod 600 /home/user/.ssh/config
chmod 770 /home/user/.ssh/sockets