After successful full backup, delete the entire diff backup directory, since it should technically all be out of date

This commit is contained in:
Mike 2019-08-05 01:24:39 -07:00
parent 6b70a22b52
commit 4a0d4abc54

View File

@ -334,7 +334,7 @@ class MikesBackup:
self.log("Automatically choosing full backup, because full backup destination directory wasn't found")
self.do_full_backup()
# TODO: Full backups should clean out the differentials directory
#
def do_full_backup(self):
# Start args
@ -355,6 +355,16 @@ class MikesBackup:
self.execute_rsync(args)
self.log("Rsync seems to have finished successfully")
self.log("Because a full backup has succeeded, will now delete any differential backups")
self.execute_remote_ssh_command(
[
"rm",
"-rfv",
self.make_remote_differential_backup_path_base()
])
self.log("Finished deleting old differentials")
#
def do_differential_backup(self):