mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-23 00:36:25 +00:00
Merge a5af001521
into 8a773856de
This commit is contained in:
commit
7d156ce8f1
@ -24,6 +24,7 @@ type Backend struct {
|
|||||||
Path string `mapstructure:"path,omitempty"`
|
Path string `mapstructure:"path,omitempty"`
|
||||||
Key string `mapstructure:"key,omitempty"`
|
Key string `mapstructure:"key,omitempty"`
|
||||||
RequireKey bool `mapstructure:"requireKey,omitempty"`
|
RequireKey bool `mapstructure:"requireKey,omitempty"`
|
||||||
|
AllowFailure bool `mapstructure:"allowFailure,omitempty"`
|
||||||
Env map[string]string `mapstructure:"env,omitempty"`
|
Env map[string]string `mapstructure:"env,omitempty"`
|
||||||
Rest BackendRest `mapstructure:"rest,omitempty"`
|
Rest BackendRest `mapstructure:"rest,omitempty"`
|
||||||
Options Options `mapstructure:"options,omitempty"`
|
Options Options `mapstructure:"options,omitempty"`
|
||||||
|
@ -267,6 +267,13 @@ func (l Location) Backup(cron bool, specificBackend string) []error {
|
|||||||
|
|
||||||
// If error save it and continue
|
// If error save it and continue
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if backend.AllowFailure {
|
||||||
|
colors.Faint.Printf("skipping backend \"%s\" since allowFailure was set to \"true\"\n", to)
|
||||||
|
if flags.VERBOSE {
|
||||||
|
colors.Error.Printf("reason: %s", out)
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
colors.Error.Println(out)
|
colors.Error.Println(out)
|
||||||
errors = append(errors, fmt.Errorf("%s@%s:\n%s%s", l.name, backend.name, out, err))
|
errors = append(errors, fmt.Errorf("%s@%s:\n%s%s", l.name, backend.name, out, err))
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user