-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tools for resumable transfers #10
Labels
Comments
Consider using BUP: https://github.com/bup/bup |
Syrep is testedtest-syrep.sh: #!/bin/bash
#set -x
#info(){ unused(){ :; } }
info(){ echo $@; }
mk_test_file(){
dd if=/dev/urandom of=$1 bs=256 count=100000 2> /dev/null
}
compare_folders(){
info "Compare folders"
diff ./x ./y -r --exclude=".syrep"
}
info "Preparing test environment"
rm -r ./x ./y patch-for-x patch-for-y 2> /dev/null
mkdir -p x
mkdir -p y
mk_test_file ./x/file1
mk_test_file ./y/file2
compare_folders
sync_folders(){
info "Syncing folders..."
info "------------------"
info "Update repos"
syrep -p --update ./x
syrep -p --update ./y
info "Create patches"
syrep -p -o patch-for-y --makepatch ./x ./y/.syrep/current.syrep
ls -lh patch-for-y
syrep -p -o patch-for-x --makepatch ./y ./x/.syrep/current.syrep
ls -lh patch-for-x
info "Apply patches"
syrep -pT --merge patch-for-y ./y
syrep -pT --merge patch-for-x ./x
compare_folders
}
info "See how Syrep handles empty files and folders (expected no diff)"
mkdir ./x/a
sync_folders || { info "ERROR: Can not handle!"; rmdir ./x/a; }
info "See how Syrep handles renames (expected only a few bytes of patch file)"
mv ./x/file{1,4}
sync_folders
if true; then
info 'See how Syrep handles small modifications (expected a 10M patch)'
dd if=/dev/urandom bs=10M count=1 >> ./x/file1
sync_folders
fi Output:
ConclusionsApproach of Syrep can be used under the hood of a new tool, however, Syrep is not a correct tool for a general purpose file backup tasks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
On a mostly filled disk state (say %80 in use) there are some edge cases that breaks the "cache" and forces users to send everything as a whole:
Proposal
If a snapshot has to be sent as a whole (when sending diffs is not an option),
rsync
should be used instead ofbtrfs send | btrfs receive
.This boils down to the point: A snapshot has to be constructed manually
Resources
The text was updated successfully, but these errors were encountered: