Skip to main content

Concurrent Sync

A concurrent sync tool which works similar to rsync. It supports syncing given sources with multiple targets concurrently.

Requirements

Python >= 3.8 is required. (CPython and PyPy are both supported)

Installation

Concurrent Sync can be either installed directly via pip:

pip install concurrent-sync

Or it can be installed from the source:

git clone https://github.com/simsekhalit/concurrent-sync.git
python3 -m pip install ./concurrent-sync

Manual

$ python3 -m csync --help
usage: csync [-h] [--max-memory MAX_MEMORY] [--target TARGET] SOURCE [SOURCE ...] TARGET

A concurrent sync tool which works similar to rsync. It supports syncing given sources with multiple targets concurrently.

positional arguments:
  SOURCE                specify source directories/files
  TARGET                specify target directory

optional arguments:
  -h, --help            show this help message and exit
  --max-memory MAX_MEMORY
                        specify allowed max memory usage as percent
  --target TARGET       specify additional target directories

For more information: https://github.com/simsekhalit/concurrent-sync

Concurrent Sync takes one or more source paths and one or more target paths as arguments. All the given source paths are synced with each given target path concurrently.

  • Only the missing or changed files are copied from source to target.
  • While checking if a file is changed, its modification time and size are used similar to rsync.
  • Trailing slash at the end of the source is interpreted in a similar way to rsync.


Following Examples section clarifies the working mechanics in a more clear way.

Examples

1. One source path and one target path are given

Source

/mnt/Source
/mnt/Source/File1
/mnt/Source/File2
/mnt/Source/Folder1
/mnt/Source/Folder2
/mnt/Source/Folder2/File3

Target

/mnt/Target

Following command is executed:

python3 -m csync /mnt/Source /mnt/Target

After the sync is completed, target becomes:

/mnt/Target
/mnt/Target/Source
/mnt/Target/Source/File1
/mnt/Target/Source/File2
/mnt/Target/Source/Folder1
/mnt/Target/Source/Folder2
/mnt/Target/Source/Folder2/File3

2. Two source paths and one target are given

Source 1

/mnt/Source1
/mnt/Source1/File1
/mnt/Source1/File2

Source 2

/mnt/Source2
/mnt/Source2/File3
/mnt/Source2/File4

Target

/mnt/Target

Following command is executed:

python3 -m csync /mnt/Source1 /mnt/Source2 /mnt/Target

After the sync is completed, target becomes:

/mnt/Target
/mnt/Target/Source1
/mnt/Target/Source1/File1
/mnt/Target/Source1/File2
/mnt/Target/Source2
/mnt/Target/Source2/File3
/mnt/Target/Source2/File4

3. Source with trailing slash and target are given

Source

/mnt/Source
/mnt/Source/File1
/mnt/Source/File2

Target

/mnt/Target

Following command is executed:

python3 -m csync /mnt/Source/ /mnt/Target

After the sync is completed, target becomes:

/mnt/Target
/mnt/Target/File1
/mnt/Target/File2

4. Source and target with common paths

While syncing subdirectories of source paths with target paths, redundant files/folders are removed.

Source

/mnt/Source
/mnt/Source/Folder
/mnt/Source/Folder/File1
/mnt/Source/Folder/File2

Target

/mnt/Target
/mnt/Target/Source
/mnt/Target/Source/Folder
/mnt/Target/Source/Folder/File3

Following command is executed:

python3 -m csync /mnt/Source /mnt/Target

After the sync is completed, target becomes:

/mnt/Target
/mnt/Target/Source
/mnt/Target/Source/Folder
/mnt/Target/Source/Folder/File1
/mnt/Target/Source/Folder/File2

Since File3 is no longer in the source path it's deleted from the target as well.

5. One source path and two target paths are given

Source

/mnt/Source
/mnt/Source/File1
/mnt/Source/File2

Target 1

/mnt/Target1

Target 2

/mnt/Target2

Following command is executed:

python3 -m csync /mnt/Source /mnt/Target1 --target /mnt/Target2

After the sync is completed, targets become:

Target 1

/mnt/Target1
/mnt/Target1/Source
/mnt/Target1/Source/File1
/mnt/Target1/Source/File2

Target 2

/mnt/Target2
/mnt/Target2/Source
/mnt/Target2/Source/File1
/mnt/Target2/Source/File2

Metadata

Release files for concurrent-sync 1.0.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 concurrent-sync 1.0.0
File Size Uploaded
concurrent-sync-1.0.0.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for concurrent-sync 1.0.0
File Interpreter ABI Platform
concurrent_sync-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / concurrent-sync-1.0.0.tar.gz

Download URL concurrent-sync-1.0.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ba4e0c6e008021d9e501b1ae3164c7976c67cb648b4f041faa53892f3b5f1f9e
BLAKE2b-256 checksum
How to use checksums
0ca813459da542688a1d741ce4dd1d25b96c501f1ac477fabf6eca211e032f97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / concurrent_sync-1.0.0-py3-none-any.whl

Download URL concurrent_sync-1.0.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
281ed2444733454d1334e4e762f77d191587cb2fa0d1fd247126edcea0b4ebfd
BLAKE2b-256 checksum
How to use checksums
5439c78d8950e3c39d74572dbabd9b22108ebea77bb06a716656374378459d1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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