Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.13 KB

README.md

File metadata and controls

42 lines (30 loc) · 1.13 KB

grsync — golang rsync wrapper

Build Status codecov

This lib is a lightweight fork from zloylos/grsync with focus on rsync itself and some fixes. The stdout of the rsync command is that good to print it to stdout if necessary instead of wrapping it.

The history/fork was removed because of problems during go get. The work is based on the v1.5.0 release of zloylos/grsync.

Usage

All rsync configurations are available in the RsyncOptions struct.

To enable the detailed rsync output set the progress option to true.

To start the rsync process call the Run() method.

Example

package main

import (
	"github.com/schnes4/grsync"
)

func main () {
	rsyncOptions := grsync.RsyncOptions{
		Archive: true,
		Executability: true,
		Recursive: true,
		Progress: true,
		Delete: true,
		//...
	}

	rsync := grsync.NewRsync("source", "destination", rsyncOptions)
	err := rsync.Run()
}