btrfs

package
v0.0.0-...-3ddbc71 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package btrfs keeps all needed btrfs commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSnapshot

func CreateSnapshot(subvolume string, snap domain.Snapshot) (uint64, error)

CreateSnapshot creates a new snapshot.

func DeleteSnapshot

func DeleteSnapshot(ph string) error

DeleteSnapshot deletes existing snapshot by path. These here we use exec.Command because for some reason `btrfs.SubvolDelete` is waiting for the response and it looks not convenient from UI perspective.

func GetSubvolID

func GetSubvolID(ph string) (uint64, error)

func GetVolumeIDByPath

func GetVolumeIDByPath(ph string) (uint64, error)

func Restore

func Restore(snapPath, mountPoint string) error

Restore creates a new snapshot. The idea is not to just move snapshot data to subvolume (like @ or @home) but make a snapshot for it.

func SupportedByKernel

func SupportedByKernel() (bool, error)

SupportedByKernel checks if kernel supports btrfs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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