Jarek Kowalski
9680dc376b
cli: improvements for 'kopia server' and client
...
Those will make it possible to securely host 'kopia server' embedded
in a desktop app that runs in the background and can access UI.
- added support for using and generating TLS certificates
- added /api/v1/shutdown API to remotely trigger server shutdown
- added support for automatically shutting down server if no requests
arrive in certain amount of time
- added support for generating and printing random password to STDERR
TLS supports 3 modes:
1. serve TLS using externally-provided cert/key PEM files
2. generate & write PEM files, then serve TLS using them
3. generate and use emphemeral cert/key (prints SHA256 fingerprint)
2020-01-24 17:25:45 -08:00
Jarek Kowalski
ac70a38101
lint: upgraded to 1.22.2 and make lint issues a build failure
...
fixed or silenced linter warnings, mostly due to magic numeric constants
2020-01-03 16:39:30 -08:00
Jarek Kowalski
d9d4804dcb
server: handle known UI routes specially by serving root index file
2019-12-14 13:10:32 -08:00
Jarek Kowalski
5d55568767
server: added /api/v1/objects/:id that retrieves contents of object given its ID
2019-12-14 10:19:08 -08:00
Julio Lopez
9550c11aeb
Add .gitignore for htmlui_bindata.go
2019-12-11 06:46:41 -08:00
Jarek Kowalski
f6d59608ab
upload: require *policy.Tree for each upload
2019-12-07 14:24:57 -08:00
Jarek Kowalski
b68ef7d781
refactored policy types and policy.Getter
2019-12-06 23:53:22 -08:00
Jarek Kowalski
6217df1a87
lint: switched to 1.21 and fixed a ton of whitespace issues discovered
...
by new wsl linter
2019-11-26 06:49:49 -08:00
Jarek Kowalski
36859bdf8b
server: removed dependency on pat
2019-11-20 15:49:40 -08:00
Jarek Kowalski
e8a1eaa9ee
htmlui: added experimental HTML-based UI
...
This is enabled by `kopia server --ui` and can be viewed in a browser
at http://localhost:51515/
Right now it can only list snapshots and policies (barely).
2019-11-20 14:41:38 -08:00
Jarek Kowalski
22170b4832
cli: changed 'cache set' subcommand to support changing individual parameters
2019-06-11 22:08:52 -07:00
Jarek Kowalski
ae1510b65c
Deprecate hashcache and replace it with simply walking previous snapshot directory tree.
...
This cleans up the code a lot and removes many ugly hacks.
The performance is pretty reasonable and with separate metadata cache it's likely to stay that way.
2019-06-08 18:01:47 -07:00
Jarek Kowalski
72520029b0
golangci-lint: added more linters
...
Also fixed pre-existing lint errors.
2019-06-02 22:56:57 -07:00
Jarek Kowalski
54edb97b3a
refactoring: renamed repo/block to repo/content
...
Also introduced strongly typed content.ID and manifest.ID (instead of string)
This aligns identifiers across all layers of repository:
blob.ID
content.ID
object.ID
manifest.ID
2019-06-01 22:24:19 -07:00
Jarek Kowalski
9e5d0beccd
refactoring: renamed storage.Storage to blob.Storage
...
This updates the terminology everywhere - blocks become blobs and
`storage.Storage` becomes `blob.Storage`.
Also introduced blob.ID which is a specialized string type, that's
different from CABS block ID.
Also renamed CLI subcommands from `kopia storage` to `kopia blob`.
While at it introduced `block.ErrBlockNotFound` and
`object.ErrObjectNotFound` that do not leak from lower layers.
2019-06-01 14:10:35 -07:00
Jarek Kowalski
1a7a02ddbe
cleanup imports by grouping all local imports together
2019-06-01 10:57:55 -07:00
Jarek Kowalski
63303904e1
switched remaining fmt.Errorf to errors.Wrap()
2019-06-01 10:57:05 -07:00
Jarek Kowalski
0c41d41276
Fixed up paths after merge
2019-05-27 15:48:39 -07:00
Jarek Kowalski
a6a153b22e
switched fmt.Errorf() to errors.Wrap()
2019-05-11 12:34:14 -07:00
Jarek Kowalski
bb4c6674c7
snapshotfs: merged internal.Upload into snapshotfs
2018-11-03 08:39:07 -07:00
Jarek Kowalski
327d8317d8
refactored repo/ into separate github.com/kopia/repo/ git repository
2018-10-26 20:40:57 -07:00
Jarek Kowalski
d47f662316
refactoring: moved kopia/kopia/policy to kopia/kopia/snapshot/policy
2018-10-20 09:55:52 -07:00
Jarek Kowalski
4270d8a67f
policy: refactored retention policy to be applied in policy.ApplyRetentionPolicy()
2018-09-16 12:48:07 -07:00
Jarek Kowalski
906b8eaee3
plumbed through context to all manifest manager methods and switched to lazy initialization
2018-09-13 15:34:29 -07:00
Jarek Kowalski
91066f2469
reorganized low-level repository packages by moving them all under kopia/kopia/repo/
2018-08-30 22:01:05 -07:00
Jarek Kowalski
6484a55d7c
removed policy.Manager and snapshot.Manager and switched to package-level function interface instead
2018-08-30 06:47:58 -07:00
Jarek Kowalski
a44c9554c0
refactored upload to separate package
2018-08-30 06:21:40 -07:00
Jarek Kowalski
3ef4593b03
refactored policy management into separate policy/ package
2018-08-29 23:08:40 -07:00
Jarek Kowalski
6587ade1f9
cli: added 'policy edit' command which launches an editor and allows user to edit policy JSON directly
2018-08-20 19:07:44 -07:00
Jarek Kowalski
864b763cc0
progress: output the # of files in each directory
2018-08-19 11:48:55 -10:00
Jarek Kowalski
1ff003c820
added internal lib for gitignore-style pattern matching
...
added 'ignorefs' which transparently hides all files according to .kopiaignore, which is very similar to .gitignore
2018-08-19 11:48:55 -10:00
Jarek Kowalski
5d73d18347
removed Parent from fs.Entry
2018-08-19 11:32:17 -10:00
Jarek Kowalski
5386370906
emit snapshot size
2018-08-04 09:57:10 -07:00
Jarek Kowalski
306ab5888d
changed source manager to handle remote hosts differently
2018-07-19 15:03:48 -08:00
Jarek Kowalski
c57531b751
switched Go logging library to github.com/op/go-logging which lets us override log levels per module
2018-07-09 21:28:12 -07:00
Jarek Kowalski
2f1cf8129b
added skeleton of CLI actions for manipulating server sources
2018-06-18 18:02:36 -07:00
Jarek Kowalski
4faf3cd9d0
finalized CLI to manipulate policies
2018-06-16 12:17:58 -07:00
Jarek Kowalski
70ecebb769
added HTTP API to list policies
2018-06-16 08:46:56 -07:00
Jarek Kowalski
df3129682c
Added repo.Repository.Refresh{,Periodically}
2018-06-12 18:03:25 -07:00
Jarek Kowalski
22b0766570
API server, work in progress
2018-06-10 20:59:49 -07:00
Jarek Kowalski
b105cca96c
added 'kopia server' which runs simple daemon with simple HTTP API server, which will be used to build a web UI
2018-06-10 17:24:42 -07:00