Skip to main content

Module backup

Module backup 

Source
Expand description

Config and disk backup ops.

reference: horto-os/scripts/s3_backup_etc_configs.sh reference: horto-os/scripts/timestamped_backup_etc_configs.sh reference: horto-os/scripts/partclone_backup_sda5.sh reference: horto-os/docs/BACKUP_YOUR_HORTO-OS.MD

Structsยง

BackupStatus
Snapshot of backup-related host state for status API / TUI.
DiskBackupFlags
Boolean disk-backup readiness flags (flattened in JSON).
DiskBackupOpts
Options for a partclone-based eMMC partition backup.
DiskBackupProbe
Readiness probe for full-disk / partition image backup.
EtcBackupReport
Result of copying managed /etc entries into a backup tree.
ShrinkBackupOpts
Options for shrink-backup wrapper (optional third method).

Functionsยง

backup_disk
Apply partclone backup when guards pass.
backup_etc_initial
Protected initial /etc backup (same destination as setup step s3).
backup_etc_timestamped
Timestamped /etc backup under /srv/backup/etc/YYYYMMDD-HHMMSS.
backup_shrink
Plan or run shrink-backup when the tool is on PATH.
backup_status
Aggregate backup status for API / dashboard.
copy_managed_etc
Copy managed /etc paths (from embedded config top-level names) into dest.
disk_image_name ๐Ÿ”’
list_timestamped_etc_backups
List timestamped backup directory names (newest last).
looks_like_emmc_root ๐Ÿ”’
looks_like_removable_root ๐Ÿ”’
plan_disk_backup
Plan actions for a partclone backup (always safe to call).
probe_disk_backup
Probe whether a partclone eMMC backup is safe to run now.
root_mount_source
Resolve what / is mounted from (best effort).
run_partclone_gzip ๐Ÿ”’
should_skip_control ๐Ÿ”’