A simple backup/sync tool with rsync
Project description
pysync
pysync is a simple backup/sync tool with python & rsync.
Installation
$ pip install itm.pysync
Usage
Create pysync.json file in ~/.config/pysync.json or ~/pysync.json.
Here is an example of pysync.json.
{
// Set rsync options (default: -a -v -h)
"rsync_options": ["-a", "-v", "-h", "--delete", "--iconv=UTF-8-MAC,UTF-8"],
// Define rsync filters
"filters": {
"git": ["-C", "--filter", ":- .gitignore"]
},
// Set global exclusions to exclude files and directories in all backup sources
"global_exclusions": [".DS_Store"],
// Set destination directory path
"destination": "/Volumes/HDD/backup",
// Set backup sources
"sources": [
{
"path": "/Users/whoami/Documents"
},
{
"path": "/Users/whoami/Pictures",
"exclusions": ["*.photoslibrary", "secrets/"] // Specify exclusion patterns to exclude in the source
},
{
"path": "/Users/whoami/Programs",
"filter": "git" // Use filter in the source
}
]
}
Run pysync.
$ pysync
Command Line Options
| Option | Feature |
|---|---|
| -c, --config-file | Indicate config file path (e.x. pysync -c ~/hoge/pysync.json) |
| -h, --help | Show help |
| --version | Show version |
License
MIT License
Testing
Test with pytest.
$ pytest
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
itm_pysync-1.0.2.tar.gz
(5.6 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 itm_pysync-1.0.2.tar.gz.
File metadata
- Download URL: itm_pysync-1.0.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d2081ca711fe11be4a191b79907ff2e3a197fd74d66ef908fac448a7871aa8b
|
|
| MD5 |
ef4b6e91180d78889f6c5e22d969c680
|
|
| BLAKE2b-256 |
33d009c13d5f8eba9ac503ea65ab8d5c3b114922db1e710864257cc670a82b13
|
File details
Details for the file itm.pysync-1.0.2-py3-none-any.whl.
File metadata
- Download URL: itm.pysync-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95b3e6ed51e347e94bdcb7c4da1991777fa2325b00f27232f66f104e3bc8f96c
|
|
| MD5 |
8383977ab394bc80c7f0db1888ff8754
|
|
| BLAKE2b-256 |
80d8c8f30a3f91250e1d255a9007ad27753527aa51c2d057be586e379db9d73f
|