test007 - dedup - deduplicating backup program
HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
test007 (487B)
---
1 #!/bin/sh
2 set -ex
3
4 SHA1SUM=${SHA1SUM:-sha1sum}
5
6 repo=`mktemp -u`
7 data=`mktemp`
8 dd if=/dev/urandom of="$data" bs=1M count=64
9 ./dup-init -Z lz4 "$repo"
10 ./dup-pack -r "$repo" snap0 < "$data"
11 ./dup-pack -r "$repo" snap1 < "$data"
12 du -sh "$repo"
13 sum0=`$SHA1SUM < "$data" | awk '{print $1}'`
14 sum1=`./dup-unpack -r "$repo" snap0 | $SHA1SUM | awk '{print $1}'`
15 sum2=`./dup-unpack -r "$repo" snap1 | $SHA1SUM | awk '{print $1}'`
16 [ "$sum0" = "$sum1" ]
17 [ "$sum0" = "$sum2" ]
18 rm -rf "$repo" "$data"