A wrapper around rsync to simplify continuous sychnronization of remote directories
Project description
==========
SuckleSync
==========
Sucklesync allows you to subscribe to one or more remote directories,
using rsync to synchronize the remote directories locally. It only
synchronizes directories that don't contain actively changing files.
This prevents synchronizing corrupt files and then re-synchronizing
them later when the remote changes are complete.
Sucklesync (currently) requires Python 2.
============
Installation
============
Run:
pip install sucklesync
Or:
sudo ./setup.py install
To configure sucklesync, save the configuration template to any of
the following paths, as preferred for your local configuration:
* /etc/sucklesync.cfg
* /usr/local/etc/sucklesync.cfg
* ~/.sucklesync.cfg
* ./sucklesync.cfg
=============
Configuration
=============
In /usr/local/etc/sucklesync.cfg or /etc/sucklesync.cfg define the
following sections. (Use template.sucklesync.cfg from this package
for a quick starting place.)
- [Sucklepaths]
Define one or more sucklepath pairs. Every pair requires a matching
source and destination, and numbers must be incremented sequentally.
Sucklesync currently requires the source to be remote, and the
destination to be local. For example:
[Sucklepaths]
source1 = /the/remote/path
destination1 = /the/local/path
source2 = /another/remote/path
destination2 = /another/local/path
- [Local]
Sucklesync needs to know the full path to rsync and ssh on your
local server. It also currently assumes the "-a --verbose" flags
on rsync, it is not recommended you change this or things will
very likely break.
By default, rsync will delete local files that don't exist on the
remote server. To disable this feature, set "delete = no".
[Local]
rsync = /usr/bin/rsync
rsync_flags = -a --delete
ssh = /usr/bin/ssh
ssh_flags = -C
delete = yes
- [Remote]
Sucklesync needs to know the full path to find on your remote
server. Don't change the find_flags unless you're certain your
new flags will work with Sucklesync's assumptions (learned through
reading the code). By default, it builds a list of directories
that have not been modified in the past 5 minutes, and syncs them
one at a time.
Key-based ssh access is currently required to the remote host
specified. The ssh_timeout is specified in seconds.
[Remote]
find = /usr/bin/find
find_flags = ! -mmin -5 -print
hostname = example.com
ssh_timeout = 5
- [Logging]
As Sucklesync runs as a daemon, it writes to a log and maintains a
pidfile to track the running process. Whatever user you run
sucklesync as will require read-write access to both files.
[Logging]
filename = /var/log/sucklesync/sucklesync.log
pidfile = /var/run/sucklesync.pid
level = WARNING
- [Email]
TBD: Not yet implemented.
[Email]
enabled = yes
; Email addresses can optionally include a human readable name, just addresses,
; or a combination. For example:
; NAME ONE | ADDRESS1, NAME TWO | ADDRESS2, ADDRESS3
to = User 1|user1@example.com, User 2|user2@example.com, user3@example.com
from = SuckleSync|sucklesync@example.com
smtp_hostname = example.com
smtp_port = 587
; Supported smtp modes are: default, ssl, tls
smtp_mode = tls
smtp_username = username
smtp_password = password
- [Frequency]
Sucklesync polls a remote server looking for new files to sync that haven't
changed recently. If it hasn't found new files recently, it polls less
frequently. If it has found new files recently, it polls more frequently.
It will poll at least minimum_poll_delay seconds for new files when it's
not actively syncing. If no new files are found, it will increment the
poll_delay by minimum_poll_delay until it reaches the maximum_poll_delay.
[Frequency]
minimum_poll_delay = 60
maximum_poll_delay = 900
SuckleSync
==========
Sucklesync allows you to subscribe to one or more remote directories,
using rsync to synchronize the remote directories locally. It only
synchronizes directories that don't contain actively changing files.
This prevents synchronizing corrupt files and then re-synchronizing
them later when the remote changes are complete.
Sucklesync (currently) requires Python 2.
============
Installation
============
Run:
pip install sucklesync
Or:
sudo ./setup.py install
To configure sucklesync, save the configuration template to any of
the following paths, as preferred for your local configuration:
* /etc/sucklesync.cfg
* /usr/local/etc/sucklesync.cfg
* ~/.sucklesync.cfg
* ./sucklesync.cfg
=============
Configuration
=============
In /usr/local/etc/sucklesync.cfg or /etc/sucklesync.cfg define the
following sections. (Use template.sucklesync.cfg from this package
for a quick starting place.)
- [Sucklepaths]
Define one or more sucklepath pairs. Every pair requires a matching
source and destination, and numbers must be incremented sequentally.
Sucklesync currently requires the source to be remote, and the
destination to be local. For example:
[Sucklepaths]
source1 = /the/remote/path
destination1 = /the/local/path
source2 = /another/remote/path
destination2 = /another/local/path
- [Local]
Sucklesync needs to know the full path to rsync and ssh on your
local server. It also currently assumes the "-a --verbose" flags
on rsync, it is not recommended you change this or things will
very likely break.
By default, rsync will delete local files that don't exist on the
remote server. To disable this feature, set "delete = no".
[Local]
rsync = /usr/bin/rsync
rsync_flags = -a --delete
ssh = /usr/bin/ssh
ssh_flags = -C
delete = yes
- [Remote]
Sucklesync needs to know the full path to find on your remote
server. Don't change the find_flags unless you're certain your
new flags will work with Sucklesync's assumptions (learned through
reading the code). By default, it builds a list of directories
that have not been modified in the past 5 minutes, and syncs them
one at a time.
Key-based ssh access is currently required to the remote host
specified. The ssh_timeout is specified in seconds.
[Remote]
find = /usr/bin/find
find_flags = ! -mmin -5 -print
hostname = example.com
ssh_timeout = 5
- [Logging]
As Sucklesync runs as a daemon, it writes to a log and maintains a
pidfile to track the running process. Whatever user you run
sucklesync as will require read-write access to both files.
[Logging]
filename = /var/log/sucklesync/sucklesync.log
pidfile = /var/run/sucklesync.pid
level = WARNING
- [Email]
TBD: Not yet implemented.
[Email]
enabled = yes
; Email addresses can optionally include a human readable name, just addresses,
; or a combination. For example:
; NAME ONE | ADDRESS1, NAME TWO | ADDRESS2, ADDRESS3
to = User 1|user1@example.com, User 2|user2@example.com, user3@example.com
from = SuckleSync|sucklesync@example.com
smtp_hostname = example.com
smtp_port = 587
; Supported smtp modes are: default, ssl, tls
smtp_mode = tls
smtp_username = username
smtp_password = password
- [Frequency]
Sucklesync polls a remote server looking for new files to sync that haven't
changed recently. If it hasn't found new files recently, it polls less
frequently. If it has found new files recently, it polls more frequently.
It will poll at least minimum_poll_delay seconds for new files when it's
not actively syncing. If no new files are found, it will increment the
poll_delay by minimum_poll_delay until it reaches the maximum_poll_delay.
[Frequency]
minimum_poll_delay = 60
maximum_poll_delay = 900
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sucklesync-0.3.8.tar.gz
(12.3 kB
view details)
File details
Details for the file sucklesync-0.3.8.tar.gz
.
File metadata
- Download URL: sucklesync-0.3.8.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8facaadb898885a28b1b6b6be1236402ddc4012f4ed060a6d3b150b8d67c0dd4 |
|
MD5 | 28de9aff8ad9d66bf97dd5b43d12152e |
|
BLAKE2b-256 | 27ce89227cc3ca7db940a38c5f82a5795b7e1eb246416b2e6d110fb5cbdd0b12 |