mirror of
https://github.com/borgbackup/borg.git
synced 2026-04-28 17:46:53 -04:00
commit
c2fd187cd8
34 changed files with 70 additions and 40 deletions
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-BENCHMARK-CRUD 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-BENCHMARK-CRUD 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-benchmark-crud \- Benchmark Create, Read, Update, Delete for archives.
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-BENCHMARK 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-BENCHMARK 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-benchmark \- benchmark command
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-BREAK-LOCK 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-BREAK-LOCK 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-break-lock \- Break the repository lock (e.g. in case it was left by a dead borg.
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-CHANGE-PASSPHRASE 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-CHANGE-PASSPHRASE 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-change-passphrase \- Change repository key file passphrase
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-CHECK 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-CHECK 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-check \- Check repository consistency
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-COMMON 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-COMMON 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-common \- Common options of Borg commands
|
||||
.
|
||||
|
|
@ -69,9 +69,6 @@ show/log the borg version
|
|||
.B \-\-show\-rc
|
||||
show/log the return code (rc)
|
||||
.TP
|
||||
.B \-\-no\-files\-cache
|
||||
do not load/update the file metadata cache used to detect unchanged files
|
||||
.TP
|
||||
.BI \-\-umask \ M
|
||||
set umask to M (local and remote, default: 0077)
|
||||
.TP
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-COMPRESSION 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-COMPRESSION 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-compression \- Details regarding compression
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-CREATE 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-CREATE 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-create \- Create new archive
|
||||
.
|
||||
|
|
@ -142,6 +142,9 @@ output stats as JSON. Implies \fB\-\-stats\fP\&.
|
|||
.TP
|
||||
.B \-\-no\-cache\-sync
|
||||
experimental: do not synchronize the cache. Implies not using the files cache.
|
||||
.TP
|
||||
.B \-\-no\-files\-cache
|
||||
do not load/update the file metadata cache used to detect unchanged files
|
||||
.UNINDENT
|
||||
.SS Exclusion options
|
||||
.INDENT 0.0
|
||||
|
|
@ -166,6 +169,9 @@ exclude directories that are tagged by containing a filesystem object with the g
|
|||
.TP
|
||||
.B \-\-keep\-exclude\-tags\fP,\fB \-\-keep\-tag\-files
|
||||
if tag objects are specified with \fB\-\-exclude\-if\-present\fP, don\(aqt omit the tag objects themselves from the backup archive
|
||||
.TP
|
||||
.B \-\-exclude\-nodump
|
||||
exclude files flagged NODUMP
|
||||
.UNINDENT
|
||||
.SS Filesystem options
|
||||
.INDENT 0.0
|
||||
|
|
@ -182,6 +188,9 @@ do not store atime into archive
|
|||
.B \-\-noctime
|
||||
do not store ctime into archive
|
||||
.TP
|
||||
.B \-\-nobsdflags
|
||||
do not read and store bsdflags (e.g. NODUMP, IMMUTABLE) into archive
|
||||
.TP
|
||||
.B \-\-ignore\-inode
|
||||
ignore inode data in the file metadata cache used to detect unchanged files.
|
||||
.TP
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-DELETE 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-DELETE 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-delete \- Delete an existing repository or archives
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-DIFF 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-DIFF 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-diff \- Diff contents of two archives
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-EXPORT-TAR 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-EXPORT-TAR 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-export-tar \- Export archive contents as a tarball
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-EXTRACT 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-EXTRACT 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-extract \- Extract archive contents
|
||||
.
|
||||
|
|
@ -80,6 +80,9 @@ do not actually change any files
|
|||
.B \-\-numeric\-owner
|
||||
only obey numeric user and group identifiers
|
||||
.TP
|
||||
.B \-\-nobsdflags
|
||||
do not extract/set bsdflags (e.g. NODUMP, IMMUTABLE)
|
||||
.TP
|
||||
.B \-\-stdout
|
||||
write all extracted data to stdout
|
||||
.TP
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-INFO 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-INFO 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-info \- Show archive details such as disk space used
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-INIT 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-INIT 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-init \- Initialize an empty repository
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-KEY-CHANGE-PASSPHRASE 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-KEY-CHANGE-PASSPHRASE 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-key-change-passphrase \- Change repository key file passphrase
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-KEY-EXPORT 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-KEY-EXPORT 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-key-export \- Export the repository key for backup
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-KEY-IMPORT 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-KEY-IMPORT 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-key-import \- Import the repository key from backup
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-KEY-MIGRATE-TO-REPOKEY 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-KEY-MIGRATE-TO-REPOKEY 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-key-migrate-to-repokey \- Migrate passphrase -> repokey
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-KEY 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-KEY 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-key \- Manage a keyfile or repokey of a repository
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-LIST 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-LIST 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-list \- List archive or repository contents
|
||||
.
|
||||
|
|
@ -128,7 +128,7 @@ lrwxrwxrwx root root 0 Fri, 2015\-03\-27 20:24:26 bin/bzcmp \-> bzdif
|
|||
\-rwxr\-xr\-x root root 2140 Fri, 2015\-03\-27 20:24:22 bin/bzdiff
|
||||
\&...
|
||||
|
||||
$ borg list /path/to/repo::archiveA \-\-list\-format="{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}"
|
||||
$ borg list /path/to/repo::archiveA \-\-format="{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}"
|
||||
drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 .
|
||||
drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code
|
||||
drwxrwxr\-x user user 0 Sun, 2015\-02\-01 11:00:00 code/myproject
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-MOUNT 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-MOUNT 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-mount \- Mount archive or an entire repository as a FUSE filesystem
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-PATTERNS 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-PATTERNS 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-patterns \- Details regarding patterns
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-PLACEHOLDERS 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-PLACEHOLDERS 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-placeholders \- Details regarding placeholders
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-PRUNE 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-PRUNE 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-prune \- Prune repository archives according to specified rules
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-RECREATE 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-RECREATE 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-recreate \- Re-create archives
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-RENAME 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-RENAME 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-rename \- Rename an existing archive
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-SERVE 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-SERVE 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-serve \- Start in server mode. This command is usually not used manually.
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-UMOUNT 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-UMOUNT 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-umount \- un-mount the FUSE filesystem
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-UPGRADE 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-UPGRADE 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-upgrade \- upgrade a repository from a previous version
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH BORG-WITH-LOCK 1 "2017-10-07" "" "borg backup tool"
|
||||
.TH BORG-WITH-LOCK 1 "2017-10-22" "" "borg backup tool"
|
||||
.SH NAME
|
||||
borg-with-lock \- run a user specified command with the repository lock held
|
||||
.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
--lock-wait SECONDS wait at most SECONDS for acquiring a repository/cache lock (default: 1).
|
||||
--show-version show/log the borg version
|
||||
--show-rc show/log the return code (rc)
|
||||
--no-files-cache do not load/update the file metadata cache used to detect unchanged files
|
||||
--umask M set umask to M (local and remote, default: 0077)
|
||||
--remote-path PATH use PATH as borg executable on the remote (default: "borg")
|
||||
--remote-ratelimit RATE set remote network upload rate limit in kiByte/s (default: 0=unlimited)
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ borg create
|
|||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``--no-cache-sync`` | experimental: do not synchronize the cache. Implies not using the files cache. |
|
||||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``--no-files-cache`` | do not load/update the file metadata cache used to detect unchanged files |
|
||||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| .. class:: borg-common-opt-ref |
|
||||
| |
|
||||
| :ref:`common_options` |
|
||||
|
|
@ -53,6 +55,8 @@ borg create
|
|||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``--keep-exclude-tags``, ``--keep-tag-files`` | if tag objects are specified with ``--exclude-if-present``, don't omit the tag objects themselves from the backup archive |
|
||||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``--exclude-nodump`` | exclude files flagged NODUMP |
|
||||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| **Filesystem options** |
|
||||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``-x``, ``--one-file-system`` | stay in the same file system and do not store mount points of other file systems |
|
||||
|
|
@ -63,6 +67,8 @@ borg create
|
|||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``--noctime`` | do not store ctime into archive |
|
||||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``--nobsdflags`` | do not read and store bsdflags (e.g. NODUMP, IMMUTABLE) into archive |
|
||||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``--ignore-inode`` | ignore inode data in the file metadata cache used to detect unchanged files. |
|
||||
+-------------------------------------------------------+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| | ``--files-cache MODE`` | operate files cache in MODE. default: ctime,size,inode |
|
||||
|
|
@ -105,6 +111,7 @@ borg create
|
|||
--filter STATUSCHARS only display items with the given status characters (see description)
|
||||
--json output stats as JSON. Implies ``--stats``.
|
||||
--no-cache-sync experimental: do not synchronize the cache. Implies not using the files cache.
|
||||
--no-files-cache do not load/update the file metadata cache used to detect unchanged files
|
||||
|
||||
|
||||
:ref:`common_options`
|
||||
|
|
@ -118,6 +125,7 @@ borg create
|
|||
--exclude-caches exclude directories that contain a CACHEDIR.TAG file (http://www.brynosaurus.com/cachedir/spec.html)
|
||||
--exclude-if-present NAME exclude directories that are tagged by containing a filesystem object with the given NAME
|
||||
--keep-exclude-tags, --keep-tag-files if tag objects are specified with ``--exclude-if-present``, don't omit the tag objects themselves from the backup archive
|
||||
--exclude-nodump exclude files flagged NODUMP
|
||||
|
||||
|
||||
Filesystem options
|
||||
|
|
@ -125,6 +133,7 @@ borg create
|
|||
--numeric-owner only store numeric user and group identifiers
|
||||
--noatime do not store atime into archive
|
||||
--noctime do not store ctime into archive
|
||||
--nobsdflags do not read and store bsdflags (e.g. NODUMP, IMMUTABLE) into archive
|
||||
--ignore-inode ignore inode data in the file metadata cache used to detect unchanged files.
|
||||
--files-cache MODE operate files cache in MODE. default: ctime,size,inode
|
||||
--read-special open and read block and char device files as well as FIFOs as if they were regular files. Also follows symlinks pointing to these kinds of files.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ borg extract
|
|||
+-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| | ``--numeric-owner`` | only obey numeric user and group identifiers |
|
||||
+-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| | ``--nobsdflags`` | do not extract/set bsdflags (e.g. NODUMP, IMMUTABLE) |
|
||||
+-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| | ``--stdout`` | write all extracted data to stdout |
|
||||
+-------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
|
||||
| | ``--sparse`` | create holes in output sparse file from all-zero chunks |
|
||||
|
|
@ -68,6 +70,7 @@ borg extract
|
|||
--list output verbose list of items (files, dirs, ...)
|
||||
-n, --dry-run do not actually change any files
|
||||
--numeric-owner only obey numeric user and group identifiers
|
||||
--nobsdflags do not extract/set bsdflags (e.g. NODUMP, IMMUTABLE)
|
||||
--stdout write all extracted data to stdout
|
||||
--sparse create holes in output sparse file from all-zero chunks
|
||||
|
||||
|
|
|
|||
|
|
@ -169,6 +169,18 @@ def parse_storage_quota(storage_quota):
|
|||
return parsed
|
||||
|
||||
|
||||
def get_func(args):
|
||||
# This works around http://bugs.python.org/issue9351
|
||||
# func is used at the leaf parsers of the argparse parser tree,
|
||||
# fallback_func at next level towards the root,
|
||||
# fallback2_func at the 2nd next level (which is root in our case).
|
||||
for name in 'func', 'fallback_func', 'fallback2_func':
|
||||
func = getattr(args, name, None)
|
||||
if func is not None:
|
||||
return func
|
||||
raise Exception('expected func attributes not found')
|
||||
|
||||
|
||||
class Archiver:
|
||||
|
||||
def __init__(self, lock_wait=None, prog=None):
|
||||
|
|
@ -2429,7 +2441,7 @@ class Archiver:
|
|||
|
||||
parser = argparse.ArgumentParser(prog=self.prog, description='Borg - Deduplicated Backups',
|
||||
add_help=False)
|
||||
parser.set_defaults(func=functools.partial(self.do_maincommand_help, parser))
|
||||
parser.set_defaults(fallback2_func=functools.partial(self.do_maincommand_help, parser))
|
||||
parser.common_options = self.CommonOptions(define_common_options,
|
||||
suffix_precedence=('_maincommand', '_midcommand', '_subcommand'))
|
||||
parser.add_argument('-V', '--version', action='version', version='%(prog)s ' + __version__,
|
||||
|
|
@ -3884,8 +3896,7 @@ class Archiver:
|
|||
parser = self.build_parser()
|
||||
args = parser.parse_args(args or ['-h'])
|
||||
parser.common_options.resolve(args)
|
||||
# This works around http://bugs.python.org/issue9351
|
||||
func = getattr(args, 'func', None) or getattr(args, 'fallback_func')
|
||||
func = get_func(args)
|
||||
if func == self.do_create and not args.paths:
|
||||
# need at least 1 path but args.paths may also be populated from patterns
|
||||
parser.error('Need at least one PATH argument.')
|
||||
|
|
@ -3921,8 +3932,7 @@ class Archiver:
|
|||
def run(self, args):
|
||||
os.umask(args.umask) # early, before opening files
|
||||
self.lock_wait = args.lock_wait
|
||||
# This works around http://bugs.python.org/issue9351
|
||||
func = getattr(args, 'func', None) or getattr(args, 'fallback_func')
|
||||
func = get_func(args)
|
||||
# do not use loggers before this!
|
||||
is_serve = func == self.do_serve
|
||||
setup_logging(level=args.log_level, is_serve=is_serve, json=args.log_json)
|
||||
|
|
|
|||
Loading…
Reference in a new issue