Giter Club home page Giter Club logo

blocksync's Introduction

About

This script is used to synchronize (large) files to a local/remote destination using a incremental algorithm. Devices are used as regular files and can be synchronized, too.

blocksync.py is also 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
  • Synchronize large files to a (remote) destination using a fast and efficent algorithm

Requirements

  • SSH client on source server
  • SSH server on destination server, with root permissions (directly using root login or using sudo) if syncing to a device file
  • Python on both source and destination server
  • blocksync.py in home directory of destination server (executable)

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.

Synchronize to a file on remote server

root@source# python blocksync.py /dev/source/file [email protected] /path/to/destination/file

Synchronize to a local file

root@source# python blocksync.py /dev/source/file localhost /path/to/destination/file

Command line options

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

Contributing

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

blocksync's People

Contributors

ct16k avatar theraser avatar klemens-u avatar florianheigl avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.