From b862141bba2232fb05b79f7db7850952856f8324 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 9 Oct 2021 11:47:40 +0200 Subject: Setup prune Module --- src/xbackup/prune.py | 14 ++++++++++++++ src/xbackup/script.py | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/xbackup/prune.py (limited to 'src') diff --git a/src/xbackup/prune.py b/src/xbackup/prune.py new file mode 100644 index 0000000..03d1304 --- /dev/null +++ b/src/xbackup/prune.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 +# vim: shiftwidth=4 softtabstop=4 tabstop=4 expandtab + + +"""prune.py + +This module contains the pruning functionality of xbackup. +""" + + +def prune(): + """prune backups""" + + pass diff --git a/src/xbackup/script.py b/src/xbackup/script.py index d262fd5..d8ce01c 100644 --- a/src/xbackup/script.py +++ b/src/xbackup/script.py @@ -10,6 +10,7 @@ import sys from xbackup import config from xbackup import backup +from xbackup import prune def run(): @@ -22,6 +23,8 @@ def run(): if args.command == "backup": backup.backup(cfg["backup"], args.scripted) + elif args.command == "prune": + prune.prune() else: print(f"Unknown command '{args.command}'") sys.exit(1) @@ -43,7 +46,7 @@ def parse_arguments(): # main command argument (positional) parser.add_argument("command", type=str, help="the action to be performed", - choices=["backup"] + choices=["backup", "prune"] ) # path to configuration file (optional) -- cgit v1.2.3-70-g09d2