cmd

package
v0.0.0-...-22e875b Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(path string) error

Cleanup deletes all old subdirectories and files in the recovery partition returns: error

func Compare

func Compare(freeDisk, estimated float64) bool

Compare verifies freedisk against estimated and safetyNet calculation returns: boolean

func DirSize

func DirSize(path string) float64

DirSize calculates current diskspace used by the files under a directory returns: size of the directory(float64)

func DiskPartitionSize

func DiskPartitionSize() (float64, error)

DiskPartitionSize calculate current disk space returns: disk size(float64), error

func EstimateFsSpaceRequirements

func EstimateFsSpaceRequirements() (float64, error)

EstimateFsSpaceRequirements calculate the required backup size returns: disk size(float64), error

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ExecuteCmd

func ExecuteCmd(cmd string) error

ExecuteCmd execute shell commands returns: error

func InitBackup

func InitBackup() error

InitBackup Prepare backup pre-requisites returns: error

func LaunchBackup

func LaunchBackup() error

LaunchBackup triggers the backup procedure returns: error

func RecoveryInProgress

func RecoveryInProgress(backupPath string) bool

RecoveryInProgress checks if a restore is in progress returns: bool

func SizeConversion

func SizeConversion(size float64) (float64, string)

SizeConversion coverts the bytes into its multiple returns: converted size(float64), corresponding metric(string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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