Package CedarBackup2 :: Package tools :: Module span
[show private | hide private]
[frames | no frames]

Module CedarBackup2.tools.span

Spans staged data among multiple discs

This is the Cedar Backup span tool. It is intended for use by people who stage more data than can fit on a single disc. It allows a user to split staged data among more than one disc. It can't be an extension because it requires user input when switching media.

Most configuration is taken from the Cedar Backup configuration file, specifically the store section. A few pieces of configuration are taken directly from the user.

Author: Kenneth J. Pronovici <pronovic@ieee.org>

Classes
SpanOptions Tool-specific command-line options.

Function Summary
  cli()
Implements the command-line interface for the cback-span script.

Variable Summary
Logger logger = <logging.Logger instance at 0x403ed22c>

Function Details

cli()

Implements the command-line interface for the cback-span script.

Essentially, this is the "main routine" for the cback-span script. It does all of the argument processing for the script, and then also implements the tool functionality.

This function looks pretty similiar to CedarBackup2.cli.cli(). It's not easy to refactor this code to make it reusable and also readable, so I've decided to just live with the duplication.

A different error code is returned for each type of failure:
  • 1: The Python interpreter version is < 2.3
  • 2: Error processing command-line arguments
  • 3: Error configuring logging
  • 4: Error parsing indicated configuration file
  • 5: Backup was interrupted with a CTRL-C or similar
  • 6: Error executing other parts of the script
Returns:
Error code as described above.

Note: This script uses print rather than logging to the INFO level, because it is interactive. Underlying Cedar Backup functionality uses the logging mechanism exclusively.


Variable Details

logger

Type:
Logger
Value:
<logging.Logger instance at 0x403ed22c>                                

Generated by Epydoc 2.1 on Thu Mar 29 20:58:29 2007 http://epydoc.sf.net