From f125f09ddc69699d65cebeff09007524c59b2a13 Mon Sep 17 00:00:00 2001 From: coderwander <166724773+coderwander@users.noreply.github.com> Date: Wed, 17 Apr 2024 05:48:03 +0800 Subject: [PATCH] chore: fix some typos in comments (#3805) Signed-off-by: coderwander <770732124@qq.com> --- site/content/docs/Advanced/Kopiaignore/_index.md | 4 ++-- site/content/docs/Advanced/Ransomware Protection/_index.md | 2 +- tests/recovery/blobmanipulator/blobmanipulator.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/docs/Advanced/Kopiaignore/_index.md b/site/content/docs/Advanced/Kopiaignore/_index.md index 380c210a079..d1cb3b6714f 100644 --- a/site/content/docs/Advanced/Kopiaignore/_index.md +++ b/site/content/docs/Advanced/Kopiaignore/_index.md @@ -93,8 +93,8 @@ The following table provides some example rules related to our [example](#kopiai | `/logs` | Matches files and folders that are named `logs` only within the parent directory | thesis/logs/ | 1 directory, 5 files | | `*.db` | Matches files with extension `.db` | (...)
thesis/tmp.db
thesis/logs/log.db | 0 directories, 5 files | | `*.db*` | Matches files with extension `.db` followed by any other number or character | (...)
thesis/tmp.db
thesis/logs/tmp.dba | 0 directories, 6 files | -| `**/logs/**` | Matches all occurences of `logs` within the `thesis` and sub-directories | (...)
thesis/logs/
thesis/chapters/logs/ | 2 directories, 6 files | -| `chapters/**/*.log` | Matches all files with extension `.log` in all sub-directories within `chapters` | thesis/chapters/logs/chapter.log | 0 directores, 1 file | +| `**/logs/**` | Matches all occurrences of `logs` within the `thesis` and sub-directories | (...)
thesis/logs/
thesis/chapters/logs/ | 2 directories, 6 files | +| `chapters/**/*.log` | Matches all files with extension `.log` in all sub-directories within `chapters` | thesis/chapters/logs/chapter.log | 0 directories, 1 file | | `*.*` | Matches all files in `thesis` | (...)
thesis/
thesis/tmp.db | 5 directories, 17 files (all) | | `!*.*` | Matches no files in `thesis` | - | 0 directories, 0 files | | `[a-z]?tmp.db` | Matches files beginning with characters between `a` and `z`, followed by a single character, ending with `tmp.db` | thesis/abtmp.db | 0 directories, 1 file | diff --git a/site/content/docs/Advanced/Ransomware Protection/_index.md b/site/content/docs/Advanced/Ransomware Protection/_index.md index 6bf89ff8514..970b7741844 100644 --- a/site/content/docs/Advanced/Ransomware Protection/_index.md +++ b/site/content/docs/Advanced/Ransomware Protection/_index.md @@ -115,7 +115,7 @@ Additionally note that ransomware could theoretically weaponize object-locks to ### An additional note about Lifecycle Management vs retention-time -At first glance, Lifecycle Management and retention-time may seem to serve similar purposes. However, if only using Lifecycle Management, an attacker could still log into your account and delete the entire bucket, or otherwise force-delete a file. Using 'Object Lock' with retention-time provides an additional gaurantee that the only way for data to be lost before the retention-time expires would be to delete your account altogether. The S3 provider may allow enabling Object Lock without enabling Lifecycle Management. When retention-time is applied to a file, and that file is deleted, the S3 service will set a `DELETE` marker instead of actually deleting the file. If Lifecycle Management is not enabled, then files may remain in the repository with the `DELETED` tag indefinitely. Thus, it is recommended to enable Lifecycle Management whenever using a retention-time in Kopia to balance protective measures against escalating storage costs. +At first glance, Lifecycle Management and retention-time may seem to serve similar purposes. However, if only using Lifecycle Management, an attacker could still log into your account and delete the entire bucket, or otherwise force-delete a file. Using 'Object Lock' with retention-time provides an additional guarantee that the only way for data to be lost before the retention-time expires would be to delete your account altogether. The S3 provider may allow enabling Object Lock without enabling Lifecycle Management. When retention-time is applied to a file, and that file is deleted, the S3 service will set a `DELETE` marker instead of actually deleting the file. If Lifecycle Management is not enabled, then files may remain in the repository with the `DELETED` tag indefinitely. Thus, it is recommended to enable Lifecycle Management whenever using a retention-time in Kopia to balance protective measures against escalating storage costs. For simplicity, the recommendation is to use the same time period for Lifecycle Management and for retention-time, however, this is not a hard requirement. It is possible to set a very short Lifecycle Management period and a long retention-time (in which case files will be permanently deleted soon after the retention-time expires. Alternatively, the Lifecycle Management could be set to be significantly longer than the retention time. This would provide additional restore capabilities while allowing for manual cleanup of deleted files should it be necessary (with the understanding that once the retention-time expires, the ransomware protention is reduced). For simplicity, the recommendation is to use the same time period for Lifecycle Management and for retention-time. diff --git a/tests/recovery/blobmanipulator/blobmanipulator.go b/tests/recovery/blobmanipulator/blobmanipulator.go index 7a708f42ab2..7ccb872d370 100644 --- a/tests/recovery/blobmanipulator/blobmanipulator.go +++ b/tests/recovery/blobmanipulator/blobmanipulator.go @@ -192,7 +192,7 @@ func (bm *BlobManipulator) RestoreGivenOrRandomSnapshot(snapID, restoreDir strin } if snapID == "" { - // list available snaphsots + // list available snapshots stdout, _, snapshotListErr := bm.KopiaCommandRunner.Run("snapshot", "list", "--json") if snapshotListErr != nil { return stdout, snapshotListErr