btrsync

module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2022 License: LGPL-3.0

README

btrsync

Go Reference

A library and tool for working with btrfs filesystems and snapshots in Golang.

Features

Beyond the native (no CGO*) bindings for working with BTRFS file systems provided in pkg, the btrsync utility included has the following features:

  • Manage and sync snapshots to local and remote locations
  • Automatic volume and subvolume discovery for easy config generation
  • Time machine app for browsing local snapshots
  • Recovery of interrupted transfers by natively scanning the btrfs send streams
  • Mount a btrfs sendfile as an in-memory FUSE filesystem
  • More, but I'm too lazy to document right now

Btrsync can be run either as a daemon process, cron job, or from the command line. It will manage snapshots and their mirrors according to its configuration or command line flags.

*Cgo is used to generate certain constants and structures in the codebase, but not at compile time

Library Usage

For comprehensive usage of the bindings, see the go.dev. But below are overviews of some common operations:

Volumes

Volume-wide bindings (such as interacting with RAID levels) are very barebones at the moment, but more will potentially come.

TODO

Subvolumes

TODO

TODO: Scrubbing/Balancing

Snapshots

TODO

Sending

TODO

Receiving

TODO

Contributing

PRs are welcome! Feel free to open issues for found bugs, but for simple addition of an ioctl or two it would be preferable to open a PR. Also, feel free to open issues for feature and/or bug discussions about the btrsync and btrtm utilities.

Directories

Path Synopsis
cmd
btrsync command
Btrsync is a tool for synchronizing btrfs snapshots locally and over a network.
Btrsync is a tool for synchronizing btrfs snapshots locally and over a network.
btrsync/cmd/snapmanager
Package snapmanager provides a simple snapshot manager for btrfs subvolumes.
Package snapmanager provides a simple snapshot manager for btrfs subvolumes.
btrsync/cmd/snaputil
Snaputil provides utility functions for working with snapshots.
Snaputil provides utility functions for working with snapshots.
btrsync/cmd/syncmanager
Package syncmanager provides a manager for syncing btrfs snapshots with a local or remote host.
Package syncmanager provides a manager for syncing btrfs snapshots with a local or remote host.
btrtm command
Btrtm is an app written with the Fyne toolkit for browsing and managing btrfs snapshots.
Btrtm is an app written with the Fyne toolkit for browsing and managing btrfs snapshots.
btrtm/btrfstree
Btrfstree is a widget that displays a tree of btrfs subvolumes and snapshots.
Btrfstree is a widget that displays a tree of btrfs subvolumes and snapshots.
gen
ioctlgen command
pkg
btrfs
Package btrfs contains low-level bindings to the Btrfs filesystem.
Package btrfs contains low-level bindings to the Btrfs filesystem.
receive
Package receive implements a receiver for btrfs send streams.
Package receive implements a receiver for btrfs send streams.
receive/receivers
Package receivers exposes the interface for receiving data from a btrfs send stream.
Package receivers exposes the interface for receiving data from a btrfs send stream.
receive/receivers/dispatch
Package dispatch provides a receiver that dispatches to multiple receivers.
Package dispatch provides a receiver that dispatches to multiple receivers.
receive/receivers/local
Package local implements a receiver that writes the received data to a local btrfs filesystem.
Package local implements a receiver that writes the received data to a local btrfs filesystem.
receive/receivers/memfs
Package memfs implements a simple in-memory filesystem from a btrfs send stream.
Package memfs implements a simple in-memory filesystem from a btrfs send stream.
receive/receivers/nop
Package nop implements a receiver that does nothing.
Package nop implements a receiver that does nothing.
receive/receivers/ssh
Package ssh provides a receiver that receives snapshots over an ssh connection.
Package ssh provides a receiver that receives snapshots over an ssh connection.
sendstream
Pacakge sendstream implements a scanner for the btrfs send stream format.
Pacakge sendstream implements a scanner for the btrfs send stream format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL