1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 01:06:39 +00:00
restic/cmd/restic
David Sommer 5729d967f5 backup: Return exit status code 3 when failing to read source data
The backup command used to return a zero exit code as long as a snapshot
could be created successfully, even if some of the source files could not
be read (in which case the snapshot would contain the rest of the files).

This made it hard for automation/scripts to detect failures/incomplete
backups by looking at the exit code. Restic now returns the following exit
codes for the backup command:

 - 0 when the command was successful
 - 1 when there was a fatal error (no snapshot created)
 - 3 when some source data could not be read (incomplete snapshot created)
2020-07-20 22:19:01 +02:00
..
testdata Reduce dataset for integration tests 2018-03-11 21:07:47 +01:00
.gitignore
acl.go Restore whole folder to sdtout as tar 2019-04-22 20:44:33 +02:00
acl_test.go Restore whole folder to sdtout as tar 2019-04-22 20:44:33 +02:00
cleanup.go Replace fmt.Printf/Println/Fprintf with wrapper functions 2020-06-14 11:08:11 +02:00
cmd_backup.go backup: Return exit status code 3 when failing to read source data 2020-07-20 22:19:01 +02:00
cmd_cache.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_cat.go cat/stats: Get stdout from globalOptions 2020-06-14 11:08:11 +02:00
cmd_check.go Replace fmt.Printf/Println/Fprintf with wrapper functions 2020-06-14 11:08:11 +02:00
cmd_debug.go Replace fmt.Printf/Println/Fprintf with wrapper functions 2020-06-14 11:08:11 +02:00
cmd_diff.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_dump.go Centralize buffer allocation and size checking in Repository.LoadBlob 2020-04-23 10:04:20 +02:00
cmd_find.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_forget.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_generate.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_init.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_key.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_list.go Loop over index files for 'list blobs' 2020-06-14 17:25:34 +02:00
cmd_ls.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_migrate.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_mount.go Replace mount's per-file cache by a global LRU cache 2020-07-12 18:27:16 +02:00
cmd_options.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_prune.go disable index uploads for prune command 2020-06-12 09:24:38 +02:00
cmd_rebuild_index.go rebuild_index: Report invalid packs that were ignored 2020-04-02 22:38:31 +02:00
cmd_recover.go Fix non-intuitive repository behavior 2020-06-11 13:05:23 +02:00
cmd_restore.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_self_update.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_snapshots.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_stats.go cat/stats: Get stdout from globalOptions 2020-06-14 11:08:11 +02:00
cmd_tag.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_unlock.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_version.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
doc.go
exclude.go Fix typos 2020-05-16 14:05:26 +08:00
exclude_test.go Add tests for insensitive variants of filter methods 2018-11-25 13:32:16 +01:00
find.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
flags_test.go
format.go Display local time for all commands 2018-11-02 20:36:15 +01:00
global.go Fix shutdown hang when restic is started as background job 2020-04-12 22:27:09 +02:00
global_debug.go Add profile build flag 2018-04-30 14:19:04 +02:00
global_release.go Add profile build flag 2018-04-30 14:19:04 +02:00
global_test.go Ensure Print{,f,ln} use global stdout 2020-02-15 01:32:43 +01:00
integration_fuse_test.go Support NetBSD without fuse 2018-06-16 15:55:04 +09:00
integration_helpers_test.go Revert "Darwin test fix: allow 1μs timestamp difference" 2020-05-01 17:11:30 +02:00
integration_helpers_unix_test.go
integration_helpers_windows_test.go
integration_test.go backup: Return exit status code 3 when failing to read source data 2020-07-20 22:19:01 +02:00
local_layout_test.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
lock.go Replace fmt.Printf/Println/Fprintf with wrapper functions 2020-06-14 11:08:11 +02:00
main.go backup: Return exit status code 3 when failing to read source data 2020-07-20 22:19:01 +02:00