Skip to content

yveskretzschmar/blocksync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

About

This script is a workaround for a limitation when using rsync: rsync is unable to synchronize a device using its incremental algorithm. blocksync.py is able to sync a device file bit by bit to a remote SSH destination. When called multiple times it will only copy those blocks which were modified - this will speed up the copy process and save a lot of bandwidth.

Use cases

  • Moving physical machines to virtual ones (p2v)
  • Backup failed machines' hard drives

Requirements

  • SSH client on source server
  • SSH server on destination server
  • Python on both source and destination server

Usage

Please make sure that the source file isn't changed during sync, blocksync.py will not notice any changes made at file positions which were already copied. You may want to boot a live linux (grml, knoppix, systemrescuecd etc.) if you want to sync the system drives from a running machine.

root@source# python blocksync.py /dev/$FOOBAR destination.example.com /path/to/destination/file

Command line options

Please run python blocksync.py without any arguments to get a full list of possible options.

Future development

When there is some spare time the following things should get some attention:

  • write some documentation
  • Allow sync not only for devices but also for files
  • Allow sync to local file to be more flexible

Contributing

Please feel free to leave a bug report here at Github or drop a pull request - every help is welcome!

About

Block device sync between remote hosts. Based off http://www.bouncybouncy.net/programs/blocksync.py

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%