check_backup_age

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package check_backup_age implements the ctx system check-backup-age subcommand.

It checks how recently a backup was created and nudges the user when backups exceed the configured maximum age.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the "ctx system check-backup-age" subcommand.

Returns:

  • *cobra.Command: Configured check-backup-age subcommand

func Run

func Run(cmd *cobra.Command, stdin *os.File) error

Run executes the check-backup-age hook logic.

Reads a hook input from stdin, checks whether the SMB share is mounted and whether the backup marker file is fresh, then emits a relay warning if any issue is detected. Throttled to once per day.

Parameters:

  • cmd: Cobra command for output
  • stdin: standard input for hook JSON

Returns:

  • error: Always nil (hook errors are non-fatal)

Types

This section is empty.

Jump to

Keyboard shortcuts

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