feat: Add backup and security hardening

This commit is contained in:
2025-11-08 00:28:17 +01:00
parent 8de3f16ee6
commit 96f521a474
23 changed files with 5696 additions and 939 deletions

View File

@@ -0,0 +1,44 @@
#compdef backup-setup
# ZSH completion for backup-setup
# Installation: Copy to /usr/local/share/zsh/site-functions/_backup-setup
_backup-setup() {
local -a commands backup_types
commands=(
'status:Show backup status and last backup time'
'backup:Trigger a backup'
'list:List available backups on NAS'
'logs:View recent backup logs'
'test:Test NAS connection'
'help:Show help message'
)
backup_types=(
'full:Full system backup (excludes caches, tmp, build dirs)'
'home:Home directory backup only'
'incremental:Incremental backup (space-efficient)'
'configs:Configuration files backup (lightweight)'
)
_arguments -C \
'1:command:->command' \
'2:backup-type:->backup_type' \
&& return 0
case $state in
command)
_describe -t commands 'backup-setup command' commands
;;
backup_type)
if [[ ${words[2]} == "backup" ]]; then
_describe -t backup_types 'backup type' backup_types
fi
;;
esac
return 0
}
_backup-setup "$@"