Commit Graph

1253 Commits

Author SHA1 Message Date
Nick
393d273e5a Policy set: fix nil pointer dereference #385 (#387)
* Policy set: fix nil pointer dereference #385
2020-03-23 18:32:36 -07:00
Jarek Kowalski
ea510f30fa repo: fixed race condition during Open() where we may read incomplete file 2020-03-23 18:14:33 -07:00
Jarek Kowalski
f2e6d51530 repo: persist relative path to cache if possible, this allows config directory to be partially portable 2020-03-22 15:36:43 -07:00
Jarek Kowalski
9b68a631e6 Highlight snapshot errors in the UI and CLI (#376)
* upload: exposed numFailed and failedEntries on directory summary

* cli: better present snapshot errors

* htmlui: display snapshot errors
2020-03-22 14:18:47 -07:00
Jarek Kowalski
8687f1c008 object: added AsyncWrites to ObjectWriter, which improves performance… (#369)
* object: added AsyncWrites to ObjectWriter, which improves performance of uploading of a single file

Fixes #351

Co-Authored-By: Julio López <julio+gh@kasten.io>
2020-03-22 09:02:33 -07:00
Jarek Kowalski
2e7fe7c2b3 travis: switch osx to xcode11.3 2020-03-21 22:24:55 -07:00
badrelmers
e86e8970a1 fix makefile for windows (#377)
solve https://github.com/kopia/kopia/issues/375
2020-03-21 18:59:50 -07:00
Seb Patane
6789f8e64c cli: allow override of snapshot start time and end time 2020-03-21 09:27:32 -07:00
Onkar Bhat
a1f7a068de Add CLI option for disabling tls verification while connecting to s3 (#370)
* Add CLI option for disabling tls verification while connecting to s3
2020-03-19 17:21:47 -07:00
badrelmers
1df5c81d12 correct a typo in Doc 2020-03-19 07:44:32 -07:00
badrelmers
73e21e0129 correct a typo in kopia UI
solve https://github.com/kopia/kopia/issues/366
2020-03-19 07:44:32 -07:00
Jarek Kowalski
239d809075 performance: introduced buf.Pool which helps reuse memory buffers (#345)
* performance: added buf.Pool which can be used to manage ephemeral buffers for encryption and compression
* repo: switched object writer to buf.Pool
* content: switched encryption to use buf.Pool
* object: switched compression to use buf.Pool
* testing: added missing content manager Close()
2020-03-18 20:42:16 -07:00
Jarek Kowalski
becf08af8a testing: added missing condition variable broadcast after finishing flushing, fixes timeouts on Travis 2020-03-17 21:32:43 -07:00
Jarek Kowalski
4a444e6cfe content: reduce allocations in index scan 2020-03-17 19:26:52 -07:00
Jarek Kowalski
169f25c88d s3: pass blob length to minio in PutBlob()
also added retry loop
2020-03-17 19:26:52 -07:00
Jarek Kowalski
b5d44215a1 upload: added missing writer.Close() 2020-03-17 19:26:52 -07:00
Jarek Kowalski
b1020941dd splitter: exposed MaxSegmentSize() for splitters 2020-03-17 18:07:10 -07:00
Jarek Kowalski
4564ed5ac1 encryption: added MaxOverhead to encryptor 2020-03-17 18:07:10 -07:00
Jarek Kowalski
101b9d3df8 test: fixed test issue where we were trying to dump contents of encrypted indexes and randomly failing 2020-03-17 18:07:10 -07:00
Jarek Kowalski
c9877bf130 performance: refactored content manager to avoid copying data
Previously we would store special field Payload for contents
that were added but never flushed to the store and it was not
encrypted. This required special handling different for pending
vs flushed contents.

This change maintains pending pack buffer ready to be flushed
and appends encrypted contents to it, which avoids data copying.
The buffers are pooled to avoid allocations.
2020-03-17 18:07:10 -07:00
Jarek Kowalski
53a59263f3 content: wait for cache sweep goroutine to close (#361)
Also fixed couple cases where we were not closing content manager
2020-03-17 11:38:41 -07:00
Jarek Kowalski
d930f06a27 cli: added flags to control progress output
--no-progress - disables progress completely
--progress-update-interval=T - controls how frequently progress is updated

Fixes #344
2020-03-17 05:11:42 -07:00
Jarek Kowalski
06fbaba15b testing: ensure cleanup of content managers, fixes #356 2020-03-16 17:07:05 -07:00
Jarek Kowalski
272b657508 upgrade all dependencies to latest versions 2020-03-15 23:40:58 -07:00
Jarek Kowalski
a8ef0b2b79 kopia-ui: fixed auto-update 2020-03-14 18:56:32 -07:00
Jarek Kowalski
4088eb51a8 site: updated CDN links for cookie consent 2020-03-14 17:47:45 -07:00
Jarek Kowalski
c150767136 site: added cookie consent form 2020-03-14 17:09:13 -07:00
Jarek Kowalski
674543eb91 site: added simple privacy policy
based on https://www.house.gov/privacy-policy/
2020-03-14 17:09:13 -07:00
Jarek Kowalski
331ff076bb cli: added number of files that are in the process of being hashed 2020-03-14 15:56:09 -07:00
Nick
78a921ab2c Rename Simple mutex 2020-03-14 12:00:22 -07:00
Nick
60d1cc821a [robustness testing] Implement metadata store for test metadata using kopia
Add an implementation of the metadata store using kopia snapshots and restores to manage persistence of walk metadata. Metadata are stored to and retrieved from the store, and a mechanism for persisting the store is implemented using kopia snapshots.
2020-03-14 12:00:22 -07:00
Jarek Kowalski
6b04b42794 tests: added smoke test that exercises all combinations of encryption and hashing 2020-03-13 20:42:12 -07:00
Jarek Kowalski
e2a169d2e8 hotfix: kopia-0.5.0 did not properly support 256-bit hashes 2020-03-13 20:42:12 -07:00
Jarek Kowalski
8d452a8285 performance: improvements to object manager (#336)
- added pooled splitters and ability to reset them without having to recreate
- added support for caller-provided compressor output to be able to pool it
- added pooling of compressor instances, since those are costly
2020-03-13 08:56:18 -07:00
Jarek Kowalski
526445a9c8 CLI: pre-allocated buffers for crypto benchmark (#343)
non-optimized (0.5.0)
  0. BLAKE2B-256-128      AES256-GCM-HMAC-SHA256 644.9 MiB / second

before this change:
  0. BLAKE2B-256-128      AES256-GCM-HMAC-SHA256 655.9 MiB / second

after (this change):
  0. BLAKE2B-256-128      AES256-GCM-HMAC-SHA256 781.5 MiB / second
2020-03-12 12:11:20 -07:00
Jarek Kowalski
e80f5536c3 performance: plumbed through output buffer to encryption and hashing,… (#333)
* performance: plumbed through output buffer to encryption and hashing, so that the caller can pre-allocate/reuse it

* testing: fixed how we do comparison of byte slices to account for possible nils, which can be returned from encryption
2020-03-12 08:27:44 -07:00
Jarek Kowalski
0d1a627dcb Improved upload performance and memory usage (#331)
Upload: reduced memory usage during uploads
Replaced custom work item management with much simpler solution.

Upload: added pooling of upload buffers
This reduces a lot of allocations and GC pressure.

In a test of 2 dirs x 100K files x 100 bytes each, allocated bytes
went from 27 GB to 20 GB.

This improves #93
2020-03-12 00:27:51 -07:00
Julio López
89c0c6bac4 Refactor CLI stats (#341)
* Helper package internal/stats
* Use internal/stats for blob gc stats
* Use internal/stats for content list stats
* Refactor gc stats
  - Leverages internal/stats package
  - Return GC stats
  - nit: error message formatting
  - Refactor block in gc.Run.
     Simplifies and reduces a level of indentation
2020-03-11 22:16:07 -07:00
Niraj Tolia
71e556304e Fix download link (#342) 2020-03-11 22:08:36 -07:00
Jarek Kowalski
6ce8410a29 Added OpenCensus (#339)
* repo: added some initial metrics using OpenCensus

* cli: added flags to expose Prometheus metrics on a local endpoint

`--metrics-listen-addr=localhost:X` exposes prometheus metrics on
   http://localhost:X/metrics

Also, kopia server will automatically expose /metrics endpoint on the
same port it runs as, without authentication.
2020-03-11 22:07:31 -07:00
Julio López
edc87fcce8 Refactor content stats (#340)
* Remove unused fields from content.Stats
* Refactor content.Stats
2020-03-11 21:47:05 -07:00
Jarek Kowalski
9c3d419bc3 Fixed social site logo - alternative #2 (#335)
* site: fixed twitter image

* site: trying different twitter card style
2020-03-10 23:13:47 -07:00
Jarek Kowalski
514df69afa performance: added wrapper around io.Copy()
this pools copy buffers so they can be reused instead of throwing away
after each io.Copy()
2020-03-10 21:52:30 -07:00
Jarek Kowalski
ec56ed3d70 Makefile: fixed layering test 2020-03-10 17:43:56 -07:00
Jarek Kowalski
f07d164829 Makefile: added layering-test, fixes #324 2020-03-10 13:18:23 -07:00
Nick
05852322da Add snapshotter interface and kopia implementation
Snapshotter interface describes an entity that can create,
restore, and delete snapshots, as well as manage a repository.

Add kopia implementation of the snapshotter interface.
2020-03-10 07:32:14 -07:00
Julio López
d9ce3d0ad6 Inject time in Kopia components (#314)
Motivation: Allow time injection for (unit) tests, to more easily test and
verify time-dependent invariants.

Add time injection support for:

* repo.Manager
* manifest.Manager
* snapshot.Uploader

Then, wire up to these components. The content.Manager already had support for
time injection, but was not wired up from the time function passed to repo creation.

Add an internal/faketime package for testing. Mainly code movement from testing
code in the repo/content package. Motivation: make it available to other packages
outside content Also, add simple tests for faketime functions.
2020-03-10 00:42:10 -07:00
Jarek Kowalski
5f96b0240a testing: added retry helper 2020-03-09 21:34:10 -07:00
Jarek Kowalski
bd3cace737 site: changed Community page to make it more obvious how to get to Slack and GitHub 2020-03-09 20:09:19 -07:00
Julio López
88ce341a40 Trivial cleanup for internal diff (#316)
* Prefer filepath.Join
* Remove downloadFile's receiver parameter
2020-03-09 18:18:42 -07:00