From ea35af585c62cc731a11ee35558188c24737df64 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 30 Nov 2008 03:57:47 +0200 Subject: Remove stuff that will be rewritten. --- obnam | 84 ------------------------------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100755 obnam (limited to 'obnam') diff --git a/obnam b/obnam deleted file mode 100755 index 443c2125..00000000 --- a/obnam +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2006, 2007, 2008 Lars Wirzenius -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - -"""A backup program""" - - -import logging -import sys -import traceback - -import obnamlib - - -def main(): - try: - context = obnamlib.context.Context() - args = obnamlib.config.parse_options(context.config, sys.argv[1:]) - context.map.max = context.config.getint("backup", "max-mappings") - context.contmap.max = context.config.getint("backup", "max-mappings") - context.cache = obnamlib.cache.Cache(context.config) - context.be = obnamlib.backend.init(context.config, context.cache) - context.be.set_progress_reporter(context.progress) - app = obnamlib.Application(context) - - obnamlib.log.setup(context.config) - - logging.info("%s %s starting up" % (obnamlib.NAME, obnamlib.VERSION)) - - try: - factory = obnamlib.OperationFactory(app) - oper = factory.get_operation(args) - oper.do_it(args[1:]) - - logging.info("Store I/O: %d kB read, %d kB written" % - (context.be.get_bytes_read() / 1024, - context.be.get_bytes_written() / 1024)) - logging.info("Obnam finishing") - context.progress.final_report() - if app.get_store(): - app.get_store().close() - except KeyboardInterrupt: - logging.warning("Obnam interrupted by Control-C, aborting.") - logging.warning("Note that backup has not been completed.") - sys.stderr.write("Obnam interrupted by Control-C, aborting.\n") - sys.stderr.write("Note that backup has not been completed.\n") - if app.get_store(): - app.get_store().close() - sys.exit(1) - except obnamlib.ObnamException, e: - logging.error("%s" % str(e)) - sys.stderr.write("%s\n" % str(e)) - if app.get_store(): - app.get_store().close() - sys.exit(1) - except SystemExit: - sys.exit(1) - except BaseException, e: - logging.error("%s" % repr(e)) - logging.error("%s" % traceback.format_exc()) - sys.stderr.write("%s\n" % repr(e)) - sys.stderr.write("%s\n" % traceback.format_exc()) - if app.get_store(): - app.get_store().close() - sys.exit(1) - - -if __name__ == "__main__": - main() -- cgit v1.2.1