Package duplicity :: Module commandline
[hide private]
[frames] | no frames]

Module commandline

source code

Parse command line, check for consistency, and set globals

Classes [hide private]
  DupOption
  OPHelpFix
Functions [hide private]
 
old_fn_deprecation(opt) source code
 
expand_fn(filename) source code
 
expand_archive_dir(archdir, backname)
Return expanded version of archdir joined with backname.
source code
 
generate_default_backup_name(backend_url) source code
 
check_file(option, opt, value) source code
 
check_time(option, opt, value) source code
 
check_verbosity(option, opt, value) source code
 
parse_cmdline_options(arglist)
Parse argument list
source code
 
command_line_error(message)
Indicate a command line error and exit
source code
 
usage()
Returns terse usage info.
source code
 
set_archive_dir(dirstring)
Check archive dir and set global
source code
 
set_sign_key(sign_key)
Set globals.sign_key assuming proper key given
source code
 
set_selection()
Return selection iter starting at filename with arguments applied
source code
 
args_to_path_backend(arg1, arg2)
Given exactly two arguments, arg1 and arg2, figure out which one is the backend URL and which one is a local path, and return (local, backend).
source code
 
set_backend(arg1, arg2)
Figure out which arg is url, set backend
source code
 
process_local_dir(action, local_pathname)
Check local directory, set globals.local_path
source code
 
check_consistency(action)
Final consistency check, see if something wrong with command line
source code
 
ProcessCommandLine(cmdline_list)
Process command line, set globals, return action
source code
Variables [hide private]
  select_opts = []
  select_files = []
  full_backup = None
hash(x)
  list_current = None
hash(x)
  collection_status = None
hash(x)
  cleanup = None
hash(x)
  verify = None
hash(x)
  commands = ["cleanup", "collection-status", "full", "increment...
Function Details [hide private]

generate_default_backup_name(backend_url)

source code 
Parameters:
  • backend_url - URL to backend. @returns A default backup name (string).

usage()

source code 

Returns terse usage info. The code is broken down into pieces for ease of translation maintenance. Any comments that look extraneous or redundant should be assumed to be for the benefit of translators, since they can get each string (paired with its preceding comment, if any) independently of the others.

set_backend(arg1, arg2)

source code 

Figure out which arg is url, set backend

Return value is pair (path_first, path) where is_first is true iff path made from arg1.

ProcessCommandLine(cmdline_list)

source code 

Process command line, set globals, return action

action will be "list-current", "collection-status", "cleanup", "remove-old", "restore", "verify", "full", or "inc".


Variables Details [hide private]

commands

Value:
["cleanup", "collection-status", "full", "incremental", "list-current-\
files", "remove-older-than", "remove-all-but-n-full", "remove-all-inc-\
of-but-n-full", "restore", "verify",]