Repository: borgbackup/borg

Issue:
stats argument of borg create with a remote repository doesn't work without verbose
LS, in current stable version 1.0.10 `borg create --progress --stats` with a remote repository doesn't work without adding the *verbose* parameter, ie `borg create --progress --stats --verbose`. 

It seems stats should work regardless of the verbose setting?

Regards,
Ronald


Discussion:
In 1.0 you also need to supply -v/--verbose (see examples in docs)

In 1.1 --stats itself is enough.

Duplicate of #771, #865, #1958, #2511

https://borgbackup.readthedocs.io/en/stable/usage.html#type-of-log-output
Sorry, for missing those!

Although it may look like I dind't read anyhting, I did look up the description of the stats argument in the man page:
```
 -s, --stats           print statistics for the created archive
```
The crucial information of the required logging output is located in another (non-related) section of the man page. 

I guess this would solve this (and prevent future duplicate issues like mine ;):

```diff
--- borg-create.1.ori   2017-05-21 12:54:09.855358858 +0200
+++ borg-create.1       2017-05-21 12:58:05.148575608 +0200
@@ -88,10 +88,10 @@
 do not create a backup archive
 .TP
 .B \-s\fP,\fB  \-\-stats
-print statistics for the created archive
+print statistics for the created archive (requires at least INFO logging output)
 .TP
 .B \-\-list
-output verbose list of items (files, dirs, ...)
+output verbose list of items (files, dirs, ...)  (requires at least INFO logging output)
 .TP
 .BI \-\-filter \ STATUSCHARS
 only display items with the given status characters
```

Cheers,
Ronald




Resolving patch:
diff --git a/borg/archiver.py b/borg/archiver.py
--- a/borg/archiver.py
+++ b/borg/archiver.py
@@ -1371,7 +1371,7 @@ def build_parser(self, args=None, prog=None):
         subparser.set_defaults(func=self.do_create)
         subparser.add_argument('-s', '--stats', dest='stats',
                                action='store_true', default=False,
-                               help='print statistics for the created archive')
+                               help='print statistics for the created archive. Requires -v/--verbose.')
         subparser.add_argument('-p', '--progress', dest='progress',
                                action='store_true', default=False,
                                help="""show progress display while creating the archive, showing Original,
@@ -1379,7 +1379,7 @@ def build_parser(self, args=None, prog=None):
                                and the path being processed, default: %(default)s""")
         subparser.add_argument('--list', dest='output_list',
                                action='store_true', default=False,
-                               help='output verbose list of items (files, dirs, ...)')
+                               help='output verbose list of items (files, dirs, ...). Requires -v/--verbose.')
         subparser.add_argument('--filter', dest='output_filter', metavar='STATUSCHARS',
                                help='only display items with the given status characters')
         subparser.add_argument('-e', '--exclude', dest='excludes',
@@ -1462,7 +1462,7 @@ def build_parser(self, args=None, prog=None):
         subparser.set_defaults(func=self.do_extract)
         subparser.add_argument('--list', dest='output_list',
                                action='store_true', default=False,
-                               help='output verbose list of items (files, dirs, ...)')
+                               help='output verbose list of items (files, dirs, ...). Requires -v/--verbose.')
         subparser.add_argument('-n', '--dry-run', dest='dry_run',
                                default=False, action='store_true',
                                help='do not actually change any files')
@@ -1522,7 +1522,7 @@ def build_parser(self, args=None, prog=None):
                                help="""show progress display while deleting a single archive""")
         subparser.add_argument('-s', '--stats', dest='stats',
                                action='store_true', default=False,
-                               help='print statistics for the deleted archive')
+                               help='print statistics for the deleted archive. Requires -v/--verbose.')
         subparser.add_argument('-c', '--cache-only', dest='cache_only',
                                action='store_true', default=False,
                                help='delete only the local cache for the given repository')
@@ -1692,10 +1692,10 @@ def build_parser(self, args=None, prog=None):
                                help='force pruning of corrupted archives')
         subparser.add_argument('-s', '--stats', dest='stats',
                                action='store_true', default=False,
-                               help='print statistics for the deleted archive')
+                               help='print statistics for the deleted archive. Requires -v/--verbose.')
         subparser.add_argument('--list', dest='output_list',
                                action='store_true', default=False,
-                               help='output verbose list of archives it keeps/prunes')
+                               help='output verbose list of archives it keeps/prunes. Requires -v/--verbose.')
         subparser.add_argument('--keep-within', dest='within', type=str, metavar='WITHIN',
                                help='keep all archives within this time interval')
         subparser.add_argument('-H', '--keep-hourly', dest='hourly', type=int, default=0,


Test patch: