diff --git a/src/duplicacy_backupmanager.go b/src/duplicacy_backupmanager.go index eb85064..5cdc81f 100644 --- a/src/duplicacy_backupmanager.go +++ b/src/duplicacy_backupmanager.go @@ -1698,12 +1698,10 @@ func (manager *BackupManager) CopySnapshots(otherManager *BackupManager, snapsho if revisionMap[snapshot.ID][snapshot.Revision] == false { continue } - if !manager.config.dryRun { - otherManager.storage.CreateDirectory(0, fmt.Sprintf("snapshots/%s", snapshot.ID)) - description, _ := snapshot.MarshalJSON() - path := fmt.Sprintf("snapshots/%s/%d", snapshot.ID, snapshot.Revision) - otherManager.SnapshotManager.UploadFile(path, path, description) - } + otherManager.storage.CreateDirectory(0, fmt.Sprintf("snapshots/%s", snapshot.ID)) + description, _ := snapshot.MarshalJSON() + path := fmt.Sprintf("snapshots/%s/%d", snapshot.ID, snapshot.Revision) + otherManager.SnapshotManager.UploadFile(path, path, description) LOG_INFO("SNAPSHOT_COPY", "Copied snapshot %s at revision %d", snapshot.ID, snapshot.Revision) } diff --git a/src/duplicacy_snapshotmanager.go b/src/duplicacy_snapshotmanager.go index bde81d0..e94b16a 100644 --- a/src/duplicacy_snapshotmanager.go +++ b/src/duplicacy_snapshotmanager.go @@ -2217,11 +2217,9 @@ func (manager *SnapshotManager) DownloadFile(path string, derivationKey string) return nil } - if !manager.config.dryRun { - err = manager.snapshotCache.UploadFile(0, path, manager.fileChunk.GetBytes()) - if err != nil { - LOG_WARN("DOWNLOAD_FILE_CACHE", "Failed to add the file %s to the snapshot cache: %v", path, err) - } + err = manager.snapshotCache.UploadFile(0, path, manager.fileChunk.GetBytes()) + if err != nil { + LOG_WARN("DOWNLOAD_FILE_CACHE", "Failed to add the file %s to the snapshot cache: %v", path, err) } LOG_DEBUG("DOWNLOAD_FILE", "Downloaded file %s", path) @@ -2231,9 +2229,6 @@ func (manager *SnapshotManager) DownloadFile(path string, derivationKey string) // UploadFile uploads a non-chunk file from the storage. func (manager *SnapshotManager) UploadFile(path string, derivationKey string, content []byte) bool { - if manager.config.dryRun { - return true - } manager.fileChunk.Reset(false) manager.fileChunk.Write(content)