Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
refactor custom dataset path
Browse files Browse the repository at this point in the history
  • Loading branch information
Heavybullets8 committed Jun 2, 2024
1 parent 3acd042 commit df03108
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .default.config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ backup_snapshot_streams=false

## String options ##
# Uncomment the following line to specify a custom dataset location for backups
# custom_dataset_location=
# Example: dataset_absolute_path=/mnt/tank/backups
dataset_absolute_path=DEFAULT

# Maximum size of a backup stream, be careful when setting this higher
# Especially considering PV's for plex, sonarr, radarr, etc. can be quite large
Expand Down
7 changes: 6 additions & 1 deletion functions/backup_restore/handler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ read_config() {
# Set the default options using the config file
export export_enabled="${BACKUP__BACKUP__export_enabled:-false}"
export full_backup_enabled="${BACKUP__BACKUP__full_backup_enabled:-false}"
export dataset_path="${BACKUP__BACKUP__custom_dataset_location:-/mnt/$(get_apps_pool)/heavyscript_backups}"
export dataset_path
if [[ "${BACKUP__BACKUP__dataset_absolute_path:-"DEFAULT"}" == "DEFAULT" ]]; then
dataset_path="/mnt/$(get_apps_pool)/heavyscript_backups"
else
dataset_path="${BACKUP__BACKUP__dataset_absolute_path:-"/mnt/$(get_apps_pool)/heavyscript_backups"}"
fi
}

# Function to handle backups and exports
Expand Down

0 comments on commit df03108

Please sign in to comment.