diff options
author | xengineering <me@xengineering.eu> | 2021-10-09 11:47:40 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2021-10-09 11:47:40 +0200 |
commit | b862141bba2232fb05b79f7db7850952856f8324 (patch) | |
tree | 314c8c52cc1b521fe4ff436deac6eefa2bbbad33 | |
parent | 9416508e428fe501233cc2454c227050660d4aca (diff) | |
download | xbackup-b862141bba2232fb05b79f7db7850952856f8324.tar xbackup-b862141bba2232fb05b79f7db7850952856f8324.tar.zst xbackup-b862141bba2232fb05b79f7db7850952856f8324.zip |
Setup prune Module
-rw-r--r-- | src/xbackup/prune.py | 14 | ||||
-rw-r--r-- | src/xbackup/script.py | 5 |
2 files changed, 18 insertions, 1 deletions
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) |