Skip to content

Commit

Permalink
Prevent issue with unset BORG_REMOTE_PATH env. Fix #36.
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Feb 21, 2024
1 parent 09412dd commit 35aacb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for elabctl

## Version 3.6.2

* Prevent issue with unset `BORG_REMOTE_PATH` env. Fix #36.

## Version 3.6.1

* Add `--default-character-set=utf8mb4` to `elabctl mysql` command
Expand Down
4 changes: 2 additions & 2 deletions elabctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://github.com/elabftw/elabctl/
# © 2022 Nicolas CARPi @ Deltablot
# License: GPLv3
declare -r ELABCTL_VERSION='3.6.1'
declare -r ELABCTL_VERSION='3.6.2'

# default backup dir
declare BACKUP_DIR='/var/backups/elabftw'
Expand Down Expand Up @@ -55,7 +55,7 @@ function borg-backup
# add these into env so it is picked up by borg
export BORG_REPO="${BORG_REPO}"
export BORG_PASSPHRASE="${BORG_PASSPHRASE}"
if [ -n "$BORG_REMOTE_PATH" ]; then
if [[ -v BORG_REMOTE_PATH ]]; then
export BORG_REMOTE_PATH="${BORG_REMOTE_PATH}"
fi
# we add to the borg the uploaded files (web directory) and also the backup dir containing dumps of MySQL
Expand Down

0 comments on commit 35aacb2

Please sign in to comment.