Commit Graph

562 Commits

Author SHA1 Message Date
Marc Fargas 12cf4bbc05 Clarification of docker section in README.md
Refs #128, the two distinct docker sections of the README are merged into one.
2021-10-28 13:37:18 +00:00
Michael Eischer 51ab8e98e2 fix file permission handling 2021-09-24 23:10:16 +02:00
MichaelEischer 9f8c31b968 Merge pull request #158 from Enrico204/use-os-tempdir-for-temporary-directory
Use os.TempDir() for temporary directory in default path
2021-09-12 21:30:59 +02:00
Michael Eischer f952bc7344 Tweak readme 2021-09-12 21:27:45 +02:00
Enrico204 223520b964 Use os.TempDir() for temporary directory in default path 2021-09-12 21:27:45 +02:00
MichaelEischer 1172d7e068 Merge pull request #160 from Enrico204/reply-with-insufficient-storage-on-disk-full
Reply "insufficient storage" on disk full or over-quota
2021-09-07 21:28:07 +02:00
Enrico204 fb5d63435a Fix tests for: reply "insufficient storage" on disk full or over-quota 2021-09-06 22:32:07 +02:00
MichaelEischer 8729a699a1 Merge pull request #164 from networkException/master
Config: Read in PrometheusNoAuth correctly
2021-09-04 13:27:46 +02:00
networkException f373e45bc8 Config: Read in PrometheusNoAuth correctly
Previously setting --prometheus-no-auth flag would override --prometheus
2021-09-04 01:09:41 +02:00
MichaelEischer 8642729a51 Merge pull request #163 from buschjost/optimized-sha256-lib
Use Minio's optimized SHA-256
2021-08-31 21:04:25 +02:00
Oliver Buschjost f61292b00d Use Minio's optimized SHA-256 2021-08-27 18:21:44 +02:00
rawtaz a09ba203bd Merge pull request #161 from ubitux/readme-cleanup
Readme cleanup
2021-08-27 14:47:18 +02:00
Clément Bœsch ac8e95c8a4 README: propose a single openssl command instead of 2 2021-08-27 13:45:58 +02:00
Clément Bœsch f8db131226 README: remove trailing whitespaces 2021-08-27 13:45:58 +02:00
Clément Bœsch 101ad07999 README: update usage output with recent changes 2021-08-27 13:45:58 +02:00
Clément Bœsch dbf002296b README: set language for command block quotes
Better semantic, allowing syntax coloring when appropriate (such as
strings argument in case of sh).
2021-08-27 13:45:56 +02:00
MichaelEischer 5be12cecbf Merge pull request #143 from MichaelEischer/docker-create-bcrypt
docker: use bcrypt in create_users script
2021-08-23 20:10:38 +02:00
Enrico204 9b31f17188 Add unreleased changelog entry for pull request 160 2021-08-23 12:50:12 +02:00
Enrico204 173bfb5371 Reply "insufficient storage" on disk full or over-quota
This commit will change the current behavior on disk-related errors:
* HTTP 507 "Insufficient storage" is the status on disk full or
over-quota
* HTTP 500 "Internal server error" on other disk-related errors
previously both were 400 "Bad request"
2021-08-23 12:44:09 +02:00
Michael Eischer 20edfb87ee docker: use bcrypt in create_users script
This was missed when adding bcrypt support in rest-server 0.9.7
2021-08-20 22:52:03 +02:00
Alexander Neumann d2813ea61b Merge pull request #151 from restic/add-socket-activation
Support running on demand via systemd
2021-08-17 21:39:42 +02:00
Alexander Neumann f90205eefe Support running on demand systemd socket activation 2021-08-17 21:37:02 +02:00
Alexander Neumann 32784a3072 Run tests on Go 1.17 2021-08-17 21:35:39 +02:00
Alexander Neumann 05773795dd Merge pull request #142 from MichaelEischer/atomic-upload
Atomic file upload and directory sync
2021-08-17 20:32:33 +02:00
Alexander Neumann 0bd1f612d2 Merge pull request #154 from JsBergbau/master
Updated self-signed certificate creation
2021-08-17 20:27:39 +02:00
JsBergbau a5b306e65b Updated self-signed certificate creation 2021-08-17 11:26:23 +02:00
Michael Eischer 64a43228de Prefix temporary file with object id 2021-08-12 22:17:49 +02:00
Michael Eischer 28f569c0df Add changelog 2021-08-12 22:15:08 +02:00
Alexander Neumann 04d206303c Add test for race condition with aborted connection 2021-08-12 22:15:08 +02:00
Alexander Neumann e6cc79a2ec Fix comment 2021-08-12 22:14:36 +02:00
Alexander Neumann 7fe16b69b2 Mark helper functions 2021-08-12 22:14:36 +02:00
Michael Eischer ec0766cddd Don't sync directory on Windows
Calling sync on a directory on Windows just returns "The handle is invalid"
and fails.
2021-08-12 22:14:36 +02:00
Michael Eischer 2175029c9e Sync directory to disk after upload
After a file was uploaded, also sync its containing directory to disk to
make sure that also the directory entry is persisted after a system
crash.
2021-08-12 22:08:08 +02:00
Michael Eischer 82816c67e1 Atomic upload for blobs
A upload is now first saved to a temporary file before it gets renamed
to the final filename. This ensures that incomplete uploads don't leave
broken files behind (at least not under their real filename).

In addition, removing failed uploads is no longer prone to a race
condition with a retried upload. That scenario could occur when the
first upload fails partway and the server doesn't notice that
immediately. A later retry by restic will then delete the broken upload
and upload the file again. If the server notices now that the initial
upload has failed, then it will delete the correctly uploaded file.

This has been fixed by only ever deleting the temporary file during
upload.
2021-08-12 22:06:08 +02:00
Alexander Neumann 4db46a5d3d Check error 2021-08-11 14:32:10 +02:00
Alexander Neumann 39839cfac4 Merge pull request #135 from MichaelEischer/cpu-profile-shutdown
Properly close CPU profile on SIGINT
2021-08-11 14:27:52 +02:00
Alexander Neumann 5e71f61ae8 Merge pull request #130 from MichaelEischer/verify-upload
Verify uploaded files
2021-08-11 14:21:51 +02:00
Alexander Neumann 4c8a076976 Reword changelog 2021-08-09 16:28:09 +02:00
Michael Eischer 16889717c6 Add option to disable integrity check on upload 2021-08-09 15:40:50 +02:00
Michael Eischer 54adcb1fc7 Verify uploaded files
Restic uses the sha256 hash to calculate filenames based on the file
content. Check on the rest-server side that the uploaded file is intact
and reject it otherwise.
2021-08-09 15:35:13 +02:00
Alexander Neumann 96a6f0a5c4 Use Cobra for showing the version 2021-08-09 11:31:54 +02:00
Alexander Neumann 28c0b95b8a Upgrade dependencies 2021-08-09 11:31:51 +02:00
Alexander Neumann d39bc8e6cf Merge pull request #112 from wojas/split-repo-handler
Split Server component and add support for subrepositories
2021-08-09 10:55:29 +02:00
Alexander Neumann 034302de95 Remove goji dependency 2021-08-09 10:50:44 +02:00
Alexander Neumann ba9ee5c625 Address linter issues 2021-08-09 10:49:41 +02:00
Alexander Neumann 4e36854cd4 Fix typo 2021-08-09 10:49:41 +02:00
Konrad Wojas e3b1c5d612 Metrics: require user 'metrics' for private repo mode
To match previous behaviour, require username 'metrics' when private
repo mode is enabled.
2021-08-09 10:49:41 +02:00
Konrad Wojas aef955c513 Update readme 2021-08-09 10:49:41 +02:00
Konrad Wojas ff88e6812d Update readme and changelog 2021-08-09 10:49:41 +02:00
Konrad Wojas 9db2d52fbe Prometheus: keep auth by default
Restore the previous behaviour where the Prometheus /metrics endpoint
required auth if auth was enabled.

A new -prometheus-no-auth flag allows you to override this and disable
auth for that specific endpoint.
2021-08-09 10:49:41 +02:00