Skip to main content

rsyncr

GPLv3 logo

Awesome useful rsync convenience wrapper for Python 3. Does the heavy lifting of finding potential problems, plus detects potential moves.

We recommend using PyPy, which appears to operate order(s) of magnitude faster during the (inefficient) file tree computations.

Installation

pip install rsyncr

This includes the following dependencies: typing_extensions, textdistance, but would also make use of fuzzywuzzy, StringDist, brew-distance, edit-distance, editdistance-s or editdistance if installed.

Usage

rsyncr always operates on the current folder. You only specify the target folder (plus options).

rsyncr <target-path> [options]

with options:

rsyncr  (C) Arne Bachmann 2017-2024
    This rsync-wrapper simplifies backing up the current directory tree.

    Syntax:  rsyncr <target-path> [options]

    target-path is either a local folder /path or Drive:\path  or a remote path [rsync://][user@]host:/path
      using Drive:    -  use the drive's current folder (Windows only)
      using Drive:\~  -  use full source path on target drive

    Copy mode options (default: update):
      --add                -a  Immediately copy only additional files (otherwise add, and update modified)
      --sync               -s  Remove files in target if removed in source, including empty folders
      --del                -d  Only remove files, do not add nor update
      --simulate           -n  Don't actually sync, stop after simulation
      --estimate               Estimate copy speed
      --file <file path>       Transfer a single local file instead of synchronizing a folder
      --user <user name>   -u  Manual remote user name specification, unless using user@host notation
      --skip-move              Do not compute potential moves

    Interactive options:
      --ask                -i  In case of dangerous operation, ask user interactively
      --force-foldername   -f  Sync even if target folder name differs
      --force              -y  Sync even if deletions or moved files have been detected
      --force-copy             Force writing over existing files

    Generic options:
      --flat       -1  Don't recurse into sub folders, only operate on current folder
      --checksum   -C  Full file comparison using checksums
      --compress   -c  Compress data during transport, handle many files better
      --verbose    -v  Show more output
      --help       -h  Show this information

    Special options:
      --with-checksums  corrupDetect compatibility: if set, .corrupdetect files are not ignored

Build process

  1. Update the version in pyproject.toml
hatch clean && hatch build -t wheel
hatch publish dist\*.whl

rsync details

rsync status output explanation:

Source: https://stackoverflow.com/questions/4493525/rsync-what-means-the-f-on-rsync-logs
1: > received,  . unchanged or modified (cf. below), c local change, * message, e.g. deleted, h hardlink, * = message following (no path)
2: f file, d directory, L symlink, D device, S special
3: c checksum of orther change
4: s size change
5: t time change
6: p permission
7: o owner
8: g group
9: u future
10: a ACL (not available on all systems)
11: x extended attributes (as above)

rsync options

https://linux.die.net/man/1/rsync

-r  --recursive  recursive
-R  --relative   preserves full path
-u  --update     skip files newer in target (to avoid unnecessary write operations)
-i  --itemize-changes  Show results (itemize - necessary to allow parsing)
-t  --times            keep timestamps
-S  --sparse           sparse files handling
-b  --backup           make backups using the "~~" suffix (into folder hierarchy), use --backup-dir and --suffix to modify base backup dir and backup suffix. A second sync will remove backups as well!
-h  --human-readable   ...
-c  --checksum         compute checksum, don't use name, time and size
--stats                show traffic stats
--existing             only update files already there
--ignore-existing      stronger than -u: don't copy existing files, even if older than in source
--prune-empty-dirs     on target, if updating
-z, --compress --compress-level=9

Metadata

Release files for rsyncr 2025.1121.2115

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rsyncr 2025.1121.2115
File Size Uploaded Provenance Actions
rsyncr-2025.1121.2115.tar.gz 27.3 kB Without provenance Details for rsyncr-2025.1121.2115.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rsyncr 2025.1121.2115
File Interpreter ABI Platform Actions
rsyncr-2025.1121.2115-py3-none-any.whl Python 3 none any Details for rsyncr-2025.1121.2115-py3-none-any.whl

Total release size: 56.3 kB

Release files / rsyncr-2025.1121.2115.tar.gz

Download URL rsyncr-2025.1121.2115.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c2a0cb4771969374956a053f3beb3367963e57ef30ca3c32417a3f2cdae6583c
BLAKE2b-256 checksum
How to use checksums
605e37888b5893dd12a36496b7ca7ad1cba0bfd874f8ebb0441d1e3e883027cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.8

Release files / rsyncr-2025.1121.2115-py3-none-any.whl

Download URL rsyncr-2025.1121.2115-py3-none-any.whl
Size 29.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c9b74c9d817e2c8af1582404612cf34916505f608b9407a79eb82f35fe53130
BLAKE2b-256 checksum
How to use checksums
cacc9056e9210f026784e05346122381e4c653b14853ea3e3547204f71d9af6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.8

Security for rsyncr 2025.1121.2115

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page