Skip to content

Commit

Permalink
chore: fix some typos in comments (kopia#3805)
Browse files Browse the repository at this point in the history
Signed-off-by: coderwander <[email protected]>
  • Loading branch information
coderwander authored Apr 16, 2024
1 parent 89c8eb4 commit f125f09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions site/content/docs/Advanced/Kopiaignore/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/Advanced/Ransomware Protection/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion tests/recovery/blobmanipulator/blobmanipulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f125f09

Please sign in to comment.