Project

General

Profile

Actions

Bug #7655

open

mentat-backup doesn't delete old files

Added by Rajmund Hruška over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Development - Core
Target version:
Start date:
05/17/2023
Due date:
% Done:

0%

Estimated time:
To be discussed:
No

Description

As it was found out by Jakub Judiny, mentat-backup.py contains this block of code:

if False and not self.c(self.CONFIG_NO_UPLOAD):
    # Mount the remote directory to local directory.
    self._remote_mount(self.c(self.CONFIG_MOUNT_POINT))

    # Move the backup file to remote storage.
    self._copy_to_remote(backup_file, self.c(self.CONFIG_MOUNT_POINT), self.c(self.CONFIG_INTERVAL))

    # Trim the locally present backup files.
    self._clean_local_backups(backup_mask, backup_file)

    # Unmount the remote directory from local directory.
    self._remote_unmount(self.c(self.CONFIG_MOUNT_POINT))

    # Update persistent state.
    self.pstate['ts_last_' + self.c(self.CONFIG_INTERVAL)] = time.time()

Obviously, this code is never executed. This results in low disk space as the old backups are not deleted.

Actions

Also available in: Atom PDF