Skip to main content

rsyncr - An enhanced rsync backup wrapper script

Project description

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

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

rsyncr-2025.1121.2115.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rsyncr-2025.1121.2115-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file rsyncr-2025.1121.2115.tar.gz.

File metadata

  • Download URL: rsyncr-2025.1121.2115.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.8

File hashes

Hashes for rsyncr-2025.1121.2115.tar.gz
Algorithm Hash digest
SHA256 c2a0cb4771969374956a053f3beb3367963e57ef30ca3c32417a3f2cdae6583c
MD5 a8e7b4359c30bfa4429f8557da06b76e
BLAKE2b-256 605e37888b5893dd12a36496b7ca7ad1cba0bfd874f8ebb0441d1e3e883027cd

See more details on using hashes here.

File details

Details for the file rsyncr-2025.1121.2115-py3-none-any.whl.

File metadata

File hashes

Hashes for rsyncr-2025.1121.2115-py3-none-any.whl
Algorithm Hash digest
SHA256 8c9b74c9d817e2c8af1582404612cf34916505f608b9407a79eb82f35fe53130
MD5 ee9a54d20410e54d180eb8561b34a5c6
BLAKE2b-256 cacc9056e9210f026784e05346122381e4c653b14853ea3e3547204f71d9af6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page