Commit Graph

28 Commits

Author SHA1 Message Date
Gilbert Gilb's 536ebefff4
feat(backends/s3): add warmup support before repacks and restores (#5173)
* feat(backends/s3): add warmup support before repacks and restores

This commit introduces basic support for transitioning pack files stored
in cold storage to hot storage on S3 and S3-compatible providers.

To prevent unexpected behavior for existing users, the feature is gated
behind new flags:

- `s3.enable-restore`: opt-in flag (defaults to false)
- `s3.restore-days`: number of days for the restored objects to remain
  in hot storage (defaults to `7`)
- `s3.restore-timeout`: maximum time to wait for a single restoration
  (default to `1 day`)
- `s3.restore-tier`: retrieval tier at which the restore will be
  processed. (default to `Standard`)

As restoration times can be lengthy, this implementation preemptively
restores selected packs to prevent incessant restore-delays during
downloads. This is slightly sub-optimal as we could process packs
out-of-order (as soon as they're transitioned), but this would really
add too much complexity for a marginal gain in speed.

To maintain simplicity and prevent resources exhautions with lots of
packs, no new concurrency mechanisms or goroutines were added. This just
hooks gracefully into the existing routines.

**Limitations:**

- Tests against the backend were not written due to the lack of cold
  storage class support in MinIO. Testing was done manually on
  Scaleway's S3-compatible object storage. If necessary, we could
  explore testing with LocalStack or mocks, though this requires further
  discussion.
- Currently, this feature only warms up before restores and repacks
  (prune/copy), as those are the two main use-cases I came across.
  Support for other commands may be added in future iterations, as long
  as affected packs can be calculated in advance.
- The feature is gated behind a new alpha `s3-restore` feature flag to
  make it explicit that the feature is still wet behind the ears.
- There is no explicit user notification for ongoing pack restorations.
  While I think it is not necessary because of the opt-in flag, showing
  some notice may improve usability (but would probably require major
  refactoring in the progress bar which I didn't want to start). Another
  possibility would be to add a flag to send restores requests and fail
  early.

See https://github.com/restic/restic/issues/3202

* ui: warn user when files are warming up from cold storage

* refactor: remove the PacksWarmer struct

It's easier to handle multiple handles in the backend directly, and it
may open the door to reducing the number of requests made to the backend
in the future.
2025-02-01 18:26:27 +00:00
Michael Eischer b8f409723d make timeout for slow requests configurable 2024-08-26 14:14:43 +02:00
Ben Northway 98c73eeca9
Update faq.rst
the correct output of `echo "~/documents"` is `~/documents`
2024-07-30 09:11:18 -06:00
Michael Eischer 18990dbed8 backup: refer to backed up data as backup source not target
A backup reads from the source and writes it to the backup target
(repository). The name "target" is kept within the source code as it's
used there excessively.
2024-05-25 23:13:37 +02:00
avoidalone ac948fccda fix some typos
Signed-off-by: avoidalone <wuguangdong@outlook.com>
2024-03-11 14:35:12 +08:00
Michael Eischer 53ebe91a50 Move changelog typo fixes to changelog files 2023-12-23 14:05:47 +01:00
Andreas Dominik Preikschat ea37240597 remove duplicated init
the documentation contained the `init` command twice
2022-12-20 17:24:56 +01:00
Lorenz Bausch d6e3c7f28e
Wording: change repo to repository 2022-07-08 20:05:35 +02:00
Florian Kusche 6183d0be53 Update output of restic check 2022-01-16 12:34:20 +01:00
Florian Kusche b0c1d0f9cd Update documentation regarding unreferenced packs
Also removes an unnecessary space at the end of the last line.
2022-01-09 11:45:03 +01:00
gum3ng 9589de16db [issue 3558]: Add a FAQ section for invalid Windows filenames 2022-01-02 22:24:00 +05:30
Kyle Brennan 19ec4d8f17
Document safe passwords. Fix #2238 2021-12-27 10:43:18 -08:00
rawtaz b9b82d878d Add FAQ on whether restic can resume backups
This new FAQ entry explains that restic can resume interrupted backups.
2020-10-03 21:39:45 +02:00
Alexander Neumann 63c67be908 Add hint abouth absolute sftp paths for Synology NAS 2020-01-06 21:37:57 +01:00
Filippo Bottega 95d070c147 FAQ: Add hint for antivirus setup
Add a tip to configure antivirus to exclude restic process.
2019-11-29 20:26:20 +01:00
James Culbertson 82a70643a2 Fix a few typos in the FAQ doc. 2018-12-18 08:47:52 -06:00
Moritz Dietz b36345fd84 Add example to spot path expansion errros 2018-10-07 12:09:46 +02:00
Alex JOST cb8d2d3df5
doc: enhance FAQ about AV software on Windows
As discussed in #1840, realtime protection of AV software can cause serious performance degradation on Windows OS.
2018-06-14 19:39:04 +02:00
Alexander Neumann 4a524da736 FAQ: Add suggestion on how to solve sftp error 2018-03-18 21:39:11 +01:00
Julian Gehring 70250762f3
Fix code block formatting in FAQs
Fixes the formatting of a code block in the FAQs and makes it render properly.
2018-01-05 23:02:03 +00:00
Alexander Neumann fae3c4d437 faq: Add entry about Synology NAS' sftp path 2017-09-30 10:30:21 +02:00
Alexander Neumann 23f1cb06d6 Fix FAQ 2017-09-30 10:21:56 +02:00
Alexander Neumann d41dce5ecb Merge pull request #1272 from jniggemann/doc-faq-add-prio
doc: FAQ: Add info on IO and CPU prioritization
2017-09-23 20:08:17 +02:00
Jan Niggemann 52a3eafede doc: FAQ: Add info on IO and CPU prioritization 2017-09-23 19:32:07 +02:00
Alexander Neumann a7a478a19e doc: Correct FAQ 2017-09-23 19:15:21 +02:00
Antoine Beaupré bcd1e45ba7
fix typo, add note about file permissions 2017-09-18 08:55:18 -04:00
Antoine Beaupré 7a0b4428e3
add explanation of restic automation
every time i look at restic, i block on this and figured it may be useful for others
2017-09-16 10:17:36 -04:00
Thor77 9344b0b3a8 Documentation: Refactor and switch to Sphinx
* convert documentation to reStructuredText
* switch from mkdocs to sphinx
* rewrite README.md (now .rst) to include less information and be more
attractive
2017-04-17 20:53:38 +02:00