Python based CLI Remote Syncing Daemon service.
Project description
RSyncDaemon
Python based CLI Remote Syncing Daemon service.
Features
- Real time Remote syncing
- Used secure shell session for data transfer
- Configurable with custom config
Installation
pip install rsyncdaemon
Configuration
configuration file present at ~/.rsyncdaemon/rsyncdaemon.conf.
- please create configuration file if not present.
- replace values with correct values
- remove configs that does not require
default configuration:
[SyncConfig]
local_dir = ""
remote_dir = ""
ssh_host = "localhost"
ssh_port = 22
ssh_username = "jackson"
ssh_password = ""
ssh_private_key_path = ""
rsync_command = "rsync"
rsync_options = [ "-az", "--delete",]
exclude_patterns = []
[LogConfig]
log_file_path = "/home/jackson/.rsyncdaemon/rsyncdaemon.log"
log_max_size = 10485760
log_backup_count = 5
minimum configuration:
[SyncConfig]
local_dir = ""
remote_dir = ""
ssh_host = "localhost"
ssh_port = 22
ssh_username = "jackson"
ssh_password = ""
ssh_private_key_path = ""
NOTE:
- Remember to remove one of the option either
ssh_passwordorssh_private_key_path - configuration supports toml file type/format, i.e. it supports list/object inside config file
Usage
with Default config file
rsyncdaemon
with Custom config file
rsyncdaemon -c <config file path>
eg: rsyncdaemon -c ~/Documents/rsyncdaemon_custom_config.conf
Help
rsyncdaemon -h
Version
rsyncdaemon -v
Use as a system service
NOTE: Required sudo permission
# install Package
sudo pip install rsyncdaemon
# Create rsyncdaemon home directory somewhere. for eg /tmp/rsyncdaemon/
mkdir /tmp/rsyncdaemon/
# create config file at /tmp/rsyncdaemon/rsyncdaemon.conf inside rsyncdaemon home directory created above
[SyncConfig]
local_dir = ""
remote_dir = ""
ssh_host = "localhost"
ssh_port = 22
ssh_username = ""
ssh_password = ""
ssh_private_key_path = ""
rsync_command = "rsync"
rsync_options = [ "-az", "--delete",]
exclude_patterns = []
[LogConfig]
log_file_path = "/var/log/rsyncdaemon.log"
log_max_size = 10485760
log_backup_count = 5
# replace with correct values
# create service file at /etc/systemd/system/rsyncdaemon.service with following content
[Unit]
Description=RSync daemon Service
After=network.target
[Service]
User=root
Group=root
ExecStart=/usr/bin/rsyncdaemon -c /tmp/rsyncdaemon/rsyncdaemon.conf
Restart=always
[Install]
WantedBy=multi-user.target
# Reloading Change to Systemd Unit Files
sudo systemctl daemon-reload
# Start service
sudo systemctl start rsyncdaemon
# Enable service to start on boot
sudo systemctl enable rsyncdaemon
# check status
sudo systemctl status rsyncdaemon
# check logs
sudo tail -f /var/log/rsyncdaemon.log
# To stop service
sudo systemctl stop rsyncdaemon
# To remove service
sudo systemctl disable rsyncdaemon
sudo rm /etc/systemd/system/rsyncdaemon.service
Uninstall
pip uninstall rsyncdaemon
Who do I talk to?
- Repo owner or admin
- Other community or team contact
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
rsyncdaemon-0.0.1.tar.gz
(43.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rsyncdaemon-0.0.1.tar.gz.
File metadata
- Download URL: rsyncdaemon-0.0.1.tar.gz
- Upload date:
- Size: 43.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99e23fd01c21099827eef74020f6de239fa8907b3b047a83544b2688fbf25f91
|
|
| MD5 |
a1ee7c3a70fb7a4f8a096493f1fac7e9
|
|
| BLAKE2b-256 |
e678644d251f68635787dff4d58762eb5dd75fbcdf2425ab0fb0f4332c3f233e
|
File details
Details for the file rsyncdaemon-0.0.1-py3-none-any.whl.
File metadata
- Download URL: rsyncdaemon-0.0.1-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50d06c284815c7e3012107c6007c9d9cb5ccfb41b0a4fc325a6b7637e133adbb
|
|
| MD5 |
1c3b04fae67b6b1dc13aa877ddab8e14
|
|
| BLAKE2b-256 |
719e39623a31710eb10ed1743070baa9ea9bf74a827e654f05e5ddd322ba1f62
|