1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-04 10:39:43 +00:00
Commit graph

923 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
c2e404a0ee doc: add edit on github link 2025-01-31 18:53:03 +01:00
Michael Eischer
8b63e1cd72
Merge pull request #5129 from tesshuflower/5089_exclude_xattrs_on_restore
Allow excluding xattrs at restore time
2025-01-18 23:15:11 +01:00
Srigovind Nayak
115ecb3c92
tag: output the original ID and new snapshotID (#5144)
* tag: output the original ID and new snapshotID

tag: print changed snapshot information immediately

* print changed snapshot immediately after it has been saved
* add message type to the changedSnapshot
* add a summary type which will share the JSON output of the numer of changed snapshots
* updated verbosity of the changed snapshot in text mode to only work when verbosity > 2
* also use the terminal status printer for a standard handling for stdout messages
2025-01-14 18:57:47 +01:00
Michael Eischer
bd4ce8aac1
Merge pull request #4990 from m-wild/exclude-cloud-files
backup: allow excluding online-only cloud files
2025-01-13 21:24:53 +01:00
Michael Wildman
da71e77b28 backup: allow excluding online-only cloud files 2025-01-13 21:11:23 +01:00
Tesshu Flower
cd84fe0853
xattrs - restore all by default, doc/chglog update
Signed-off-by: Tesshu Flower <tflower@redhat.com>
2025-01-10 15:25:09 -05:00
Tesshu Flower
3ac697d03d
linux default restore only user xattrs, doc update
* On Linux restore only user.* xattrs by default
* restore all for other OSs
* Update docs and changelog about the new restore
flags --exclude-xattr and --include-xattr

Signed-off-by: Tesshu Flower <tflower@redhat.com>
2025-01-10 15:13:45 -05:00
Srigovind Nayak
d422e75e08
docs: add instructions for verifying SLSA provenance of Docker images
docs: update the documentation
2024-12-02 00:14:39 +05:30
Srigovind Nayak
d7d9af4c9f
ui: restore --delete indicates number of deleted files (#5100)
* ui: restore --delete indicates number of deleted files

* adds new field `FilesDeleted` to the State struct, JSON and text progress updaters
* increment FilesDeleted count when ReportedDeletedFile

* ui: collect the files to be deleted, delete, then update the count post deletion

* docs: update scripting output fields for restore command

ui: report deleted directories and refactor function name to ReportDeletion
2024-12-01 15:29:11 +01:00
Michael Eischer
1133498ef8
Merge pull request #5046 from konidev20/fix-gh-4521-azure-blob-storage-add-support-for-access-tiers
azure: add support for access tiers hot, cool and cold
2024-11-11 22:01:52 +01:00
Michael Eischer
e65f4e2231 backup: include start and end time in json output
The timestamps were already stored in the created snapshot.
2024-11-01 16:31:34 +01:00
Joram Berger
cd44b2bf8b doc: Clarify number of blobs are added
The numbers reported as `data_blobs` and `tree_blobs` are not total numbers of blobs but numbers of blobs added with the given snapshot.
2024-10-27 19:58:21 +01:00
Michael Eischer
1f0f6ad63d Merge branch 'patch-release' 2024-10-27 18:35:32 +01:00
Alexander Neumann
5dcee7f0a3 Update manpages and auto-completion 2024-10-27 16:37:19 +01:00
Srigovind Nayak
bff3341d10
azure: add support for hot, cool, or cool access tiers 2024-10-20 15:27:21 +05:30
Git'Fellow
5b60d49654 fix: shorten sentence 2024-10-18 21:47:59 +02:00
Git'Fellow
8056181301 docs: Recommend to setup B2 versions lifecycle rules 2024-10-18 21:46:58 +02:00
Michael Eischer
5838896962 doc: document safety feature for --target / --delete 2024-10-17 19:45:03 +02:00
Michael Eischer
37d5bd61a0
Merge pull request #5042 from solracsf/patch-1
docs: Recommend to setup B2 versions lifecycle rules
2024-09-07 14:36:29 +00:00
Michael Eischer
7b1a15916d
Merge pull request #5039 from konidev20/fix-gh-4806-forget-add-reason-for-oldest-snapshot-retained
forget: indicate why the oldest snapshot in a group is kept
2024-09-07 14:31:47 +00:00
Git'Fellow
113439c69b
fix: shorten sentence 2024-09-07 15:27:15 +02:00
Srigovind Nayak
5468e85222
docs: mention that the oldest snapshot is marked oldest in the reasons of the forget comman 2024-09-07 15:07:23 +05:30
Michael Eischer
4f0affd4f7 Merge branch 'patch-release' 2024-09-06 22:32:22 +02:00
Alexander Neumann
a98370cc9e Update manpages and auto-completion 2024-09-05 21:25:21 +02:00
Git'Fellow
00ca0b371b
docs: Recommend to setup B2 versions lifecycle rules 2024-09-04 13:21:37 +02:00
Michael Eischer
ebd8f0c74a docs: make s3-compatible section standalone 2024-08-31 19:39:30 +02:00
Michael Eischer
6024597028 drop support for s3legacy layout 2024-08-31 17:25:24 +02:00
Michael Eischer
55ff4e046e doc: full tree blob data structure is in the code 2024-08-30 12:46:07 +02:00
Michael Eischer
7ea558db99 doc: JSON encoder must be deterministic 2024-08-30 12:46:07 +02:00
Michael Eischer
71e8068d86 doc: mark S3 layout as deprecated 2024-08-30 12:46:07 +02:00
Michael Eischer
a45d21e2b9 doc: describe how to handle rewrite encoding error 2024-08-30 12:46:07 +02:00
Michael Eischer
97eb81564a doc: fix typos 2024-08-30 12:45:20 +02:00
Michael Eischer
262e85c37f doc: shrink wasabi / alibaba cloud example
Remove descriptions for both providers and shorten the example to the
minimum.
2024-08-30 12:45:20 +02:00
Michael Eischer
f451001f75 doc: use regional urls for Amazon S3 and add generic s3 provider section
Split description for non-Amazon S3 providers into separate section. The
section now also includes the `s3.bucket-lookup` extended option. Switch
to using regional URLs for Amazon S3 to replace the need for setting the
region.
2024-08-30 12:45:20 +02:00
Michael Eischer
5980daea64 doc/backup: move exit status codes section up 2024-08-30 12:45:20 +02:00
Michael Eischer
6b4f16f77b doc/backup: link to exit code for scripting section 2024-08-30 12:45:20 +02:00
Michael Eischer
64d628bd75 make timeout for slow requests configurable 2024-08-30 12:45:20 +02:00
Michael Eischer
a99b824508 update docs 2024-08-30 12:45:20 +02:00
Michael Eischer
00f63d72fa Mention RESTIC_HOST environment variable in docs 2024-08-30 12:45:20 +02:00
Michael Terry
48e3832322 main: return an exit code (12) for "bad password" errors 2024-08-30 12:39:22 +02:00
Andreas Deininger
c83b529c47 Fix typos 2024-08-30 12:37:10 +02:00
Michael Eischer
dab3e549af
Merge pull request #5017 from MichaelEischer/rewrite-data-loss
rewrite: Document handling of "cannot encode tree" errors
2024-08-29 16:57:13 +02:00
Michael Eischer
5c238ea359
Merge pull request #5016 from MichaelEischer/s3-doc-rework
Rework documentation for s3-compatible storages
2024-08-29 16:55:40 +02:00
Michael Eischer
2c85d2468a
Merge pull request #5015 from MichaelEischer/update-exit-code-docs
Update exit code docs
2024-08-29 16:53:14 +02:00
Michael Eischer
7bbf75237d
Merge pull request #5014 from MichaelEischer/configurable-slow-request-timeout
Make timeout for slow requests configurable
2024-08-29 16:52:24 +02:00
Michael Eischer
5cffd40002
Merge pull request #5013 from MichaelEischer/group-cli-commands
Group CLI commands and show features/options
2024-08-26 16:23:39 +02:00
Michael Eischer
dc5d3fc473 doc: full tree blob data structure is in the code 2024-08-26 14:41:09 +02:00
Michael Eischer
05077eaa20 doc: JSON encoder must be deterministic 2024-08-26 14:41:09 +02:00
Michael Eischer
908d097904 doc: mark S3 layout as deprecated 2024-08-26 14:41:09 +02:00