From 1159cd307798d8566ca216f2b3a2c97fedd235a1 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 24 Mar 2018 22:31:23 +0100 Subject: [PATCH] create: implement --stdin-name, fixes #3533 (cherry picked from commit 01d2f728131e3f3eb6e1722c69482d969a570347) --- src/borg/archiver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 6ba2f6ab3..dc4e86913 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -485,7 +485,7 @@ class Archiver: logger.debug('Processing files ...') for path in args.paths: if path == '-': # stdin - path = 'stdin' + path = args.stdin_name if not dry_run: try: status = archive.process_stdin(path, cache) @@ -3138,6 +3138,8 @@ class Archiver: help='experimental: do not synchronize the cache. Implies not using the files cache.') subparser.add_argument('--no-files-cache', dest='cache_files', action='store_false', help='do not load/update the file metadata cache used to detect unchanged files') + subparser.add_argument('--stdin-name', metavar='NAME', dest='stdin_name', default='stdin', + help='use NAME in archive for stdin data (default: "stdin")') exclude_group = define_exclusion_group(subparser, tag_files=True) exclude_group.add_argument('--exclude-nodump', dest='exclude_nodump', action='store_true',