mirror of
https://github.com/restic/restic.git
synced 2026-05-06 02:25:23 +00:00
Merge pull request #4822 from MichaelEischer/consistent-backup-source-name
backup: refer to backed up data as backup source not target
This commit is contained in:
@@ -101,7 +101,7 @@ func init() {
|
||||
f.StringVar(&backupOptions.Parent, "parent", "", "use this parent `snapshot` (default: latest snapshot in the group determined by --group-by and not newer than the timestamp determined by --time)")
|
||||
backupOptions.GroupBy = restic.SnapshotGroupByOptions{Host: true, Path: true}
|
||||
f.VarP(&backupOptions.GroupBy, "group-by", "g", "`group` snapshots by host, paths and/or tags, separated by comma (disable grouping with '')")
|
||||
f.BoolVarP(&backupOptions.Force, "force", "f", false, `force re-reading the target files/directories (overrides the "parent" flag)`)
|
||||
f.BoolVarP(&backupOptions.Force, "force", "f", false, `force re-reading the source files/directories (overrides the "parent" flag)`)
|
||||
|
||||
initExcludePatternOptions(f, &backupOptions.excludePatternOptions)
|
||||
|
||||
@@ -158,7 +158,7 @@ func filterExisting(items []string) (result []string, err error) {
|
||||
}
|
||||
|
||||
if len(result) == 0 {
|
||||
return nil, errors.Fatal("all target directories/files do not exist")
|
||||
return nil, errors.Fatal("all source directories/files do not exist")
|
||||
}
|
||||
|
||||
return
|
||||
@@ -403,7 +403,7 @@ func collectTargets(opts BackupOptions, args []string) (targets []string, err er
|
||||
// and have the ability to use both files-from and args at the same time.
|
||||
targets = append(targets, args...)
|
||||
if len(targets) == 0 && !opts.Stdin {
|
||||
return nil, errors.Fatal("nothing to backup, please specify target files/dirs")
|
||||
return nil, errors.Fatal("nothing to backup, please specify source files/dirs")
|
||||
}
|
||||
|
||||
targets, err = filterExisting(targets)
|
||||
|
||||
Reference in New Issue
Block a user