Skip to main content

instantly sync data among home servers

Project description

Sync Servers

This is a lightweight server sync app designed for home servers. It instantly syncs changed files from one server to other servers, or perodically cron syncs.

A use case is to sync files to multiple servers without setting up cloud costly. This project is a component of my homeservers project, which leverage this to sync up my cam uploaded files to other servers.

Inotify is leveraged to monitor files changes, asynclcron is to run cron tasks, and rsync is to sync files.

A recursive_watch class, based on asyncinotify example and improved, is included to recursively monitor a folder tree.

setup dev env

# in vscode terminal:
python3 -m venv venv
## reopen vscode terminal, venv should show
pip install asyncinotify
pip install asynclcron

unit test

## run test
python3 -m unittest

## only run a package/file
python3 -m unittest tests.syncservers.test_recursive_watcher

rsyncd

sudo cp tests/rsyncd/rsyncd.conf /etc/
sudo rsync --daemon --no-detach

test rsync command

rsync -avh --no-p --mkpath --timeout=6 --contimeout=3 /storage/source/live rsync://127.0.0.1/live

packaging and publish

rm -rf dist
python3 -m build
python3 -m twine upload dist/*

run syncservers

# in root folder
python -m syncservers.app

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syncservers-1.0.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

syncservers-1.0.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file syncservers-1.0.0.tar.gz.

File metadata

  • Download URL: syncservers-1.0.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for syncservers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aa823e21d79ae41999976a0bbb970a26120df5bceb9de51f1daec89dda4871b3
MD5 e36810492f2943b51d6afc92181bdcd2
BLAKE2b-256 d7ee996a0d78cb3460b25a427ff67e47f742b2da5d802c4ee1e767ce379d1d1e

See more details on using hashes here.

File details

Details for the file syncservers-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: syncservers-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for syncservers-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8286757bf7555aa7fd258c6f9ca9b64b70db802b1b60661c80587d4d2d8c952
MD5 c3a33a77d133f02bb26300d8a9d1ffa1
BLAKE2b-256 eee2e8481d1de866c71ccfde646d8034b280eb036df3bc2dbc9602cbb9e15e27

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page