Skip to content
/ syncr Public
forked from szilu/syncr

Fast deduplicating filesystem synchronizer

License

Notifications You must be signed in to change notification settings

n3ko/syncr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SyncR - Fast deduplicating filesystem synchronizer

WARNING

THIS IS A WORK IN PROGRESS! It's also my first attempt to create something in Rust.

USE AT YOUR OWN RISK!

I am not responsible, if it destroys your data, eats your breakfast or kills your penguin!

Description

SyncR is (or will be) an awesome file system synchronization tool for UNIX OS-es.

Some if it's planned features:

  • Lightweight, single binary distribution (a statically linked < 1.5MB MUSL binary can be compiled)
  • Content determined chunking with data deduplication (not just in single files, but in the whole directory structure, so it handles renames efficiently)
  • Syncing over SSH connection (it supports multiple remote directories)
  • Multi-destination sync: SyncR supports n-way syncing of directories (where in theory n > 100)

The coolest thing: It is possible to run SyncR on a workstation and run n-way synchronization on several servers without a local instance of the synchronized directory.

Installation

git clone https://github.com/szilu/syncr.git
cd syncr
cargo build --release

on the search compilation put the binary (target/release/syncr) to your hosts (it must be on the search PATH to work!).

Basic usage

syncr sync ./dir1 ./dir2 remote1:dir remote2.example.com:dir [...]

Why

I have been using Unison for synchronizing files for years. However, I have always hated it's compatibility issues. It's not enough that Unison can't communicate between different versions of itself, but there can be issues with the same version, if they are not compiled with the same OCaml version.

This makes it practically unusable if you want to synchronize between several hosts.

I have looked for other solutions, but I couldn't find a lightweight one, so I decided it will be a good project to learn Rust.

The architecture and the remote protocol makes it possible to implement other useful filesystem tools on top of it. One example can be a deduplicating backup utility.

Current state, TODO

Priorities: H: High, M: Medium, L: Low

  • Directory analyzing
    • Metadata and chunk cache to speed up scanning (M)
  • Chunking
  • Diff algorithms
    • Latest file
    • State cache, with interactive conflict resolution (H)
  • Locally available chunk resolution
  • Chunk transfer
  • File write
  • Directory structure creation (H)
  • Metadata
    • File mode (permissions)
    • Ownership (L)
    • ...
  • n-way sync support
  • Remote directory support (SSH)
  • Error handling (H)
  • Configuration
    • Include / exclude lists (H)
    • Selecting diff algorithm (H)
    • Run in batch mode (M)
    • Verbose / Silent / Progress / Debug (L)
    • Metadata masks / overrides (permissions, user/group) (L)
    • Store archive metadata on master host / master all hosts (L)
    • Remote shell command (L)

As you can see, my first goal was to make the concept work. And it seems to work pretty well. But some basic things are still missing (for example directory creation and proper error handling is very essential).

About

Fast deduplicating filesystem synchronizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.5%
  • Shell 0.5%