Skip to content

Commit

Permalink
Fixed user permission issue with container backups (PlexTrac#140)
Browse files Browse the repository at this point in the history
* Fixed user permission issue with container backups

* Update Version
  • Loading branch information
Michael-Burke authored May 30, 2024
1 parent fe41b9a commit ed72e7c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.6.10
current_version = 0.6.11

commit = True
tag = True
Expand Down
10 changes: 7 additions & 3 deletions src/_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,18 @@ function backup_fullUploadsBackup() {
function backup_fullCouchbaseBackup() {
info "$couchbaseComposeService: Performing backup of couchbase database"
local user_id=$(id -u plextrac)
local cmd="compose_client exec -T --user $user_id"
local cmd="compose_client exec -T"
if [ "$CONTAINER_RUNTIME" == "podman" ]; then
cmd='docker exec'
cmd='podman exec'
fi
if [ "$CONTAINER_RUNTIME" != "podman" ]; then
debug "`$cmd $couchbaseComposeService \
chown -R $user_id:$user_id /backups 2>&1`"
fi
local cmd="compose_client exec -T --user $user_id"
if [ "$CONTAINER_RUNTIME" == "podman" ]; then
cmd='podman exec'
fi
debug "`$cmd $couchbaseComposeService \
cbbackup -m full "http://127.0.0.1:8091" /backups -u ${CB_BACKUP_USER} -p ${CB_BACKUP_PASS} 2>&1`"
latestBackup=`ls -dc1 ${PLEXTRAC_BACKUP_PATH}/couchbase/* | head -n1`
Expand All @@ -66,7 +70,7 @@ function backup_fullPostgresBackup() {
local user_id=$(id -u plextrac)
local cmd="compose_client exec -T --user $user_id"
if [ "$CONTAINER_RUNTIME" == "podman" ]; then
cmd='docker exec'
cmd='podman exec'
fi
if [ "$CONTAINER_RUNTIME" != "podman" ]; then
debug "`compose_client exec -T $postgresComposeService chown -R $user_id:$user_id /backups 2>&1`"
Expand Down
2 changes: 1 addition & 1 deletion src/plextrac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -Eeuo pipefail

VERSION=0.6.10
VERSION=0.6.11

## Podman Global Declaration Variable
declare -A svcValues
Expand Down

0 comments on commit ed72e7c

Please sign in to comment.