Commit Graph

3660 Commits

Author SHA1 Message Date
Niraj Tolia
7c64934ca8 Remove stale reference to repo project
Removes stale docs as it looks like the `kopia/repo` project has been archived and moved in here.
2019-08-22 21:03:15 -07:00
Jarek Kowalski
399164b3be webdav: improved error handling
- improved HTTP error handling
- added exponential back-off around gowebdav calls
- fixed blob.ListAllBlobsConsistent which was never finishing for WebDAV

Fixes #88 - 429 Too Many Requests - PROPFIND /n0a #88
Fixex #89 - Debug log clashes with interactive repo password request
2019-08-18 10:49:11 -07:00
Jarek Kowalski
d80b659d9e webdav: added tests for basic authentication, CLI options for specifying username and password. fixes #80 v0.3.0-rc6 2019-08-17 18:09:05 -07:00
Jarek Kowalski
9893a552e2 metrics: disable google analytics as it's not providing any useful data, need to rethink the story here 2019-08-17 16:13:30 -07:00
Jarek Kowalski
86dc5bb44c goreleaser: fixed brew install path and deprecation warnings 2019-08-16 08:08:15 -07:00
Jarek Kowalski
06ea905801 Makefile: fixed installation of Google Cloud SDK on Travis v0.3.0-rc5 2019-08-14 06:44:56 -07:00
Jarek Kowalski
671a63aa24 travis: generate repository snapshot for long-term storage
This is triggered for tagged releases and will be used later for
long-term repository compatibility testing.
v0.3.0-rc4
2019-08-12 19:32:25 -07:00
Jarek Kowalski
2e0f75178e removed content.Manager.ListContents*() API 2019-08-12 19:21:06 -07:00
Jarek Kowalski
54d3c2071f added error handling tests to IterateContent() 2019-07-27 19:10:58 -07:00
Jarek Kowalski
b365d3414c removed content.Manager.ListContents*() API 2019-07-27 19:10:58 -07:00
Jarek Kowalski
6f5abf5e09 added content.Manager Iterate()
This uses callbacks avoids having to buffer
all content infos in memory and does not require holding a lock.
2019-07-26 21:31:25 -07:00
Jarek Kowalski
3a80d945d9 lint: upgraded to 1.17.1 2019-07-19 20:00:23 -10:00
Jarek Kowalski
829faf8e1a added 'rewrite --prefixed' flag to only rewrite prefixed content IDs (by default only rewrites non-prefixed IDs) 2019-07-18 20:29:27 -10:00
Jarek Kowalski
6ef696d97a cli: resolve symlinks for snapshot roots
also - error handling improvements in the CLI
2019-07-18 08:40:44 -10:00
Jarek Kowalski
a4430b05da travis: only upload coverage on post-submit builds and not PR 2019-07-17 13:19:23 -10:00
Jarek Kowalski
1af3d86ec7 Added support for separate packs for metadata
This puts all content blocks with non-empty prefix into starting with
`q` instead of `p`. This neatly separates all data (p) from metadata
(q) at the storage level and allows different storage policies, since
most data is not going to be ever accessed ever, but metadata is going
to be read a lot..

We can more aggressively cache contents from `q`.
2019-07-17 08:35:35 -10:00
Jarek Kowalski
8ada9587f3 travis: added encrypted 'known_hosts' file for sftp testing 2019-07-16 20:29:39 -10:00
Jarek Kowalski
59f0231f4c minor testability tweaks 2019-07-16 15:48:00 -10:00
Juan B. Rodriguez
4e2ceea146 Improve sftp provider logic
Tests are failing because pkg/sftp won't overwrite an existing file
(Rename function) and the test is actually doing that with
blobtesting.VerifyStorage.

The solution is to use pkg/sftp's PosixRename function:
"PosixRename renames a file using the posix-rename@openssh.com
extension which will replace newname if it already exists."

Additionally, the provider now creates the path on the server, if it
doesn't exist.
2019-07-16 15:46:52 -10:00
Jarek Kowalski
41530777a7 travis: fixed GPG decryption 2019-07-14 19:52:34 -07:00
Jarek Kowalski
692c741fa3 travis: reencrypted kopia.gpg 2019-07-14 19:47:59 -07:00
Jarek Kowalski
769b3c5f12 travis: reencrypted credentials with fixed key/iv 2019-07-14 19:30:22 -07:00
Jarek Kowalski
975824768e sftp: added encrypted e2e test credentials 2019-07-14 10:25:10 -07:00
Juan B. Rodriguez
d9a1fc93b7 Add e2e tests for sftp storage provider
Uses environment variables from the CI server, to connect to a test
sftp server

This also removes the "localhost" test
2019-07-12 23:16:29 -07:00
Jarek Kowalski
e414e7a4d1 Added support for reconnect tokens
Repository.Token() generates a base64-encoded token that can
be stored in password manager that fully describes repository connection
information (blob.ConnectionInfo) and optionally a password.

Use `kopia repo status -t` to print the token.
Use `kopia repo status -t -s` to print the token that also includes
repository password.

Use `kopia repo connect from-config --token T` to reconnect using the
token.
2019-07-10 21:03:40 -07:00
Jarek Kowalski
89469e74f2 goreleaser: fixed brews deprecation 2019-07-04 11:14:38 -07:00
Juan B. Rodriguez
a24a2da3c0 Implement an sftp backed storage provider
Uses go/ssh and pkg/sftp as building blocks and implements the common
sharded.Storage interface, shared between the filesystem and webdav
providers.

A couple of notes:

- The provider assumes the user has a working public/private key
connection to the ssh server.
No other authentication method is supported

- The repository path must exist on the server

- (testing related) The pkg/sftp server doesn't offer a way to set a
server filesystem root, so, during testing, it runs from the local
directory which is repo/blob/sftp. So the tests leave some debris
behind. Additionally, that's the reason why id_rsa and known_hosts
are there at all.

- Encrypted keyfiles are currently not supported (but it could be done)
2019-07-04 11:14:05 -07:00
Jarek Kowalski
b16e19dc64 fixing gcs credentials, try #3 - regenerated new SA JSON key 2019-07-04 10:56:50 -07:00
Jarek Kowalski
cb7127ac4a fixed credentials path, try #2 2019-07-04 10:20:25 -07:00
Jarek Kowalski
27f5b0540d fixed installation of GCS credentials for testing, which was silently being ignored 2019-07-04 10:13:21 -07:00
Jarek Kowalski
2512b7edeb refactored common bits of blob providers that use sharding (filesystem,webdav and upcoming sftp) into shared package 2019-07-01 18:32:38 -07:00
Jarek Kowalski
d569e6e12d added forgotten GA snippet 2019-06-23 12:18:17 -07:00
Jarek Kowalski
caad03b12c getting started guide v0.3.0-rc1 2019-06-22 21:59:37 -07:00
Jarek Kowalski
22170b4832 cli: changed 'cache set' subcommand to support changing individual parameters 2019-06-11 22:08:52 -07:00
Jarek Kowalski
c4fd5bb606 go.mod: updated dependencies v0.3.0-pre10 2019-06-09 08:42:46 -07:00
Jarek Kowalski
23d979f290 deleted jsonstream 2019-06-08 22:47:05 -07:00
Jarek Kowalski
c9da993e7b snapshot: removed depdendency on jsonstream from dir reader and writer 2019-06-08 22:47:05 -07:00
Jarek Kowalski
0d89ae3f79 Changed upload allow specifying N previous manifests
This avoids re-hashing of files previously partially uploaded
no matter where the upload was interrupted.
2019-06-08 18:01:47 -07:00
Jarek Kowalski
ae1510b65c Deprecate hashcache and replace it with simply walking previous snapshot directory tree.
This cleans up the code a lot and removes many ugly hacks.
The performance is pretty reasonable and with separate metadata cache it's likely to stay that way.
2019-06-08 18:01:47 -07:00
Jarek Kowalski
9b87c32570 improved cache info command to show all caches 2019-06-08 17:42:44 -07:00
Jarek Kowalski
bf311400f4 Added separate cache for metadata.
All blocks with a non-empty prefix land in that cache which has its own
size and expires independently from content cache.
2019-06-08 11:57:23 -07:00
Jarek Kowalski
533ae88460 travis: added stress test 2019-06-03 06:56:38 -07:00
Jarek Kowalski
72520029b0 golangci-lint: added more linters
Also fixed pre-existing lint errors.
2019-06-02 22:56:57 -07:00
Jarek Kowalski
54edb97b3a refactoring: renamed repo/block to repo/content
Also introduced strongly typed content.ID and manifest.ID (instead of string)

This aligns identifiers across all layers of repository:

blob.ID
content.ID
object.ID
manifest.ID
2019-06-01 22:24:19 -07:00
Jarek Kowalski
916da07e0f deprecate block format v0 2019-06-01 16:40:51 -07:00
Jarek Kowalski
9e5d0beccd refactoring: renamed storage.Storage to blob.Storage
This updates the terminology everywhere - blocks become blobs and
`storage.Storage` becomes `blob.Storage`.

Also introduced blob.ID which is a specialized string type, that's
different from CABS block ID.

Also renamed CLI subcommands from `kopia storage` to `kopia blob`.

While at it introduced `block.ErrBlockNotFound` and
`object.ErrObjectNotFound` that do not leak from lower layers.
2019-06-01 14:10:35 -07:00
Jarek Kowalski
1a7a02ddbe cleanup imports by grouping all local imports together 2019-06-01 10:57:55 -07:00
Jarek Kowalski
63303904e1 switched remaining fmt.Errorf to errors.Wrap() 2019-06-01 10:57:05 -07:00
Jarek Kowalski
82345c2b9f Added support for encryption with padding.
This allows authenticated encryption, custom IVs and checksums.
Implemented SALSA20-HMAC and XSALSA20-HMAC which append HMAC-SHA256
checksum to the ciphertext.
2019-06-01 10:12:03 -07:00
Jarek Kowalski
a6377540e2 travis: switched to latest 1.12 version 2019-06-01 10:06:09 -07:00