From 9470cd6e6950e11cb7142396cc29296374bfdfde Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sat, 3 Jun 2023 17:54:24 +0200 Subject: [PATCH] multi-node installations: use a different backup path for each node Signed-off-by: Nicola Murino --- internal/dataprovider/dataprovider.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/dataprovider/dataprovider.go b/internal/dataprovider/dataprovider.go index 3bdddff3..42a45827 100644 --- a/internal/dataprovider/dataprovider.go +++ b/internal/dataprovider/dataprovider.go @@ -884,7 +884,6 @@ func Initialize(cnf Config, basePath string, checkAdmins bool) error { return fmt.Errorf("unable to get absolute backup path: %w", err) } config.BackupsPath = absoluteBackupPath - providerLog(logger.LevelDebug, "absolute backup path %q", config.BackupsPath) if err := initializeHashingAlgo(&cnf); err != nil { return err @@ -907,6 +906,10 @@ func Initialize(cnf Config, basePath string, checkAdmins bool) error { return err } delayedQuotaUpdater.start() + if currentNode != nil { + config.BackupsPath = filepath.Join(config.BackupsPath, currentNode.Name) + } + providerLog(logger.LevelDebug, "absolute backup path %q", config.BackupsPath) return startScheduler() }