From 5a517d12ad728a17fb2421075b0aa34ff3100104 Mon Sep 17 00:00:00 2001 From: LinuxSquare Date: Thu, 10 Apr 2025 21:54:17 +0200 Subject: [PATCH] add datapack functionality --- functions/backup | 6 +++++- functions/datapack | 34 ++++++++++++++++++++++++++++++++-- utils/helpers | 6 ++++++ 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/functions/backup b/functions/backup index 9ec0c70..fc4535d 100644 --- a/functions/backup +++ b/functions/backup @@ -26,15 +26,19 @@ function backup_create() { } function backup_destroy() { + checkBackupDir "${1}" + local backupdir="$(getValueByKey 'PODMAN_DIRECTORY')/${1}/backup" if [[ ! -f "${backupdir}/${2}.tar.gz" ]]; then - log e "Backup ${2%} does not exist! Check again using '$(basename 0) backup list'" + log e "Backup '${2}' does not exist! Check again using '$(basename 0) backup list'" exit 1 fi rm "${backupdir}/${2}.tar.gz" } function backup_list() { + checkBackupDir "${1}" + local backupdir="$(getValueByKey 'PODMAN_DIRECTORY')/${1}/backup" local found_backups=($(find "$backupdir" -type f -print)) diff --git a/functions/datapack b/functions/datapack index 8eed24a..bf8fdec 100644 --- a/functions/datapack +++ b/functions/datapack @@ -4,20 +4,50 @@ function datapack_help() { usage_general cat<