From: Sergey Matveev Date: Sun, 20 Sep 2015 16:58:43 +0000 (+0300) Subject: Fixed valid markdown README X-Git-Tag: v0.1.0~11 X-Git-Url: http://www.git.stargrave.org/?p=syncer.git;a=commitdiff_plain;h=8922dd9fc8ba78ed7a83db70e46e04d43d7b2d6f Fixed valid markdown README --- diff --git a/README.md b/README.md index c3ff63e..0173c01 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ -syncer -====== +# syncer Fast stateful file/disk data syncer. -#### Description +## Description The main purpose of this utility is fast data synchronization between two hard drives: one is fast (SSD, SATA HDD), another is connected @@ -13,21 +12,17 @@ be transferred. This utility is stateful: it keeps precomputed data hashes in separate statefile and uses it to determine if we need to update block of data. -``` -# sync from very fast SSD to slow USB connected HDD -% ./syncer -src /dev/ada0 -dst /dev/da0 -state state.bin -[%%%%%%] -# all blocks were transferred to da0 -``` + # sync from very fast SSD to slow USB connected HDD + % ./syncer -src /dev/ada0 -dst /dev/da0 -state state.bin + [%%%%%%] + # all blocks were transferred to da0 Now we have statefile containing cryptographic hashes of the blocks from source and copy of all read data in destination. Now if we run it again: -``` -% ./syncer -src /dev/ada0 -dst /dev/da0 -state state.bin -[....%.] -# only one block was transferred to da0 -``` + % ./syncer -src /dev/ada0 -dst /dev/da0 -state state.bin + [....%.] + # only one block was transferred to da0 Only one modified block was transferred during this session. We read all data from source again, compute hashes and understand what was updated @@ -41,19 +36,18 @@ writes are sequential. syncer is free software: see the file COPYING for copying conditions. -### Installation +## Installation -``` -% go get github.com/dchest/blake2b -% go build -# syncer executable file should be in current directory -``` + % go get github.com/dchest/blake2b + % go build + # syncer executable file should be in current directory -### Statefile Format +## Statefile Format -`SRC_SIZE || BLK_SIZE || HASH0 || HASH1 || ...` + SRC_SIZE || BLK_SIZE || HASH0 || HASH1 || ... -SRC_SIZE contains size of the source, when it was initially read. BLK_SIZE -is the blocksize used. Both are 64-bit big-endian unsigned integers. If -either size or blocksize differs, then syncer will deny using that -statefile as a precaution. HASHx is BLAKE2b-512 hash output, 64 bytes. +`SRC_SIZE` contains size of the source, when it was initially read. +`BLK_SIZE` is the blocksize used. Both are 64-bit big-endian unsigned +integers. If either size or blocksize differs, then syncer will deny +using that statefile as a precaution. `HASHx` is BLAKE2b-512 hash +output, 64 bytes.