Documentation
¶
Overview ¶
Module: cmd/restore Purpose: Implements the "restore" subcommand that lists available backups on the remote, allows selection by index, downloads the archive + sidecar, verifies checksum, and extracts to a destination.
Key Components:
- restoreCmd: Cobra command for "arcup restore"
- executeRestore(): Full restore orchestration
- listBackups(): Fetches and displays remote backups
Dependencies:
- internal/upload: Rclone listing and download
- internal/meta: Sidecar metadata parsing and checksum verification
- internal/archive: Extraction by algo type
Module: cmd/root Purpose: Defines the root cobra command, global persistent flags, and viper config file binding. All subcommands attach here.
Key Components:
- rootCmd: Top-level cobra command with global flags
- Execute(): Entry point called from main.go
- initConfig(): Loads config file via viper and binds flags
Dependencies:
- github.com/spf13/cobra: CLI framework
- github.com/spf13/viper: Config file + flag binding
- github.com/rs/zerolog: Structured logging
Module: cmd/run Purpose: Implements the "run" subcommand that performs a backup cycle: archive sources, generate metadata sidecar, upload both to the remote, and clean up local files. Supports watch mode (-w) to repeat on a schedule, and optional retention cleanup after each successful backup.
Key Components:
- runCmd: Cobra command for "arcup run"
- executeRun(): Core backup logic orchestrator
- runBackupCycle(): Single backup + optional retention pass
Dependencies:
- internal/config: Resolved configuration struct
- internal/archive: Archiver factory and compression
- internal/upload: Rclone upload executor
- internal/meta: Sidecar metadata generation
- internal/scheduler: Cron/duration scheduling for watch mode
- internal/retention: Policy evaluation for cleanup
Module: cmd/validate Purpose: Implements the "validate" subcommand that checks configuration validity, source paths, and rclone remote accessibility before running a real backup.
Key Components:
- validateCmd: Cobra command for "arcup validate"
- executeValidate(): Runs all validation checks
Dependencies:
- internal/config: Configuration loading
- internal/upload: Remote connectivity check
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.