Commit Graph

97 Commits

Author SHA1 Message Date
Jarek Kowalski
a461d767f7 cli: plumbed through 'textOutput' which controls stdout/stderr writers (#1053)
This is mostly for testability.
2021-05-06 20:26:35 -07:00
Jarek Kowalski
d2288c443f cli: major refactoring (#1046)
cli: major refactoring of how CLI commands are registered

The goal is to eliminate flags as global variables to allow for better
testing. Each command and subcommand and most sets of flags are now
their own struct with 'setup()' methods that attached the flags or
subcommand to the provided parent.

This change is 94.3% mechanical, but is fully organic and hand-made.

* introduced cli.appServices interface which provides the environment in which commands run
* remove auto-maintenance global flag
* removed globals in memory_tracking.go
* removed globals from cli_progress.go
* removed globals from the update_check.go
* moved configPath into TheApp
* removed remaining globals from config.go
* refactored logfile to get rid of global variables
* removed 'app' global variable
* linter fixes
* fixed password_*.go build
* fixed BSD build
2021-05-03 10:28:00 -07:00
Eric Cheng
1a7a016dfa Update full maintenance automation explanation (#1042)
Full maintenance is now enabled by default in >=0.8.0
2021-05-01 07:05:33 -07:00
Josef Vogt
5fcf3895ac Add documentation for nginx reverse proxy (#1033) 2021-04-29 17:21:52 -07:00
Jarek Kowalski
170d2a21f9 site: fixed Google indexing
Reported on https://kopia.discourse.group/t/site-unlisted-on-search-engines/417
See https://github.com/google/docsy/issues/217
2021-04-28 06:42:06 -07:00
ripytide
dd3933f13a Grammar fix. (#1023)
Another option could have been "which provide excellent features for *a* very reasonable price. Either grammar fix works but I personally prefer the plural version included in the PR.
2021-04-26 20:12:31 -07:00
Jarek Kowalski
922bc7cbc8 ci: refactored credentials handling (#987)
This strengthens credential handling after our signing keys may have
been leaked in the [codecov.io breach](https://about.codecov.io/security-update/)

* pass only minimal credentials to each build step to avoid
  exposing sensitive tokens to tools that don't need them
  (like code coverage)
* removed encrypted credential files and replaced with environment-based
* allow full ci/cd including publishing artifacts from forks
* regenerated all passwords, tokens and service accounts
* do not install Google Cloud SDK on GHA - it's already there
* moved RPM signing to 'Stage And Publish Artifacts' phase
* generated new GPG signing key

See https://kopia.discourse.group/t/important-impact-of-codecov-io-security-issue-on-kopia-build-pipeline/377
2021-04-16 08:17:13 -07:00
Jarek Kowalski
751aa3fa98 updated site for 0.8 release (#958) 2021-04-09 23:03:29 -07:00
Jarek Kowalski
e1daef2f4a site: fixed release notes URL 2021-04-02 22:26:56 -07:00
Jarek Kowalski
f8ba160f23 site: updated docs in preparation for 0.8.0-beta4 release 2021-04-02 22:18:44 -07:00
Jarek Kowalski
4d77bd109e ci: added publishing to test-builds Scoop bucket 2021-03-23 08:01:28 -07:00
Jarek Kowalski
a16a21418e site: installation instructions and updated release notes (#901) 2021-03-20 13:37:52 -07:00
Jarek Kowalski
3a94c16678 Dockerfile: switched to distroless, specified defaults environment variables for containerized kopia (#897)
* Dockerfile: specified reasonable defaults options for containerized kopia

* addressed pr comments, switched to gcr.io/distroless/static:nonroot

distroless has no executable code, so this requires KOPIA_PASSWORD
to always be provided via env, b/c distroless does not have
/bin/stty to disable TTY echo (we should not require that, BTW)

* site: added docker image documentation
2021-03-19 21:54:48 -07:00
Jarek Kowalski
cbcd59f18e Added repository user authorization support + server flag refactoring + refresh (#890)
* nit: replaced harcoded string constants with named constants

* acl: added management of ACL entries

* auth: implemented DefaultAuthorizer which uses ACLs if any entries are found in the system and falls back to LegacyAuthorizer if not

* cli: switch to DefaultAuthorizer when starting server

* cli: added ACL management

* server: refactored authenticator + added refresh

Authenticator is now an interface which also supports Refresh.

* authz: refactored authorizer to be an interface + added Refresh()

* server: refresh authentication and authorizer

* e2e tests for ACLs

* server: handling of SIGHUP to refresh authn/authz caches

* server: reorganized flags to specify auth options:

- removed '--allow-repository-users' - it's always on
- one of --without-password, --server-password or --random-password
  can be specified to specify password for the UI user
- htpasswd-file - can be specified to provide password for UI or remote
  users

* cli: moved 'kopia user' to 'kopia server user'

* server: allow all UI actions if no authenticator is set

* acl: removed priority until we have a better understood use case for it

* acl: added validation of allowed labels when adding ACL entries

* site: added docs for ACLs
2021-03-18 23:03:27 -07:00
Eric Cheng
52e8fb8957 Add Arch-specific installation instructions (#889) 2021-03-15 17:31:44 -07:00
Jarek Kowalski
236910981d site: updated release notes after v0.8.0-beta1 release, added breaking changes (#881) 2021-03-12 10:59:04 -08:00
Jarek Kowalski
951d7ce33b maintenance: enable full maintenance by default with 24h interval (#879)
Tweaked default message to print on repository creation.
2021-03-11 21:08:10 -08:00
Jarek Kowalski
f04ec7ebed site: preparing for 0.8 Release (#877)
* Added draft release notes for 0.8
* Moved some content to 'advanced' section.
* Added conceptual documentation for actions, caching and logging.
* Updated site footer.
2021-03-10 20:49:58 -08:00
Julio López
7bafe51dcc Replace go-bindata with //go:embed (#844)
* Replace htmlui_fallback.go with go:embed
* Replace go-bindata generated UI with go:embed
* Update site Go version to 1.16
* Update BUILD.md to reflect workflow with go:embed
2021-02-23 01:09:40 -08:00
CrendKing
d947f795f4 Add doc for mounting (#757)
Add link to docs for mount command on Windows
2021-01-03 10:36:55 -08:00
smiley
98b18a9c18 Fix typos in _index.md (#760) 2021-01-03 09:06:16 -08:00
Jarek Kowalski
e03971fc59 Upgraded linter to v1.33.0 (#734)
* linter: upgraded to 1.33, disabled some linters

* lint: fixed 'errorlint' errors

This ensures that all error comparisons use errors.Is() or errors.As().
We will be wrapping more errors going forward so it's important that
error checks are not strict everywhere.

Verified that there are no exceptions for errorlint linter which
guarantees that.

* lint: fixed or suppressed wrapcheck errors

* lint: nolintlint and misc cleanups

Co-authored-by: Julio López <julio+gh@kasten.io>
2020-12-21 22:39:22 -08:00
Jarek Kowalski
ad4b222939 cli: added support for copying (or moving) snapshot history (#703)
Both source and destination can be specified using user@host,
@host or user@host:/path where destination values override the
corresponding parts of the source, so both targeted
and mass copying is supported.

Supported combinations are:

Source:             Destination         Behavior
---------------------------------------------------
@host1              @host2              copy snapshots from all users of host1
user1@host1         @host2              copy all snapshots to user1@host2
user1@host1         user2@host2         copy all snapshots to user2@host2
user1@host1:/path1  @host2              copy to user1@host2:/path1
user1@host1:/path1  user2@host2         copy to user2@host2:/path1
user1@host1:/path1  user2@host2:/path2  copy snapshots from single path

When --move is specified, the matching source snapshots are also deleted.

* cli: upgraded kingpin to latest version (not tagged)

This allows using `EnableFileExpansion` to disable treating
arguments prefixed with "@" as file includes.
2020-12-04 16:34:55 -08:00
collectorgeneral
6cf6e4dc5d Update _index.md (#697)
Was reading the docs to do some tests and found a couple of missing words and punctuation. Submitting this PR to propose fixes to the one I found.
2020-11-08 09:36:03 -08:00
Julio López
090cd1cc4d Minor edits for SFTP documentation (#635) 2020-09-21 17:18:03 -07:00
Jarek Kowalski
d0d6ac4767 SFTP connectivity and docs improvements (#623)
* sftp: support for external SSH command and host verfication improvements

- removed custom parsing of hostnames and verification and replaced with
  standard 'knownhosts' implementation.

- added option to launch external SSH command which supports
  aliases, agent, etc.

NOTE, we're still not supporting any cases where password needs to be
entered on the command line, since that would be incompatible with
the UI which uses client-server model.

Fixes #500
Fixes #414

* site: updated SFTP repository connection instructions

Fixes #590
2020-09-20 11:10:13 -07:00
Jarek Kowalski
5784d68766 site: edited installation page and switched Download link to point at it (#603)
* site: edited installation page and switched Download link to point at it.

Emphasized the use of package managers to download and keep Kopia up-to-date.
Added instructions for using Scoop on Windows.

Co-authored-by: Julio López
2020-09-12 19:30:49 -07:00
Jarek Kowalski
4ef314bee5 Added RPM repository (#600)
* goreleaser: added signatures to RPM binaries

Currently goreleaser does not support it, so we're overriding
signing script and signing all RPMs that it produces.

Also changed goreleaser parameters to only publish binaries
when running on linux/amd64.

* build: added automatic publishing of RPMs to a YUM repository

Also fixed RPM file names to match local conventions.
2020-09-09 23:18:20 -07:00
Jarek Kowalski
bce4d78a6f site: fixed edit link (#568)
Fixes #567
2020-08-30 15:36:50 -07:00
phonovision
62c1a77520 Doc: fix create B2 repository cmd (#566)
Fix command line: "create" instead of "connect"
2020-08-30 15:22:54 -07:00
Jarek Kowalski
2011796897 website: added link to kopia forum (#561) 2020-08-28 12:31:53 -07:00
Julio López
5769b753b6 Minor doc edits (#549) 2020-08-17 22:28:07 -07:00
Jarek Kowalski
7ae823945c Experimental rclone backend (#545)
This will launch 'rclone webdav server' passing random TLS
certificate and username/password and serve predefined rclone
remote path.

This is very experimental, use with caution.

Fixes #313.

Additional / required changes:
* blob: (experimental) support for rclone provider
* server: refactored TLS utilities to separate package
* webdav: add support for specifying trusted TLS certificate fingerprint
* kopia-ui: added rclone support
2020-08-17 20:43:41 -07:00
Jarek Kowalski
f541734362 site: updated installation instructions now that we have APT repository (#534) 2020-08-14 19:13:04 -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
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>
2020-08-10 21:11:48 -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
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
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
Samuel BENARD
f3359d78f6 add sftp and webdav as repositories to "Getting started" documentation page, "Setting Up Repository" chapter 2020-05-12 17:12:11 -07:00
Jarek Kowalski
37b69d8e23 site: tweaked layout and options for cookie consent popup 2020-04-02 08:17:35 -07:00
badrelmers
1df5c81d12 correct a typo in Doc 2020-03-19 07:44:32 -07:00
Jarek Kowalski
272b657508 upgrade all dependencies to latest versions 2020-03-15 23:40:58 -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
Niraj Tolia
71e556304e Fix download link (#342) 2020-03-11 22:08:36 -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
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