multi-node installations: use a different backup path for each node

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-06-03 17:54:24 +02:00
parent 1f7433e798
commit 9470cd6e69
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -884,7 +884,6 @@ func Initialize(cnf Config, basePath string, checkAdmins bool) error {
return fmt.Errorf("unable to get absolute backup path: %w", err) return fmt.Errorf("unable to get absolute backup path: %w", err)
} }
config.BackupsPath = absoluteBackupPath config.BackupsPath = absoluteBackupPath
providerLog(logger.LevelDebug, "absolute backup path %q", config.BackupsPath)
if err := initializeHashingAlgo(&cnf); err != nil { if err := initializeHashingAlgo(&cnf); err != nil {
return err return err
@ -907,6 +906,10 @@ func Initialize(cnf Config, basePath string, checkAdmins bool) error {
return err return err
} }
delayedQuotaUpdater.start() delayedQuotaUpdater.start()
if currentNode != nil {
config.BackupsPath = filepath.Join(config.BackupsPath, currentNode.Name)
}
providerLog(logger.LevelDebug, "absolute backup path %q", config.BackupsPath)
return startScheduler() return startScheduler()
} }