Solved order bug

This commit is contained in:
Kevin Veen-Birkenbach 2024-01-11 15:56:34 +01:00
parent 7fe1886ff9
commit f057104a65
1 changed files with 1 additions and 2 deletions

View File

@ -153,10 +153,9 @@ def backup_volume(volume_name, volume_dir):
"""Backup files of a volume with incremental backups."""
print(f"Starting backup routine for volume: {volume_name}")
files_rsync_destination_path = getFileRsyncDestinationPath(volume_dir)
pathlib.Path(files_rsync_destination_path).mkdir(parents=True, exist_ok=True)
last_backup_dir = get_last_backup_dir(volume_name, files_rsync_destination_path)
link_dest_option = f"--link-dest='{last_backup_dir}'" if last_backup_dir else ""
pathlib.Path(files_rsync_destination_path).mkdir(parents=True, exist_ok=True)
source_dir = getStoragePath(volume_name)
rsync_command = f"rsync -abP --delete --delete-excluded {link_dest_option} {source_dir} {files_rsync_destination_path}"