Skip to main content

A wrapper around rsync to simplify continuous sychnronization of remote directories

Project description

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.

pip install sucklesync

sudo ./ 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

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:

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".

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.

find = /usr/bin/find
find_flags = ! -mmin -5 -print
hostname =
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.

filename = /var/log/sucklesync/sucklesync.log
pidfile = /var/run/
level = WARNING

- [Email]

TBD: Not yet implemented.

enabled = yes
; Email addresses can optionally include a human readable name, just addresses,
; or a combination. For example:
to = User 1|, User 2|,
from = SuckleSync|
smtp_hostname =
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.

minimum_poll_delay = 60
maximum_poll_delay = 900

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

sucklesync-0.3.8.tar.gz (12.3 kB view hashes)

Uploaded source

Supported by

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