Commit Graph

1983 Commits

Author SHA1 Message Date
dependabot[bot]
05ddfb512c build(deps): bump github.com/tg123/go-htpasswd from 1.1.0 to 1.2.0 (#1466)
Bumps [github.com/tg123/go-htpasswd](https://github.com/tg123/go-htpasswd) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/tg123/go-htpasswd/releases)
- [Commits](https://github.com/tg123/go-htpasswd/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/tg123/go-htpasswd
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-02 22:58:38 -07:00
Jarek Kowalski
99e30355ef testing: do not run extensive provider validation testing against AWS and Wasabi, only tiny test (#1471) 2021-11-02 22:43:28 -07:00
t-rutter
b156ff7606 ci: fix Homebrew upgrade/cleanup warning (#1447) 2021-10-25 20:28:23 -07:00
Jarek Kowalski
0d0f48a7ee clock: discard monotonic clock component in clock.Now() (#1437)
The dual time measurement is described in
https://go.googlesource.com/proposal/+/master/design/12914-monotonic.md

The fix is to discard hidden monotonic time component of time.Time
by converting to unix time and back.

Reviewed usage of clock.Now() and replaced with timetrack.StartTimer()
when measuring time.

The problem in #1402 was that passage of time was measured using
the monotonic time and not wall clock time. When the computer goes
to sleep, monotonic time is still monotonic while wall clock time makes
a leap when the computer wakes up. This is the behavior that
epoch manager (and most other compontents in Kopia) rely upon.

Fixes #1402

Co-authored-by: Julio Lopez <julio+gh@kasten.io>
v0.9.4
2021-10-22 15:35:09 -07:00
Jarek Kowalski
c8c433fb60 cli: when migrating snapshot honor destination policies (#1433)
In particular this applies compression based on destination repository
policies.

By default ignore rules are disabled during migration to preserve all
files, but that can be optionally enabled using '--apply-ignore-rules'.

Fixes #1429
2021-10-21 22:12:06 -07:00
Jarek Kowalski
39a195c6f7 cli: clarified usage of 'policy set --snapshot-time` (#1430)
Fixes #1426
2021-10-20 09:04:44 -07:00
Jarek Kowalski
76533246b4 sftp: support for password authentication (#1425)
Fixes #1373
2021-10-20 07:33:24 -07:00
Jarek Kowalski
fa2a931891 ui: fixed the refresh button in source list (#1428) 2021-10-20 06:58:37 -07:00
Jarek Kowalski
52837d12dd site: rewrote upgrade safety notice (#1424) 2021-10-19 19:24:00 -07:00
Jarek Kowalski
3c4cf33376 cli: 'repo sync-to' will compare only unique ID not the entire format (#1423)
This allows it to tolerate format changes, such as the ones made
during upgrade.

Fixes #1421
2021-10-19 09:22:57 -07:00
Robert Schindler
3e43f8e76f Migrate: pick latest instead of oldest snapshot with --latest-only (#1420)
Fix #1414
2021-10-19 08:56:35 -07:00
Jarek Kowalski
3a40cc621f epoch: do not fail on moving deletion watermark backwards (#1422)
This is a legitimate possiblity if someone uses `--safety=none` followed
by regular maintenance.

Fixes #1312
2021-10-19 08:17:58 -07:00
Jarek Kowalski
789a739a5b server: fixed next snapshot time computation (#1418)
Fixes #1405

Moved logic to SchedulingPolicy, added unit tests.
2021-10-18 22:55:11 -07:00
Jarek Kowalski
d5c619f98d epoch: additional logging to get to the bottom of #1402 (#1417) 2021-10-18 22:39:18 -07:00
Jarek Kowalski
97e05f996e cli: benchmark compressor memory usage (#1416) 2021-10-18 21:39:00 -07:00
Jarek Kowalski
e96ddc6105 upload: fix ignoring files after action redirects snapshot directory (#1409)
Fixes #1399
Fixes #1346
v0.9.3
2021-10-17 23:02:00 -07:00
Jarek Kowalski
24d8eb75da epoch: increase epoch time and cleanup safety margin (#1407)
Reduces likelihood of #1402 until we fix the root cause.
2021-10-17 22:31:56 -07:00
Jarek Kowalski
7f98c49edc epoch: when doing background compaction and cleanup work, ignore cancelation signal (#1406)
This would frequently prevent the actual compaction from being done
leading to performance degradation.
2021-10-17 20:14:25 -07:00
Jarek Kowalski
d3568a6fdb cli: added 'index inspect --parallel' flag (#1404) 2021-10-17 18:35:21 -07:00
Jarek Kowalski
64af1396f6 mount: fixed name escaping and added disambiguation (#1403)
Fixes #1400
Fixes #1050
2021-10-17 16:32:54 -07:00
Jarek Kowalski
191a51b278 ui: fixed snapshotting UNC roots (#1401)
This was caused by additional resolution of path names only done in UI,
which caused \\hostname\share to be treated as relative and resolved
against the home directory.

Fixes #1385
Fixes #1362
2021-10-17 13:25:12 -07:00
Jarek Kowalski
d9e0723fe4 actions: expose KOPIA_ACTION and KOPIA_VERSION environment variables (#1398)
Fixes #1394
2021-10-17 11:59:36 -07:00
Jarek Kowalski
5451a19296 cli: added 'snapshot delete --all-snapshots-for-source' (#1397) 2021-10-17 09:46:44 -07:00
Jarek Kowalski
c8b8dc9ec7 localfs: added ReadDir() benchmark (#1396)
$ go test -benchmem -count 5 -benchtime 5s -run=^$ -bench "^BenchmarkReadDir.*$" ./fs/localfs

goos: darwin
goarch: amd64
pkg: github.com/kopia/kopia/fs/localfs
cpu: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
BenchmarkReadDir0-8       	  206330	     28408 ns/op	    1880 B/op	      11 allocs/op
BenchmarkReadDir0-8       	  209636	     28399 ns/op	    1928 B/op	      11 allocs/op
BenchmarkReadDir0-8       	  208366	     28569 ns/op	    1880 B/op	      11 allocs/op
BenchmarkReadDir0-8       	  203073	     28888 ns/op	    1880 B/op	      11 allocs/op
BenchmarkReadDir0-8       	  209492	     28477 ns/op	    1928 B/op	      11 allocs/op
BenchmarkReadDir1-8       	  163614	     37236 ns/op	    3736 B/op	      21 allocs/op
BenchmarkReadDir1-8       	  151528	     38796 ns/op	    3736 B/op	      21 allocs/op
BenchmarkReadDir1-8       	  161023	     38420 ns/op	    3736 B/op	      21 allocs/op
BenchmarkReadDir1-8       	  153543	     37262 ns/op	    3736 B/op	      21 allocs/op
BenchmarkReadDir1-8       	  165090	     36362 ns/op	    3736 B/op	      21 allocs/op
BenchmarkReadDir2-8       	  137521	     43338 ns/op	    4456 B/op	      30 allocs/op
BenchmarkReadDir2-8       	  138085	     43866 ns/op	    4456 B/op	      30 allocs/op
BenchmarkReadDir2-8       	  136701	     43389 ns/op	    4456 B/op	      30 allocs/op
BenchmarkReadDir2-8       	  138116	     43342 ns/op	    4456 B/op	      30 allocs/op
BenchmarkReadDir2-8       	  138170	     43379 ns/op	    4456 B/op	      30 allocs/op
BenchmarkReadDir10-8      	   62124	     96602 ns/op	   10104 B/op	      76 allocs/op
BenchmarkReadDir10-8      	   60532	     97361 ns/op	   10104 B/op	      76 allocs/op
BenchmarkReadDir10-8      	   61009	     97615 ns/op	   10104 B/op	      76 allocs/op
BenchmarkReadDir10-8      	   62072	     96550 ns/op	   10104 B/op	      76 allocs/op
BenchmarkReadDir10-8      	   62220	     95925 ns/op	   10104 B/op	      76 allocs/op
BenchmarkReadDir100-8     	    8028	    716714 ns/op	   80763 B/op	     544 allocs/op
BenchmarkReadDir100-8     	    8066	    712266 ns/op	   80755 B/op	     544 allocs/op
BenchmarkReadDir100-8     	    8047	    712203 ns/op	   80755 B/op	     544 allocs/op
BenchmarkReadDir100-8     	    8107	    711148 ns/op	   80752 B/op	     544 allocs/op
BenchmarkReadDir100-8     	    8127	    709227 ns/op	   80753 B/op	     544 allocs/op
BenchmarkReadDir1000-8    	    1558	   3861176 ns/op	  689409 B/op	    5137 allocs/op
BenchmarkReadDir1000-8    	    1566	   3848730 ns/op	  689414 B/op	    5137 allocs/op
BenchmarkReadDir1000-8    	    1516	   3838727 ns/op	  689412 B/op	    5137 allocs/op
BenchmarkReadDir1000-8    	    1550	   3833432 ns/op	  689415 B/op	    5137 allocs/op
BenchmarkReadDir1000-8    	    1557	   3966338 ns/op	  689408 B/op	    5137 allocs/op
BenchmarkReadDir10000-8   	     178	  33901454 ns/op	 7282295 B/op	   51046 allocs/op
BenchmarkReadDir10000-8   	     177	  33865198 ns/op	 7282296 B/op	   51046 allocs/op
BenchmarkReadDir10000-8   	     172	  34687834 ns/op	 7282354 B/op	   51047 allocs/op
BenchmarkReadDir10000-8   	     174	  34483220 ns/op	 7282359 B/op	   51047 allocs/op
BenchmarkReadDir10000-8   	     178	  34227937 ns/op	 7282307 B/op	   51047 allocs/op
PASS
ok  	github.com/kopia/kopia/fs/localfs	268.048s
2021-10-16 10:14:18 -07:00
Jarek Kowalski
ff470ba67d site: mark v0.9 as stable, updated release docs (#1393) 2021-10-15 07:12:36 -07:00
Jarek Kowalski
5d9133a72b ci: switched code coverage tool to use GH action (#1391) 2021-10-14 23:51:28 -07:00
Jarek Kowalski
56cd086f92 kopia-ui: improved auto-update experience (#1390) v0.9.2 2021-10-14 23:21:07 -07:00
Jarek Kowalski
fba0956795 logging: fixed logging from parallel work queue (#1388)
Fixes #1387
2021-10-14 07:14:46 -07:00
Jarek Kowalski
97c4483cc9 testing: added tests for filesystem --flat option (#1384) v0.9.1 2021-10-13 21:21:55 -07:00
Jarek Kowalski
b7a4fa56bf retry: abort retry loop on context errors (#1383)
Fixes #1377
2021-10-13 19:10:02 -07:00
Jarek Kowalski
befaac501b rclone: pass directory shards to webdav client (#1382)
Fixes #1378
2021-10-13 19:09:13 -07:00
Jarek Kowalski
7ba2132b97 logging: fixed console timestamps to be local time, more nits (#1381) 2021-10-13 08:54:57 -07:00
Jarek Kowalski
51fdbf2048 nit: minor log output cleanups (#1380) 2021-10-13 06:07:18 -07:00
Jarek Kowalski
4a47bc3210 logging: switched from go-logging to zap (#1376)
This is much more efficient in terms of memory allocations
and speeds up backup due to less GC pressure.

Fixes #1345
2021-10-12 22:52:24 -07:00
CrendKing
6a991c180b Add doc for Amazon S3 .storageconfig (#1375)
* Add doc for Amazon S3 .storageconfig

* Rewrite about Glacier
2021-10-11 22:18:11 -07:00
Z
33c8733750 add unicode filename test, add env switches for long filenames/unicode filenames, update workflow file to include env variables (#1371) 2021-10-09 12:38:36 -07:00
Jarek Kowalski
8b760b66a8 logging: added memoization of Logger instances per context (#1369) 2021-10-09 05:02:18 -07:00
Julio Lopez
6472d171d4 Skip publishing artifacts on fork repos (#1364) v0.9.0 2021-10-07 08:42:40 -07:00
Jarek Kowalski
2fa7cfb042 localfs: fixed support for snapshotting UNC path root (\\server\path) (#1362)
Fixes #1288
Fixes #1035
Fixes #751
2021-10-06 20:27:45 -07:00
Eng Zer Jun
73e492c9db refactor: move from io/ioutil to io and os package (#1360)
* refactor: move from io/ioutil to io and os package

The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* chore: remove //nolint:gosec for os.ReadFile

At the time of this commit, the G304 rule of gosec does not include the
`os.ReadFile` function. We remove `//nolint:gosec` temporarily until
https://github.com/securego/gosec/pull/706 is merged.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-06 08:39:10 -07:00
Jarek Kowalski
3bb5b63289 sftp: fixed performance reggression due to connection management (#1359)
* sftp: fixed performance reggression due to connection management

The previous pooling was causing serialization of all requests, which
was too slow.

This change effectively reverts connection pooling but adds
automatic reconnection + unit tests.

* sftp: fixed unwanted retry on initial connection
2021-10-06 07:28:42 -07:00
Jarek Kowalski
aa44b70866 mount: fixed mounting of directories w/symlinks over WebDAV (#1358)
Directories containing symlinks could not be mounted on Windows and
were failing with 'invalid parameter'.

This change skips those entries and emits a warning to the console.

Symlinks appear to be unsupported in WebDAV at the protocol level
and servers usually follow symlinks server-side, which is not
feasible for Kopia. In the future we may be able to do more here, but
for now it's better to not show symlinks than not show anything.

Huge thanks to Joe Occhipinti for his help getting to the bottom of this
issue.
2021-10-05 21:23:08 -07:00
Z
46cf07aa7c add simple selector for #1320 (#1355) 2021-10-04 22:41:25 -07:00
CrendKing
93b9bf15b4 Support setting AWS S3 storage class for all types of blobs (#1335)
* Support setting AWS S3 storage class for all types of blobs

* Read .storageconfig file

* Improve loading logic

* Hide .storageconfig from ListBlobs()
v0.9.0-rc4
2021-10-03 19:01:39 -07:00
dependabot[bot]
cae1c44c9e build(deps): bump @testing-library/react in /htmlui (#1327)
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 12.0.0 to 12.1.1.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v12.0.0...v12.1.1)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-03 18:13:12 -07:00
CrendKing
e7297d7111 Remove unnecessary subdirectory from Windows archive (#1352)
* Remove unnecessary subdirectory from Windows archive

* Use Scoop extract_dir instead of changing archive structure
2021-10-03 18:10:54 -07:00
dependabot[bot]
118706cc27 build(deps): bump postcss from 8.3.6 to 8.3.8 in /htmlui (#1323)
Bumps [postcss](https://github.com/postcss/postcss) from 8.3.6 to 8.3.8.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.3.6...8.3.8)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-03 17:16:02 -07:00
Z
b105e1ecf3 add conditional to KopiaUI makefile to build arm64 and x64 versions (#1351) 2021-10-03 16:40:29 -07:00
Jarek Kowalski
0773af775d kopia-ui: always show default repository at the top of the list (#1349)
Also disable annoying behavior where we open all repository windows
on double click.
2021-10-03 12:04:17 -07:00
Jarek Kowalski
698d26bdbb localfs: reduce memory usage when scanning short directories (#1343)
* localfs: reduce memory usage when scanning short directories

We read first 100 entries to determine if the directory is short
before forking to goroutines. Also reduced goroutine count, 16 was way
too aggressive.

* localfs: fixed windows-specific behavior where os.Lstat() returns different timestamps than ReadDir()
2021-10-02 16:26:14 -07:00