Rsync - rsync (File syncing) in golang

Go rsync

Minimal file syncing based on the rsync algorithm completely written in Go.

Example

Push:

:1234") if err != nil { log.Fatalf("error creating connection:", err.Error()) } defer conn.Close() for { // push the content of src every 5 seconds. rsync.Push(conn, "src") time.Sleep(time.Second * 5) } }">
func main() {
  conn, err := net.Dial("tcp", "
   
    :1234"
   )
  if err != nil {
    log.Fatalf("error creating connection:", err.Error())
  }
  defer conn.Close()
  for {
    // push the content of src every 5 seconds.
    rsync.Push(conn, "src")
    time.Sleep(time.Second * 5)
  }
}

Pull:

func main() {
  listener, err := net.Listen("tcp", ":1234")
  if err != nil {
    log.Fatalf("error listening:", err.Error())
  }
  defer listener.Close()

  for {
    conn, err := listener.Accept()
    if err != nil {
      log.Println("error accepting connection:", err.Error())
      continue
    }
    // pull the content and copy it in src.
    rsync.Pull(conn, "src")
    conn.Close()
  }
}
Owner
Similar Resources

transfer.sh - Easy and fast file sharing from the command-line.

Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance.

Jan 2, 2023

Easy and fast file sharing from the command-line.

Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance.

Jan 2, 2023

aqua is a simple file uploading and sharing server for personal use.

aqua is a simple file uploading and sharing server for personal use.

aqua is a simple file uploading and sharing server for personal use. It is built to be easy to set up and host on your own server, for example to use it in combination with uploading tools like ShareX.

Jul 7, 2022

Built in user interface, LAN file transfer, such as mobile phone, computer, tablet, different operating system

Built in user interface, LAN file transfer, such as mobile phone, computer, tablet, different operating system

Modao Built in user interface, LAN file transfer, such as mobile phone, computer, tablet, different operating systems, etc., as well as text transfer

May 7, 2022

mini file transfer tool, use it just curl o wget

miniTransfer mini file transfer tool, use it just curl o wget How to use upload file curl -T localFileName 127.0.0.1:1234 # default save as localFileN

Jan 12, 2022

peer-to-peer file sharing

what i want is a tool to use to send files my many virtual machines. I want to do this myself, and i want to make it work as expected. So maybe a daem

Jun 13, 2022

wholeaked is a file-sharing tool that allows you to find the responsible person in case of a leakage

wholeaked is a file-sharing tool that allows you to find the responsible person in case of a leakage

wholeaked is a file-sharing tool that allows you to find the responsible person in case of a leakage

Dec 25, 2022

Simple temporary file upload and transfer web application coding with Go language.

Temp File Transfer Web Application Simple temporary file upload and transfer web application coding with Go language. Explore the Golang ยป Live Demo T

Dec 2, 2022

a ed2k link crawler written in Go / golang

Install/Run Example $ git clone git://github.com/kevinwatt/ed2kcrawler.git Build ed2kcrawler $ make Create an config.cfg file [GenSetting] OThread =

Aug 24, 2022
Golang PoC software for reliable file transfers over a data diode. DIY gigabit data diode hardware instructions
Golang PoC software for reliable file transfers over a data diode. DIY gigabit data diode hardware instructions

DIY Data Diode Simple DIY gigabit data diode (hardware and software). Presented at SEC-T 2021. Hardware By doing a simple hardware mod to a fiber conv

Dec 1, 2022
Delta : File Sharing system for golang

delta is File Sharing system its good for Local networks or small teams Cross-platform delta runs anywhere Go can compile for: Windows, Mac, Linux, AR

Nov 29, 2021
Subspace - File sharing application for golang

subspace File sharing application. Supported Platforms OS 386 amd64 arm6 arm64 L

Jan 29, 2022
FileTransferGo - File Transfer With Golang

FileTransferGo Packages used ?? Go: Gin (http server) ?? Cobra (CLI command fram

Jun 24, 2022
oDrop, a fast efficient cross-platform file transfer software for server and home environments

oDrop is a cross-platform LAN file transfer software to efficiently transfer files between computers, oDrop is useful in environments where GUI is not available.

Jun 4, 2022
JuiceFS is a distributed POSIX file system built on top of Redis and S3.
JuiceFS is a distributed POSIX file system built on top of Redis and S3.

JuiceFS is an open-source POSIX file system built on top of Redis and object storage

Jan 5, 2023
Syncthing is a continuous file synchronization program.
Syncthing is a continuous file synchronization program.

Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers. We strive to fulfill the goals below. The goals are listed in order of importance, the most important one being the first.

Jan 9, 2023
fsync - a file sync server

fsync - a file sync server

Aug 25, 2022
Yet another netcat for fast file transfer

nyan Yet another netcat for fast file transfer When I need to transfer a file in safe environment (e.g. LAN / VMs), I just want to use a simple comman

Apr 30, 2022
A web based drag and drop file transfer tool for sending files across the internet.

DnD A file transfer tool. Demo Usage Get go get github.com/0xcaff/dnd or download the latest release (you don't need go to run it) Run dnd Now navig

Dec 16, 2022