chore: fix some typos in comments (#3805)

Signed-off-by: coderwander <770732124@qq.com>
This commit is contained in:
coderwander authored and GitHub committed 2024-04-16 14:48:03 -07:00
1 parent 89c8eb47af
commit f125f09ddc
3 files changed
+4 -4

No files matched your search

@@ -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` | (...) </br> thesis/tmp.db </br> thesis/logs/log.db | 0 directories, 5 files |
| `*.db*` | Matches files with extension `.db` followed by any other number or character | (...) </br> thesis/tmp.db </br> thesis/logs/tmp.dba | 0 directories, 6 files |
| `**/logs/**` | Matches all occurences of `logs` within the `thesis` and sub-directories | (...) </br> thesis/logs/ </br> 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 | (...) </br> thesis/logs/ </br> 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` | (...) </br> thesis/ </br> 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 |
@@ -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.
@@ -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