From ce472fe375298b2297de96324b82c9646bddbf18 Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Fri, 4 Sep 2020 10:43:37 -0400 Subject: [PATCH] Show erasure coding/rsa encryption if enabled for backup and copy --- src/duplicacy_backupmanager.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/duplicacy_backupmanager.go b/src/duplicacy_backupmanager.go index 1827d7f..7e6a0f4 100644 --- a/src/duplicacy_backupmanager.go +++ b/src/duplicacy_backupmanager.go @@ -184,8 +184,13 @@ func (manager *BackupManager) Backup(top string, quickMode bool, threads int, ta LOG_DEBUG("BACKUP_PARAMETERS", "top: %s, quick: %t, tag: %s", top, quickMode, tag) + if manager.config.DataShards != 0 && manager.config.ParityShards != 0 { + LOG_INFO("BACKUP_ERASURECODING", "Erasure coding is enabled with %d data shards and %d parity shards", + manager.config.DataShards, manager.config.ParityShards) + } + if manager.config.rsaPublicKey != nil && len(manager.config.FileKey) > 0 { - LOG_INFO("BACKUP_KEY", "RSA encryption is enabled" ) + LOG_INFO("BACKUP_KEY", "RSA encryption is enabled") } remoteSnapshot := manager.SnapshotManager.downloadLatestSnapshot(manager.snapshotID) @@ -1557,6 +1562,15 @@ func (manager *BackupManager) CopySnapshots(otherManager *BackupManager, snapsho return false } + if otherManager.config.DataShards != 0 && otherManager.config.ParityShards != 0 { + LOG_INFO("BACKUP_ERASURECODING", "Erasure coding is enabled for the destination storage with %d data shards and %d parity shards", + otherManager.config.DataShards, otherManager.config.ParityShards) + } + + if otherManager.config.rsaPublicKey != nil && len(otherManager.config.FileKey) > 0 { + LOG_INFO("BACKUP_KEY", "RSA encryption is enabled for the destination") + } + if snapshotID == "" && len(revisionsToBeCopied) > 0 { LOG_ERROR("SNAPSHOT_ERROR", "You must specify the snapshot id when one or more revisions are specified.") return false