Skip to content

Commit

Permalink
Update the backupDir to backupDirPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski committed Sep 24, 2021
1 parent 0a26e01 commit 3cf3d4e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/consul-snapshots.nix
Expand Up @@ -29,17 +29,17 @@ let
'';
};

backupDir = mkOption {
backupDirPrefix = mkOption {
type = str;
default = "/var/lib/private/consul/snapshots";
description = ''
The location to store the snapshots.
The top level location to store the snapshots. The actual storage location
of the files will be this prefix path with the snapshot job name appended,
where the job is one of "hourly", "daily" or "custom".
Note that the actual storage location of the files will be this path
with the snapshot job name appended where the job is one of "hourly",
"daily" or "custom". Therefore, saved snapshot files will be found at:
Therefore, saved snapshot files will be found at:
$backupDir/$job/*.snap
$backupDirPrefix/$job/*.snap
'';
};

Expand Down Expand Up @@ -134,7 +134,7 @@ let
set -exuo pipefail
OWNER="${cfg.${job}.owner}"
BACKUP_DIR="${cfg.${job}.backupDir}/${job}"
BACKUP_DIR="${cfg.${job}.backupDirPrefix}/${job}"
BACKUP_SUFFIX="-${cfg.${job}.backupSuffix}";
INCLUDE_LEADER="${if cfg.${job}.includeLeader then "true" else "false"}"
SNAP_NAME="$BACKUP_DIR/consul-$(hostname)-$(date +"%Y-%m-%d_%H%M%SZ''${BACKUP_SUFFIX}").snap"
Expand Down

0 comments on commit 3cf3d4e

Please sign in to comment.