Merge "borg-backup-server: add script for pruning borg backups"

This commit is contained in:
Zuul
2021-02-10 01:28:33 +00:00
committed by Gerrit Code Review
4 changed files with 59 additions and 0 deletions

View File

@@ -88,3 +88,11 @@ def test_borg_backup(host):
# unmount it for sanity
cmd = host.run('umount /opt/backups')
assert cmd.succeeded
def test_borg_server_prune(host):
hostname = host.backend.get_hostname()
if hostname.startswith('borg-backup-test'):
pytest.skip()
cmd = host.run('echo "prune" | /usr/local/bin/prune-borg-backups 2>&1 > /var/log/prune-borg-backups.log')
assert cmd.succeeded