1.2 KiB
CloneTool
i need a clone-tool.
it should be run from a single binary without any dependencies (maybe on go?). it should be able to clone a big file or a block device from one computer to another or on the same compuser from one device to another. it should compare blocks and if they differ, copy it from source to destination. to prevent double reading, keep the blocks in memory until diff was checked. i want to start it from one computer which is the manager of the copy process, source and destination can be other computers. blocks should be copied directly from source to destination. i dont want to have any dependencies. it is allowed to use ssh and dd if nessesary. maybe it makes sense to use a copy job name and track block hashes in some file to compare them without reading from destination (which must not be changed between syncs) i want to be able to run the sync multiple time in one job. if source is smaller than target, stop after end of source if destination is a device. if destination is a file, truncate it to the size of source
first try to connect from source to destination, of not possible, try to connect from destination to source. transfer all data via ssh