A simple backup/sync tool with rsync
Project description
pysync
pysync is a simple backup/sync tool with python & rsync.
Installation
$ pip install 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
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
itm.pysync-0.0.3.tar.gz
(12.0 kB
view hashes)
Built Distribution
Close
Hashes for itm.pysync-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7409bba19781fde7f4ffeaea197988ec20fc0458ad203eb8716395572b9bee68 |
|
MD5 | 0074da720d136adce64f831c880ef54f |
|
BLAKE2b-256 | 70eb5ffdbd3886bf2996894f725a97e5ebd7d765e58967f3a12c2f1616627222 |