Commit Graph

1275 Commits

Author SHA1 Message Date
Julio Lopez
e50b5ec2cd Trivial: Add package alias to silence IDE/gopls warning 2020-04-10 17:22:49 -07:00
Jarek Kowalski
1f1682b2cc Snapshot checkpointing (#410)
* snapshot: support for periodic checkpointing of snapshots in progress

For each snapshot that takes longer than 45 minutes, we trigger
internal cancellation, save the manifest and restart the snapshot
at which point all files will be cached.

This helps ensure the property that no file or directory objects
in the repository remain unreachable from a snapshot root for more than
one hour, which is important from GC perspective.

* nit: unified spelling 'cancelled' => 'canceled'
2020-04-07 17:54:21 -07:00
Jarek Kowalski
70d4c8764a cli: improvements to content selection for list/rewrite/stats/verify (#409)
They now uniformly support 3 flags:

--prefix=P       selects contents with the specified prefix
--prefixed       selects contents with ANY prefix
--non-prefixed   selects non-prefixed contents

Also changed content manager iteration API to support ranges.

cli: add --prefix to 'blob gc' and 'blob stats'
2020-04-06 18:43:41 -07:00
Jarek Kowalski
057c2789d8 Kopia UI: support for multiple repositories + portability (#398)
* server: when serving HTML UI, prefix the title with string from KOPIA_UI_TITLE_PREFIX envar

* kopia-ui: support for multiple repositories + portability

This is a major rewrite of the app/ codebase which changes
how configuration for repositories is maintained and how it flows
through the component hierarchy.

Portable mode is enabled by creating 'repositories' subdirectory before
launching the app.

on macOS:
  <parent>/KopiaUI.app
  <parent>/repositories/

On Windows, option #1 - nested directory
  <parent>\KopiaUI.exe
  <parent>\repositories\

On Windows, option #2 - parallel directory
  <parent>\some-dir\KopiaUI.exe
  <parent>\repositories\

In portable mode, repositories will have 'cache' and 'logs' nested
in it.
2020-04-04 17:18:37 -07:00
Jarek Kowalski
45195fabce appveyor: moved WINDOWS_CERT_SHA1 to secure variable so that we don't sign PRs 2020-04-04 12:01:46 -07:00
Jarek Kowalski
c89b1a7c87 appveyor: added GH_TOKEN variable, disabled RDP 2020-04-03 23:56:40 -07:00
Jarek Kowalski
01f52f8c05 appveyor: fixed secure variable 2020-04-03 23:45:53 -07:00
Jarek Kowalski
24f6720c61 enable RDP on appveyor worker until it's stable 2020-04-03 23:42:12 -07:00
Jarek Kowalski
0017f59add Makefile: fix travis-setup on Windows 2020-04-03 23:11:29 -07:00
Jarek Kowalski
2055fe3cca Makefile: support Windows Appveyor environment (#407)
* Makefile: support Windows Appveyor environment

* appveyor: added .appveyor.yml

* travis: disable windows environment

* Makefile: do not run vet-time-inject on Windows

* Makefile: removed the use of backtick invocation of subshell which does not work on windows

* Makefile: make integration-tests work on Windows outside of Travis
2020-04-03 23:03:42 -07:00
Jarek Kowalski
16275a15b7 Makefile: changed how build number is calculated
Instead of taking timestamp + TRAVIS_BUILD_NUMBER at build time,
we take the time of the commit, to be deterministic. This requires
a little bit of makefile magic to strip leading zeroes to make the
version number that's semver compliant.

This will allow coordinating the build between different CI tools,
so that Windows can be built on AppVeyor and macOS/Linux on Travis CI.
2020-04-02 22:05:37 -07:00
Jarek Kowalski
37b69d8e23 site: tweaked layout and options for cookie consent popup 2020-04-02 08:17:35 -07:00
Jarek Kowalski
e0984641ba improved logging for sign.js 2020-03-31 21:21:32 -07:00
Jarek Kowalski
6ad927384b travis: setup tools to support signing Windows binaries 2020-03-31 19:41:55 -07:00
Jarek Kowalski
05ea35fcff testing: retry around B2 test 2020-03-31 08:06:43 -07:00
Andreas Schneider
567bd33e8a added b2 to repository creation ui 2020-03-28 09:07:44 -07:00
Andreas Schneider
4bed45114d implemented b2 backend 2020-03-28 09:07:44 -07:00
Julio López
3924fb247a Minor cleanup for snapshot time override (#392)
* Simplify cli.parseTimestamp
* nit: move duration var closer to where it is used
2020-03-27 00:19:16 -07:00
Jarek Kowalski
6cb9b8fa4f repo: refactored public API (#318)
* This is 99% mechanical:

Extracted repo.Repository interface that only exposes high-level object and manifest management methods, but not blob nor content management.

Renamed old *repo.Repository to *repo.DirectRepository

Reviewed codebase to only depend on repo.Repository as much as possible, but added way for low-level CLI commands to use DirectRepository.

* PR fixes
2020-03-26 08:04:01 -07:00
Jarek Kowalski
10bb492926 repo: deprecated NONE algorithm, will not be available for new repositories (#395)
* repo: deprecated NONE algorithm, will not be available for new repositories

Co-authored-by: Julio López <julio+gh@kasten.io>
2020-03-24 23:19:20 -07:00
Jarek Kowalski
60977812f0 Support for gather writes (#373)
, where blob.Storage.PutBlob gets a list of slices and writes them sequentially 
* performance: added gather.Bytes and gather.WriteBuffer

They are similar to bytes.Buffer but instead of managing a single
byte slice, they maintain a list of slices that and when they run out of
space they allocate new fixed-size slice from a free list.

This helps keep memory allocations completely under control regardless
of the size of data written.

* switch from byte slices and bytes.Buffer to gather.Bytes.

This is mostly mechanical, the only cases where it's not involve blob
storage providers, where we leverage the fact that we don't need to
ever concatenate the slices into one and instead we can do gather
writes.

* PR feedback
2020-03-24 15:05:52 -07:00
Jarek Kowalski
b08d394864 policy: deduplicate multiple policies for the same source in policy manager, fixes #391 2020-03-23 23:52:23 -07:00
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