Commit Graph

1359 Commits

Author SHA1 Message Date
Nick
14d50aaa50 [Robustness] Fix for kopia runner and custom working directory (#533)
* [Robustness] Fix for kopia runner and custom work dir

Apply fix similar to #293 for the robustness kopia runner.
Add control for runner working directory.
2020-08-14 17:32:45 -07:00
Jarek Kowalski
b4f28fb18f kopia-ui: added license ID and description 2020-08-14 16:25:08 -07:00
Jarek Kowalski
3f71aef13d apt: fixed matching unstable version numbers 2020-08-14 15:34:05 -07:00
Jarek Kowalski
b7872760e0 makefile: fixed BOTO_PATH 2020-08-14 14:33:58 -07:00
Jarek Kowalski
b381d31eb8 tools: added apt-publish tool that push to APT repository
The repository is in GCS and the script will automatically copy
DEB files from dist/ to the proper locations and will regenerate
APT package index.
2020-08-14 14:08:10 -07:00
Jarek Kowalski
6915e032b3 goreleaser: tweaks to support APT repositories
* build 32-bit arm DEB and RPM with armhf suffix
* change output files to use kopia version instead of TAG-next for snapshots
2020-08-14 14:08:10 -07:00
Nick
0c3ab1337e [Robustness] Fswalker should ignore host name (#531)
Fix fswalker to ignore hostname to allow reporting
on walks done across different hosts. Also prevent
Before and After walk data from printing to reduce log size.
2020-08-13 16:40:23 -07:00
Nick
7da4022cfd [refactor] Move robustness and engine packages (#528)
Perform minor refactor by moving robustness and engine packages
in preparation for later PRs

Fix import path
2020-08-13 14:56:44 -07:00
Jarek Kowalski
9a6dea898b Linter upgrade to v1.30.0 (#526)
* fixed godot linter errors
* reformatted source with gofumpt
* disabled some linters
* fixed nolintlint warnings
* fixed gci warnings
* lint: fixed 'nestif' warnings
* lint: fixed 'exhaustive' warnings
* lint: fixed 'gocritic' warnings
* lint: fixed 'noctx' warnings
* lint: fixed 'wsl' warnings
* lint: fixed 'goerr113' warnings
* lint: fixed 'gosec' warnings
* lint: upgraded linter to 1.30.0
* lint: more 'exhaustive' warnings

Co-authored-by: Nick <nick@kasten.io>
2020-08-12 19:28:53 -07:00
Jarek Kowalski
b73db25e78 kopia-ui: roll back electron to v7.1.14 (upgraded in cfa30f2) since it's crashing on Ubuntu (#530) v0.6.1 2020-08-12 18:33:23 -07:00
Jarek Kowalski
984480908b Updated documentation for v0.6.0 release (#525)
* cli: small tweaks to kopia server mode

  * print SHA256 certficate thumbprint for auto-generated certs.
  * client will accept both upper- and lowercase thumbprint values

* site: updated documentation for v0.6.0 release

Co-authored-by: Julio López <julio+gh@kasten.io>
v0.6.0
2020-08-10 21:11:48 -07:00
Jarek Kowalski
bb2434dc28 upload: auto-ignore kopia cache directories when creating snapshots (#524)
This creates a marker file named `.kopia-cache` in the directory
that is the root of cache. When the uploader finds this file, it will
treat the entire directory as if it were empty.

This allows excluding directory caches from entire home and root
directories.
2020-08-10 11:19:54 -07:00
Jarek Kowalski
505ab92e21 Support for repository sync (#522)
* blob: added DisplayName() method to blob.Storage

* cli: added 'kopia repo sync-to <provider>' which replicates BLOBs

Usage demo: https://asciinema.org/a/352299

Fixes #509

* implemented suggestion by Ciantic to fail sync if the destination repository is not compatible with the source

* cli: added 'kopia repo sync --must-exist'

This ensures that target repository is not empty, otherwise syncing to
an accidentally unmounted filesystem directory might copy everything
again.
2020-08-09 12:36:41 -07:00
Michal Guerquin
d0e631a7a7 fix typo in url (#523)
This makes the link render correctly.
2020-08-08 12:07:18 -07:00
Jarek Kowalski
b995a1d015 app: Disabled progress percentage display above 100% (#521)
Fixes #513
2020-08-07 21:03:55 -07:00
Jarek Kowalski
04fdd0105e Fix for policy manager not setting labels in some cases (#517)
* cli: fixed 'kopia policy rm' deleting global when passed policy ID

* policy: additional unit test coverage for policy manager

* fixed path parsing logic to avoid the use filepath package which is platform-dependent, added more tests
v0.6.0-rc4
2020-08-06 21:25:48 -07:00
Nick
8532e843cc Fix #516 - Chown not suported on Windows (#518)
Proposed fix for #516: Do not attempt to call `os.Chown` on Windows. The
command is unsupported on windows and will always return
`syscall.EWINDOWS`.

Handling for user ID and group ID on Windows already hardcodes
both values to zero. If a snapshot is restored with non-zero UID/GID
values (for instance if the snapshot was created on a different OS),
filesystem entries will be restored without changing UID/GID, resulting
in a state similar to how they would look if the snapshot was
taken on Windows in the first place.
2020-08-05 18:32:53 -07:00
Nick
7867513732 [Fix #519] Fix pack blob parse in TestRestoreFail (#520)
Fix parsing of pack blob ID by using a specific regex
instead of a strings.Contains. This prevents the test from
misidentifying other blob IDs as pack blobs, such as
`kopia.maintenance`.
2020-08-05 18:31:48 -07:00
Jarek Kowalski
9de7348a75 cli: auto-upgrade the repository to 0.6.0 (#512)
On first 'kopia snapshot' or 'kopia server' use where the 'maintenance'
manifest cannot be found, we create a default one and display usage
note.
2020-08-04 23:53:18 -07:00
Jarek Kowalski
04254b68db Upgrade build-time dependencies (#510)
* goreleaser: upgraded to v1.140.1
* site: upgrade to latest Hugo, fixed deprecation warnings
* app: upgraded NPM dependencies to latest version to address some low-severity vulnerabilities
2020-08-04 15:54:05 -07:00
Jarek Kowalski
eea6b466af maintenance: fixed scheduling of quick maintenance (#507)
* maintenance: fixed scheduling of quick maintenance

* Makefile: increase unit test timeouts
v0.6.0-rc3
2020-08-01 06:57:10 -07:00
Jarek Kowalski
fca8155283 update_check: clean up version numbers to always include 'v' prefix 2020-07-31 22:35:20 -07:00
Jarek Kowalski
bc0df1e58e app: removed extra 'v' from KopiaUI window captions 2020-07-31 22:35:20 -07:00
Jarek Kowalski
40acf238f3 Fixed arm and arm64 build. (#506)
* fixed a number of cases where misaligned data was causing panics on armv7 (but not armv8)
* travis: enable arm64
* test: reduce compressed data sizes when running on arm
* arm: wait longer for snapshots
v0.6.0-rc2
2020-07-30 17:31:28 -07:00
Jarek Kowalski
cfa30f2e45 switched back to using v-prefixed tag names.
KOPIA_VERSION will now always be v-prefixed and we will strip the
prefix before embedding it in KopiaUI manifest.

Also upgraded Node and app NPM dependencies to latest versions.
v0.6.0-rc1
2020-07-25 17:22:35 -07:00
Jarek Kowalski
ff244b54ff go.mod: upgrade github.com/klauspost/compress to v1.10.10
See https://github.com/klauspost/compress/issues/272#issuecomment-663567344

Fixes #490.
2020-07-24 08:23:16 -07:00
Jarek Kowalski
8ead49b779 restore: support for zip, tar and tar.gz restore outputs (#482)
* restore: support for zip, tar and tar.gz restore outputs

Moved restore functionality to its own package.

* Fix enum values in the 'mode' flag

Co-authored-by: Julio López <julio+gh@kasten.io>
2020-07-22 22:56:11 -07:00
Jarek Kowalski
52e763158b kopia-ui: fixed missing 'log' when clicking 'Launch At Startup' 2020-07-21 22:12:52 -07:00
Jarek Kowalski
7e9ce61f9e server: automatically flush the repository after setting or deleting a policy (#489)
Fixes #479
2020-07-20 20:59:21 -07:00
Jarek Kowalski
a544e0c32b kopia-ui: Added logging when waiting for notarization response from Apple.
Fixed #488
2020-07-18 15:49:15 -07:00
Jarek Kowalski
2c21582ef2 kopia-ui: added option to disable TLS and force HTTP
Fixes #476
2020-07-18 15:35:20 -07:00
Jarek Kowalski
73ed5adb01 kopia-ui: cleaned up console logging 2020-07-18 14:11:33 -07:00
darkdragon-001
8c941ccd4b Fix BUILD.md (#481)
Fix `make` command for `kopia-ui`.
2020-07-18 12:11:01 -07:00
Jarek Kowalski
0b2d12dfac kopia-ui: build deb and rpm packages
Fixes #478
2020-07-17 20:03:37 -07:00
Nick
ce5e6dcd13 [Robustness] Add first robustness tests
Add two tests:
- TestManySmallFiles: writes 100k files size 4k to a directory. Snapshots the data tree, restores and validates data.
- TestModifyWorkload: Loops over a simple randomized workload. Performs a series of random file writes to some random sub-directories, then takes a snapshot of the data tree. All snapshots taken during this test are restore-verified at the end.

A global test engine is instantiated in main_test.go, to be used in the robustness test suite across tests (saves time loading/saving metadata once per run instead of per test).
2020-07-14 22:37:11 -07:00
Nick
82a2fa0ea5 [Robustness] Add test engine to manage snapshot verification testing (#468)
* Add test engine to manage snapshot verification testing

Test engine manages the test and metadata repositories, snapshot
checker, metadata storage persistence, and file writer. It is
the high level helper that will be invoked in the snapshot
verification testing suite.

- modify data directory file structure
- issue snapshot/restore/delete to the data directory
- accumulate metadata over the course of the test suite
- flush accumulated metadata to the metadata repository
- load historical metadata from the repository on initialization
- perform automatic data integrity verification on snap restore

This change corresponds to the robustness execution engine component from the design documentation.
2020-06-27 23:46:37 -07:00
Jarek Kowalski
d44c01fabb content: do not short circuit compaction if there's one index but there are contents to delete 2020-06-24 08:39:56 -07:00
Jarek Kowalski
64a6cb42dc parallelwork: fixed error handling, which caused parallel work to never finish on any error 2020-06-24 08:39:56 -07:00
Jarek Kowalski
1c2534199c cli: fixed panic() during snapshot verification caused by refactoring to new Repository interface 2020-06-24 08:39:56 -07:00
Jarek Kowalski
3843ed6727 cli: added content verify --include-deleted flag 2020-06-24 08:39:56 -07:00
Jarek Kowalski
ed9511bae1 b2: fix GetMetadata() implementation
Fixes #459
2020-06-08 19:00:51 -07:00
Jarek Kowalski
25934a544d content: fixed deletion of cleanup blobs (#462)
* content: ensure that cleanup blobs have unique contents to prevent situation where they keep getting rewritten and thus never deleted

* cli: added '--decrypt' option to 'kopia blob show'
2020-06-08 08:14:01 -07:00
Jarek Kowalski
79757672ca server: implemented 'flush' and 'refresh' API
Added test that verifies that when client performs Flush (which happens
at the end of each snapshot and when repository is closed), the
server writes new blobs to the storage.

Fixes #464
2020-06-07 19:38:13 -07:00
Jarek Kowalski
293cb10471 cosmetic changes to maintenance behavior (#461)
- run maintenance even if the command is about to return an error
  (otherwise if folks have persistent error causing snapshots to fail
  they will never run maintenance)
- disable progress output after snapshotting so that
  'kopia snapshot --all' output is clean
2020-06-01 23:38:18 -07:00
Pavan Navarathna
c13b5f820f Remove extra whitespaces and fix minor typos (#460) 2020-06-01 13:40:57 -07:00
Samuel BENARD
85aa4ae6e5 Add 'repositories' page (#454)
Add sftp and webdav as repositories to "Getting started" documentation page, "Setting Up Repository" chapter.

Add repositories list and usage examples to doc.
2020-06-01 01:08:58 -07:00
Julio Lopez
deb1099c52 Trivial: remove unused logging.Option type 2020-06-01 00:59:51 -07:00
Jarek Kowalski
6bc47cb399 content: emit warning whenever the number of index blobs gets too high, which is an indication that maintenance has not run in a long time 2020-06-01 00:57:32 -07:00
Jarek Kowalski
960c33475e maintenance: disabled automatic compaction on repository opening
instead moved to run as part of maintenance ('kopia maintenance run')

added 'kopia maintenance run --force' flag which runs maintenance even
if not owned
2020-06-01 00:57:32 -07:00
Julio López
6cb970f156 Revert "Fix #360: Leverage Go 1.14 testing.T.Cleanup() (#455)" (#458)
This reverts commit 73b913c (#455)

Pulled the trigger too soon.
2020-05-31 22:39:39 -07:00