A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.
fix: resolves replication and restore failure for plans with local storages.
towfiqi52be0c14bf23
diff --git a/backend/src/managers/handlers/ReplicationHandler.ts b/backend/src/managers/handlers/ReplicationHandler.tsindex 2daa686..b679fd1 100644--- a/backend/src/managers/handlers/ReplicationHandler.ts+++ b/backend/src/managers/handlers/ReplicationHandler.ts@@ -1,6 +1,7 @@import { EventEmitter } from 'events';import { runResticCommand } from '../../utils/restic/restic';import { generateResticRepoPath } from '../../utils/restic/helpers';+import { normalizeStorageName } from '../../utils/helpers';import { processManager } from '../ProcessManager';import { PruneHandler } from './PruneHandler';import { ProgressManager } from '../ProgressManager';@@ -151,7 +152,7 @@ export class ReplicationHandler {false);- const destRepoPath = generateResticRepoPath(storageName, storagePath);+ const destRepoPath = generateResticRepoPath(normalizeStorageName(storageName), storagePath);// Step 1: Ensure replication repo is initialized (with chunker params from source)try {diff --git a/backend/src/services/RestoreService.ts b/backend/src/services/RestoreService.tsindex df1d2ff..4bde478 100644--- a/backend/src/services/RestoreService.ts+++ b/backend/src/services/RestoreService.ts@@ -6,6 +6,7 @@ import { BackupStore } from '../stores/BackupStore';import { StorageStore } from '../stores/StorageStore';import { BaseRestoreManager } from '../managers/BaseRestoreManager';import { RestoreConfig, RestoreOptions } from '../types/restores';+import { normalizeStorageName } from '../utils/helpers';/*** A class for managing restore operations.@@ -84,7 +85,7 @@ export class RestoreService {);if (replicationStorage) {storagePath = replicationStorage.storagePath || '';- storageName = replicationStorage.storageName;+ storageName = normalizeStorageName(replicationStorage.storageName);if (!storageName) {storageName = await this.getStorageName(replicationStorage.storageId);}@@ -149,7 +150,7 @@ export class RestoreService {);if (replicationStorage) {storagePath = replicationStorage.storagePath || '';- storageName = replicationStorage.storageName;+ storageName = normalizeStorageName(replicationStorage.storageName);if (!storageName) {storageName = await this.getStorageName(replicationStorage.storageId);}