Enrico204
4e5caab114
stdin-from-command: implemented suggestions in #4254
...
The code has been refactored so that the archiver is back to the original code, and the stderr is handled using a go routine to avoid deadlock.
2023-10-27 23:58:51 +02:00
Sebastian Hoß
c133065a9f
Check command result before snapshotting
...
Return with an error containing the stderr of the given command in case it fails. No new snapshot will be created and future prune operations on the repository will remove the unreferenced data.
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
2023-10-27 23:58:51 +02:00
Sebastian Hoß
25350a9c55
Extend SnapshotOptions w/ command data
...
In order to determine whether to save a snapshot, we need to capture the exit code returned by a command. In order to provide a nice error message, we supply stderr as well.
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
2023-10-27 23:58:51 +02:00
Sebastian Hoß
a2b76ff34f
Start command from --stdin-from-command
...
It acts similar to --stdin but reads its data from the stdout of the given command instead of os.Stdin.
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
2023-10-27 23:58:51 +02:00
Sebastian Hoß
333fe1c3cf
Align Stdin and StdinCommand in conditionals
...
In order to run with --stdin-from-command we need to short-circuit some functions similar to how it is handled for the --stdin flag. The only difference here is that --stdin-from-command actually expects that len(args) should be greater 0 whereas --stdin does not expect any args at all.
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
2023-10-27 23:58:51 +02:00
Sebastian Hoß
a8657bde68
Add --stdin-from-command option
...
This new flag is added to the backup subcommand in order to allow restic to control the execution of a command and determine whether to save a snapshot if the given command succeeds.
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
2023-10-27 23:58:51 +02:00
Michael Eischer
104107886a
Merge pull request #4503 from MichaelEischer/fix-stats-with-hardlinks
...
stats: Fix hardlink tracking across multiple filesystems
2023-10-27 23:53:03 +02:00
Michael Eischer
731b3a4357
stats: fix hardlink tracking in a snapshot
...
inodes are only unique within a device. Use the HardlinkIndex from the
restorer instead of the custom (broken) hashmap to correctly account for
both inode and deviceID.
2023-10-27 23:40:42 +02:00
Michael Eischer
a8fdcf79b7
restorer: Make hardlink index generic
...
This will allow reusing it for the stats command without regressing the
memory usage due to storing an unnecessary file path.
2023-10-27 23:40:42 +02:00
Michael Eischer
45962c2847
Merge pull request #4499 from MichaelEischer/modular-backend-code
...
Split backend code from restic package
2023-10-27 20:19:20 +02:00
Michael Eischer
50ef01131a
Merge pull request #4542 from MichaelEischer/support-armv6
...
Only support ARMv6 on ARM platforms
2023-10-27 19:42:49 +02:00
rawtaz
6be3a8fe51
Merge pull request #4539 from tbm/docs
...
Fix typos in docs
2023-10-27 17:30:08 +00:00
Michael Eischer
5166bde386
Only support ARMv6 on ARM platforms
...
Go 1.21 has switched the default from GOARM=5 to GOARM=7. So far there
have been complaints from Raspberry Pi 1 users, as the first raspberry
pi version only supports ARMv6. Exclude older ARM versions as these are
likely not relevant (rest-server also only supports ARMv6/7) and enforce
the use of software floating point emulation.
2023-10-27 19:12:12 +02:00
Leo R. Lundgren
aafb806a8c
doc: Correct two typos
2023-10-27 18:56:32 +02:00
Martin Michlmayr
41e6a02bcc
Fix typos
2023-10-27 18:56:32 +02:00
Martin Michlmayr
b51fe2fb69
Format option correctly
2023-10-27 18:56:32 +02:00
Michael Eischer
56537fb48e
Merge pull request #4545 from restic/fix-rtd3
...
Try to fix documentation build
2023-10-26 22:00:20 +02:00
Michael Eischer
feea567868
Remove readthedocs special case from docs configuration
...
Apparently it's now required to bring your own theme.
2023-10-26 21:56:36 +02:00
Michael Eischer
2968b52f84
Merge pull request #4543 from MichaelEischer/fix-rtd2
...
Fix doc path typo in readthedocs configuration
2023-10-26 20:40:45 +02:00
Michael Eischer
619e80d7cc
Fix doc path typo in readthedocs configuration
2023-10-26 20:39:43 +02:00
Michael Eischer
3804e50d64
Merge pull request #4541 from MichaelEischer/fix-binary-check-script
...
verify-release-binaries.sh: don't show warning if binaries are correct
2023-10-26 20:37:56 +02:00
Michael Eischer
c19e39968f
verify-release-binaries.sh: don't show warning if binaries are correct
2023-10-26 19:59:27 +02:00
Michael Eischer
550be5c1e9
Merge pull request #4538 from MichaelEischer/fix-rtd
...
Add read the docs config file version 2
2023-10-26 19:42:36 +02:00
Michael Eischer
249605843b
prune: get backend connection count via repository
2023-10-25 23:01:54 +02:00
Michael Eischer
c7b770eb1f
convert MemorizeList to be repository based
...
Ideally, code that uses a repository shouldn't directly interact with
the underlying backend. Thus, move MemorizeList one layer up.
2023-10-25 23:01:35 +02:00
Michael Eischer
1b8a67fe76
move Backend interface to backend package
2023-10-25 23:00:18 +02:00
Michael Eischer
ceb0774af1
backend: make LoadAll independent of restic package
2023-10-25 22:58:39 +02:00
Michael Eischer
b6d79bdf6f
restic: decouple restic.Handle
2023-10-25 22:54:07 +02:00
Michael Eischer
7881309d63
backend: move backend implementation helpers to util package
...
This removes code that is only used within a backend implementation from
the backend package. The latter now only contains code that also has
external users.
2023-10-25 22:54:07 +02:00
Michael Eischer
8e6fdf5edf
Merge pull request #4520 from awannabeengineer/load-retry-nonexistent
...
retry: Do not retry Load() if file does not exist
2023-10-25 20:42:05 +00:00
Michael Eischer
c2e3e8d6ea
Add read the docs config file version 2
...
The config file is by now necessary to build documentation:
https://blog.readthedocs.com/migrate-configuration-v2/
2023-10-25 22:00:42 +02:00
Alexander Neumann
27ec320eae
Set development version for 0.16.1
2023-10-24 20:02:58 +02:00
Alexander Neumann
baca3f6303
Add version for 0.16.1
2023-10-24 20:02:55 +02:00
Alexander Neumann
524c2721b4
Update manpages and auto-completion
2023-10-24 20:02:55 +02:00
Alexander Neumann
be1b978ac8
Generate CHANGELOG.md for 0.16.1
2023-10-24 20:02:29 +02:00
Alexander Neumann
d4d9c1b8f1
Prepare changelog for 0.16.1
2023-10-24 20:02:29 +02:00
Michael Eischer
ead8dd0173
Merge pull request #4524 from MichaelEischer/fix-autocompletion
...
Don't load password when autocompleting CLI commands
2023-10-23 20:06:53 +00:00
Michael Eischer
cd09ef4614
don't load password when autocompleting CLI commands
2023-10-23 21:44:22 +02:00
Michael Eischer
d399e32590
Merge pull request #4535 from MichaelEischer/fix-cat-command
...
Only show index loading progress bar if stdout is a terminal
2023-10-23 21:28:13 +02:00
Michael Eischer
54a4034ec0
Only show index progress bar if stdout is a terminal
...
This ensures that there is no interference when using restic for
scripting use cases.
2023-10-23 21:16:52 +02:00
rawtaz
138b7b3328
Merge pull request #4534 from MichaelEischer/polish-changelogs
...
Polish changelogs
2023-10-23 19:00:01 +00:00
Leo R. Lundgren
6d19e0260d
doc: Polish changelogs
2023-10-23 20:45:15 +02:00
Michael Eischer
85abceb99c
doc: update minimum required Go version
2023-10-23 19:02:20 +02:00
Michael Eischer
85c15e6fa3
polish changelogs
2023-10-23 19:01:45 +02:00
Michael Eischer
d6917c7e00
Merge pull request #4533 from MichaelEischer/update-dependencies
...
update dependencies
2023-10-23 19:01:03 +02:00
Michael Eischer
8c20301172
update dependencies
2023-10-23 18:48:13 +02:00
Michael Eischer
4b4f916bdc
Merge pull request #4532 from MichaelEischer/update-zstd
...
Update klauspost/compress to fix data corruption at maximum compression
2023-10-23 18:45:35 +02:00
Michael Eischer
9707956375
Merge pull request #4530 from MichaelEischer/repair-packs
...
Add `repair packs` command to simplify recovery from damaged pack
2023-10-23 18:44:42 +02:00
Michael Eischer
d1d4510974
repair packs: Add stub feature flag implementation
2023-10-23 18:36:28 +02:00
Michael Eischer
a28940ea29
check: Suggest usage of restic repair packs
for corrupted blobs
...
For now, the guide is only shown if the blob content does not match its
hash. The main intended usage is to handle data corruption errors when
using maximum compression in restic 0.16.0
2023-10-23 18:36:28 +02:00