Skip to main content

Introduction

I created rzn because I'm used to running git push / pull for synchronizing my files. But for some use cases, like synchronizing my pictures / music etc, git would be an overkill in used storage and speed.

Rzn leverages rsync or rclone to synchronize your files. It searches for the configuration file .rzn in the current or parent directories like git so you can run rzn push / pull from any (sub)directory.

Install

$ pip install git+https://github.com/meeuw/rzn

or download rzn.py and place it in your path.

Usage

You can use the --backup argument of rsync / rclone to make sure rzn never overrides / deletes your files. You're free to use any directory but I use the following directory structure (local and remote):

$ find bluh
bluh/current/file1
bluh/current/dir1/file1
bluh/2019-03-03T07:31:09.015242/dir1/file1
bluh/2019-03-04T09:10:08.023142/file2

As rzn doesn't do any versioning you'll have to be really cautious with cleaning your backups. As rsync also synchronizes your timestamps a tool like fdupes might be usefull to cleanup duplicate files. Before removing changed files I'd recommend to always compare the current and backupped files.

You can use sparsefilters to generate --filter arguments for rsync for sparse synchronisation. Sparse filters make it possible to only synchronize specific files / directories with a remote location.

The only required configuation item in the [main] section is remote. The local location of the synchronisation arguments is determined by the location of your .rzn file.

Sample .rzn file:

[main]
remote = /home/meeuw/tmp/remote
append = /current/
sparsefilters =
   /bluh
   /dir***
args = -Pa
  --backup
  --backup-dir={target}../{datetimeisoformat}
  --delete
  --delete-excluded

I recommend to always run rzn pull before making any changes to your files and rzn push as soon as possible.

$ rzn pull

$ vi file1

$ rzn push

FAQ

Q: Why isn't the file which I've pushed shared anymore?

A: When using rclone you might not want to use a remote backup directory if your files are shared with other users, if you push changes to an existing file it will be replaced and your shared file will be moved to the backup directory. As (most) cloud remotes have their own versioning / recycle bin you don't need a backup dir. You can use the configuration item pull_args to use the --backup-dir argument only for your local files.

Q: Why should I use this tool instead of using automatic synchronisation?

A: Rzn gives you full control about when and how your files are synchronized.

Q: I've found a bug or limitation of rzn

A: Use the issue tracker (on GitHub) to report your issue and if you can, fix it yourself and submit a pull request.

Metadata

Release files for rzn 0.4.0

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

Source distribution (sdist)

Source distribution for rzn 0.4.0
File Size Uploaded Provenance
rzn-0.4.0.tar.gz 3.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.4 kB

Release files / rzn-0.4.0.tar.gz

Download URL rzn-0.4.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
284b6a1d56df6b77d6a176269be2d0382dccf372856fbec0c7ec2d2348629fcd
BLAKE2b-256 checksum
How to use checksums
792a469e5716459aaf989719c8d4cb0722634b069edfef13058d4b201c914a10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.8 Linux/6.0.11-300.fc37.x86_64

Release files / rzn-0.4.0-py3-none-any.whl

Download URL rzn-0.4.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a30de3a2e5444bc0cf45a4be243a793267f5001404f67be61f00bdfe50ef567
BLAKE2b-256 checksum
How to use checksums
e6ee6b165ea2435e42414922b16a6b684b2c1178fc582b7f7474e0c1397e75e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.8 Linux/6.0.11-300.fc37.x86_64

Security for rzn 0.4.0

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