Remove extra whitespaces and fix minor typos (#460)

This commit is contained in:
Pavan Navarathna
2020-06-01 13:40:57 -07:00
committed by GitHub
parent 85aa4ae6e5
commit c13b5f820f
8 changed files with 22 additions and 22 deletions

View File

@@ -18,7 +18,7 @@
var log = logging.GetContextLoggerFunc("editor")
// EditLoop launches OS-specific editor (VI, notepad.exe or anoter editor configured through environment variables)
// EditLoop launches OS-specific editor (VI, notepad.exe or another editor configured through environment variables)
// It creates a temporary file with 'initial' contents and repeatedly invokes the editor until the provided 'parse' function
// returns nil result indicating success. The 'parse' function is passed the contents of edited files without # line comments.
func EditLoop(ctx context.Context, fname, initial string, parse func(updated string) error) error {

View File

@@ -14,7 +14,7 @@
maxSleep = 10 * time.Second
)
// RetriableT is a wrapper around *testin.T with the same methods that supports retrying tests.
// RetriableT is a wrapper around *testing.T with the same methods that supports retrying tests.
type RetriableT struct {
*testing.T
suppressErrors bool

View File

@@ -61,7 +61,7 @@ func TestContentIndexRecovery(t *testing.T) {
t.Errorf("invalid # of contents recovered: %v, want %v", got, want)
}
// contents are stil not found
// contents are still not found
verifyContentNotFound(ctx, t, bm, content1)
verifyContentNotFound(ctx, t, bm, content2)
verifyContentNotFound(ctx, t, bm, content3)

View File

@@ -32,7 +32,7 @@ func emitFlags(w io.Writer, flags []*kingpin.FlagModel) {
return
}
fmt.Fprintf(w, "| Flag | Short | Defaut | Help |\n")
fmt.Fprintf(w, "| Flag | Short | Default | Help |\n")
fmt.Fprintf(w, "| ---- | ----- | --- | --- |\n")
for _, f := range sortFlags(flags) {

View File

@@ -4,7 +4,7 @@ linkTitle: "Architecture"
weight: 60
---
Kopia stores its data in a data structure called Repository.
Kopia stores its data in a data structure called Repository.
Repository adapts simple storage such as NAS filesystem, Google Cloud Storage or Amazon S3 to add features such as encryption, deduplication, content-addressability and ability to maintain rich snapshot history.
@@ -31,15 +31,15 @@ The API for BLOB storage can be found in https://godoc.org/github.com/kopia/kopi
### Content-Addressable Block Storage (CABS)
BLOB storage by itself does not provide the features that Kopia needs (encryption, de-duplication), so we're usign content-addressable block storage layer to add those key features.
BLOB storage by itself does not provide the features that Kopia needs (encryption, de-duplication), so we're using content-addressable block storage layer to add those key features.
Content-Addressable Block Storage manages data blocks of relatively small sizes (typically <=20MB). Unlike BLOB storage where we can freely pick a filename, CABS assigns an identifier called **Block ID** to each block of data that gets stored.
Block ID is generated by applying [cryptographic hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function) such as SHA2 or BLAKE2S to produce a pseudo-random identifier, such as `6a9fc3a464a79360269e20b88cef629a`.
Block ID is generated by applying [cryptographic hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function) such as SHA2 or BLAKE2S to produce a pseudo-random identifier, such as `6a9fc3a464a79360269e20b88cef629a`.
A key property of block identifiers is that two identical block of data will produce exactly the same identifiers, thus resulting in natural de-duplication of data.
After hashing, the block data is encrypted using algorithm such as `AES256-CTR` or `SALSA20`. To make uploads to cloud storage more efficient and cheaper, multiple smaller blocks are combined into larger **Packs** of 20-40MB each.
After hashing, the block data is encrypted using algorithm such as `AES256-CTR` or `SALSA20`. To make uploads to cloud storage more efficient and cheaper, multiple smaller blocks are combined into larger **Packs** of 20-40MB each.
To help efficiently find a block in the blob storage, CABS maintains an index that maps block ID to the blob file name, offset within the file and length.

View File

@@ -10,7 +10,7 @@ Kopia uploads directories and files to remote storage called [Repository](../arc
Kopia uses [content-addressable storage](https://en.wikipedia.org/wiki/Content-addressable storage) for snapshots, which has many benefits:
* Each snapshot is always incremental, no data included in previous snapshots is ever re-uploaded to the repository based on file content.
* Each snapshot is always incremental, no data included in previous snapshots is ever re-uploaded to the repository based on file content.
* Multiple copies of the same file will be stored once. This is known as de-duplication.
@@ -34,16 +34,16 @@ All data is encrypted using per-content keys derived from the 256-bit master key
### Compression
Kopia can compress your datas to save extra storage and bandwidth. There are actually 3 compression methods available :
Kopia can compress your data to save extra storage and bandwidth. There are actually 3 compression methods available :
* [pgzip](https://github.com/klauspost/pgzip) : gzip is a very common compression algorithm. It was originaly created as a replacement for the compress program used in early Unix systems.
* [pgzip](https://github.com/klauspost/pgzip) : gzip is a very common compression algorithm. It was originally created as a replacement for the compress program used in early Unix systems.
Compression and decompression can be parallelized to speed up the process.
* [s2](https://github.com/klauspost/compress/tree/master/s2) : S2 is an extension of [Snappy](https://github.com/google/snappy). It's aimed for high throughput, which is why it features concurrent compression for bigger payloads.
* [zstd](https://github.com/klauspost/compress/tree/master/zstd) : [Zstandard](https://facebook.github.io/zstd/) is a real-time compression algorithm, providing high compression ratios. It offers a very wide range of compression / speed trade-off, while being backed by a very fast decoder. A high performance compression algorithm is implemented. For now focused on speed.
You can activate compression on a per directory basis
You can activate compression on a per directory basis
```shell
kopia policy set <path> --compression=<pgzip|s2|zstd>

View File

@@ -53,7 +53,7 @@ $ kopia repository connect from-config --token 03Fy598cYIqbMlNNDz9VLU0K6Pk9alC..
NOTICE: The token printed above can be trivially decoded to reveal the repository password. Do not store it in an unsecured place.
```
> NOTE: Make sure to safeguard the repository token, as it gives full access to the repository to anybody in its posession.
> NOTE: Make sure to safeguard the repository token, as it gives full access to the repository to anybody in its possession.
### Configuration File

View File

@@ -55,7 +55,7 @@ To connect to a repository that already exists, simply use `kopia repository con
$ kopia repository connect google --bucket kopia-test-123
```
[Detailed informations and settings](/docs/reference/command-line/common/repository-connect-filesystem/)
[Detailed information and settings](/docs/reference/command-line/common/repository-connect-filesystem/)
---
@@ -77,10 +77,10 @@ $ kopia repository create s3 \
### Connecting To Repository
```shell
$ kopia repository connect s3
$ kopia repository connect s3
```
[Detailed informations and settings](/docs/reference/command-line/common/repository-create-s3/)
[Detailed information and settings](/docs/reference/command-line/common/repository-create-s3/)
---
@@ -102,16 +102,16 @@ $ kopia repository connect b2 \
### Connecting To Repository
```shell
$ kopia repository connect b2
$ kopia repository connect b2
```
[Detailed informations and settings](/docs/reference/command-line/common/repository-connect-b2/)
[Detailed information and settings](/docs/reference/command-line/common/repository-connect-b2/)
---
## Local storage
Local storage includes any directory mounted and accessible. You can mount any readable directory avaible on your storage, a directory on usb device, a directory mounted with smb, ntfs, sshfs or similar.
Local storage includes any directory mounted and accessible. You can mount any readable directory available on your storage, a directory on usb device, a directory mounted with smb, ntfs, sshfs or similar.
### Creating a repository
@@ -134,7 +134,7 @@ $ find /tmp/my-repository -type f
/tmp/my-repository/kopia.repository.f
```
[Detailed informations and settings](/docs/reference/command-line/common/repository-connect-filesystem/)
[Detailed information and settings](/docs/reference/command-line/common/repository-connect-filesystem/)
---
@@ -156,7 +156,7 @@ $ kopia repository create filesystem --path /tmp/my-repository
```
* Create a password file
Password files are created with [httpaswd](https://httpd.apache.org/docs/2.4/programs/htpasswd.html). Username must be formated like this :
Password files are created with [httpaswd](https://httpd.apache.org/docs/2.4/programs/htpasswd.html). Username must be formatted like this :
```
<client-username>@<client-host-name-lowercase-without-domain>
@@ -180,7 +180,7 @@ You must indicate the location of the password file, ip of the server and port
$ kopia server --htpasswd-file /tmp/htpasswd --address 123.34.56.78:51515
```
>**All data are transfered encrypted. However, you should consider enabling https with ```--tls-cert-file``` and ```--tls-key-file``` settings**
>**All data transferred is encrypted. However, you should consider enabling https with ```--tls-cert-file``` and ```--tls-key-file``` settings**
#### On client computer