Commit graph

994 commits

Author SHA1 Message Date
Winfried Plappert
5148608c39 restic rewrite include - based on restic 0.18.1
cmd/restic/cmd_rewrite.go:
introduction of include filters for this command:
- add include filters, add error checking code
- add new parameter 'keepEmptyDirectoryFunc' to 'walker.NewSnapshotSizeRewriter()',
  so empty directories have to be kept to keep the directory structure intact
- add parameter 'keepEmptySnapshot' to 'filterAndReplaceSnapshot()' to keep snapshots
  intact when nothing is to be included
- introduce helper function 'gatherIncludeFilters()' and 'gatherExcludeFilters()' to
  keep code flow clean

cmd/restic/cmd_rewrite_integration_test.go:
add several new tests around the 'include' functionality

internal/filter/include.go:
this is where is include filter is defined

internal/walker/rewriter.go:
- struct RewriteOpts gains field 'KeepEmtpyDirectory', which is a 'NodeKeepEmptyDirectoryFunc()'
  which defaults to nil, so that al subdirectories are kept
- function 'NewSnapshotSizeRewriter()' gains the parameter 'keepEmptyDirecoryFilter' which
  controls the management of empty subdirectories in case of include filters active

internal/data/tree.go:
gains a function Count() for checking the number if node elements in a newly built tree

internal/walker/rewriter_test.go:
function 'NewSnapshotSizeRewriter()' gets an additional parameter nil to keeps things happy

cmd/restic/cmd_repair_snapshots.go:
function 'filterAndReplaceSnapshot()' gets an additional parameter 'keepEmptySnapshot=nil'

doc/045_working_with_repos.rst:
gets to mention include filters

changelog/unreleased/issue-4278:
the usual announcement file

git rebase master -i produced this

restic rewrite include - keep linter happy

cmd/restic/cmd_rewrite_integration_test.go:
linter likes strings.Contain() better than my strings.Index() >= 0
2026-01-31 19:42:56 +00:00
Michael Eischer
34fdf5ba96
Merge pull request #5636 from MichaelEischer/clarify-parameter-docs 2026-01-31 19:15:24 +01:00
Michael Eischer
4bc6bb7e27 slightly reduce redundant wording 2026-01-31 19:07:06 +01:00
Michael Eischer
4fd9bfc32b docs: fix table width 2025-12-03 20:38:21 +01:00
Michael Eischer
7a3b06f78a docs: move environment variables to the scripting section 2025-12-03 18:38:36 +01:00
Michael Eischer
a58d176500 docs: clarify that parameter tuning applies to all commands 2025-12-03 18:33:00 +01:00
Winfried Plappert
ce57961f14
restic check with snapshot filters (#5469)
---------

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2025-11-28 19:12:38 +00:00
Michael Eischer
7696e4b495 bump minimum go version to 1.24 2025-11-26 21:33:40 +01:00
Michael Eischer
7e80536a9b
Merge pull request #5472 from wplapper/cmd_copy_stream
restic copy --stream: run one large copy operation crossing snapshot boundaries - issue #5453
2025-11-26 20:57:46 +01:00
Michael Eischer
f9e5660e75 output which source and target snapshot belong together 2025-11-23 22:01:53 +01:00
Michael Eischer
7d08c9282a align docs 2025-11-23 17:51:07 +01:00
izzy
629eaa5d21
docs: correct the schema provided for tag summary 2025-11-20 17:35:25 +00:00
Winfried Plappert
b87f7586e4 restic copy --batch: a fresh start from commit 382616747
Instead of rebasing my code, I decided to start fresh, since WithBlobUploader()
has been introduced.

changelog/unreleased/issue-5453:
doc/045_working_with_repos.rst:
the usual

cmd/restic/cmd_copy.go:
gather all snaps to be collected - collectAllSnapshots()
run overall copy step - func copyTreeBatched()
helper copySaveSnapshot() to save the corresponding snapshot

internal/repository/repack.go:
introduce wrapper CopyBlobs(), which passes parameter `uploader restic.BlobSaver` from
WithBlobUploader() via copyTreeBatched() to repack().

internal/backend/local/local_windows.go:
I did not touch it, but gofmt did: whitespace
2025-11-19 07:09:24 +00:00
Michael Eischer
7297047b71
Merge pull request #5600 from MichaelEischer/docs-tmp-var-on-windows
only suggest TMP as tmp dir variable on windows
2025-11-17 22:04:42 +01:00
Paulo Saraiva
c1a89d5150
Allow for a personal token to be specified for self-updates (#5568)
* Allow for a personal token to be specified for self-updates

This change will allow for setting the $GITHUB_ACCESS_TOKEN environment variable with a Github personal access token, allowing e.g. for higher rate limits

* Refactor github request and add test

---------

Co-authored-by: Paulo Saraiva <pauloman@cern.ch>
2025-11-17 21:39:39 +01:00
Michael Eischer
ffc5e9bd5c only suggest TMP as tmp dir variable on windows
TMP takes precedence over TEMP.
2025-11-16 17:31:36 +01:00
ferringb
87f26accb7
feat: add integrated nice and ionice options for docker (#5448)
The intended usage here is to basically kick restic as a background
"do it, but don't bother my normal load" process.

This allows passing the following environment variables in to
influence scheduling:

- NICE: usual CPU nice.  Defaults to 0.  This requires CAP_SYS_NICE
  to set a negative nice (IE, prioritize).
- IONICE_CLASS: usual ionice class.  Note that setting realtime
  requires CAP_SYS_ADMIN.  Also note the actual ionice default
  is "none".
- IONICE_PRIORITY: set the priority within the given class.  Ignored
  if no class is specified due to class default of "no scheduler".

---------

Signed-off-by: Brian Harring <ferringb@gmail.com>
Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2025-11-16 16:42:33 +01:00
DoS007
2bd6649813
docs: add info about ssd wear in backend connections (#5496)
---------

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
2025-11-16 12:48:56 +00:00
Michael Eischer
5b173d2206
Merge pull request #5567 from Paulomen2712/add_better_forget_example_docs
Improve example for forget --keep-daily
2025-11-16 13:45:13 +01:00
Brook
fadeb03f84
Update Nix/NixOS installation instructions (#5591)
Corrected spelling errors and updated installation instructions for Nix/NixOS.
2025-11-16 11:31:47 +00:00
Michael Eischer
157f174dd9
Merge pull request #5370 from hashier/feat/exclude-macOS-cloud-files
feat(backup): add possibility to exclude macOS cloud-only files
2025-11-16 11:57:37 +01:00
Alex Xu
bcc5417dc8
Merge pull request #5386 from Hello71/patch-2
doc: Add ambient caps example, edit file caps
2025-11-16 11:54:43 +01:00
Paulo Manuel Ferreira Dos Santos Saraiva
b0eb3652b8 Improve example for forget --keep-daily 2025-10-22 11:31:50 +02:00
Christopher Loessl
f3d95893b2 feat(backup): add possibility to exclude macOS cloud-only files 2025-10-04 19:22:51 +02:00
Michael Eischer
adbd4a1d18 Fully rework docs for group-accessible repositories
Just tell the user what to do instead of explaining too many details.
I've dropped the read-only variant as it actually has no representation
in the local and sftp backends. Instead it relied on both backends
initially creating all directories, which can't actually be guaranteed.

Based on a suggestion by @brad2014 in significant parts.
2025-10-03 21:24:57 +02:00
Michael Eischer
537d107b6c docs: use absolute permissions for group accessible repositories 2025-10-03 21:24:57 +02:00
Michael Eischer
06aa0f08cb docs: fix permission setup for group-accessible repo
The group always needs execute access for the directories. In addition,
files should be always set to read-only for everyone as restic never
modifies files.
2025-10-03 21:24:57 +02:00
Lyall Cooper
e30acefbff
Fix typo in rewrite command note 2025-09-24 14:40:35 +09:00
Adam Piggott
db3b3e31e6
Line breaks 2025-09-22 14:24:02 +01:00
Adam Piggott
8e87a37df0
doc: mention value for pack size setting 2025-09-16 17:32:26 +01:00
Michael Eischer
52aa1cd17f docs: sync compatibility section with website
This is no change in policy, just a more precise description of the
status quo.
2025-09-06 20:55:48 +02:00
y0n3d4
64273ea027
Update 020_installation.rst removing command options
Removed command options: their use is a user choice
2025-08-06 13:57:29 +02:00
Michele Testa
5a00d26431 Update 020_installation.rst adding instruction for Gentoo Linux 2025-08-05 15:16:37 +02:00
Michele Testa
3faad5751d Revert "Update 020_installation.rst adding install command for Gentoo Linux"
This reverts commit f487eb1c66.
2025-08-05 14:12:04 +02:00
y0n3d4
f487eb1c66
Update 020_installation.rst adding install command for Gentoo Linux
Added basic instructions for restic installation on Gentoo using the official package manager (Portage)
2025-08-05 14:01:10 +02:00
Michael Eischer
72636238d0
Merge pull request #5400 from rhhub/patch-2
docs: clarify ** wildcard must me between path separators
2025-08-04 20:56:07 +02:00
A Crutcher
0b080c44d7
doc: Correct Wasabi link 2025-08-02 13:03:43 -05:00
rhhub
521fbad701 docs: clarify ** must me between path separators 2025-06-02 13:46:06 -07:00
Patrick Wolf
7d39b1bfe8
Update 047_tuning_backup_parameters.rst - local backend (#5355)
users would find it helpful to know how to adjust the "local" backend and they might not get the idea that the local backend is just called local... which in turn leads them to think restic is slow as they can't adjust away  from 2 threads for restore and backup.
2025-06-02 18:40:04 +00:00
Ilya Grigoriev
e8dbb69a94 docs: when describing profiling, briefly explain .pprof files 2025-06-02 19:49:19 +02:00
Ilya Grigoriev
f4e21cdb75 docs: document profiling options a bit better
Previously, the docs were a bit mysterious about what "enables profiling
support" means or how one could take advantage of it.
2025-06-02 19:49:19 +02:00
Michael Eischer
337a7d1205
Merge pull request #5385 from Silvenga/windows-docs
docs: updated installation docs for Windows
2025-06-02 18:44:43 +02:00
Samuel Chambers
e732bdbfb8 updated doc/faq.rst_commitsSquashed 2025-05-11 14:02:07 -04:00
Mark Lopez
2db08fd749
docs: updated installation docs for Windows 2025-05-03 10:27:50 -05:00
Markus Hansmair
287b601f01 doc: typo & minor rewording in 'Removing files from snapshots' 2025-04-16 09:37:26 +02:00
Alex Xu
12f36ebf07
doc: add fastest, better compression
Follow-up for #5321
2025-04-13 19:33:13 -04:00
Michael Eischer
6fbcce1d1a
docs: fix typos in developer information (#5329) 2025-04-02 21:12:43 +02:00
Michael Eischer
0b7bdfed7e
Merge pull request #5320 from mjnaderi/patch-1
doc: fix typos
2025-03-31 20:07:51 +02:00
Mohammad Javad Naderi
5614cf4758
doc: fix typos 2025-03-29 12:40:47 +03:30
Gilbert Gilb's
eefff0d793 docs: fix unit for S3 restore timeout
"d" is not a valid unit.
2025-03-27 21:20:50 +01:00