M-Welsch / base-bcu

Backup Server's (BaSe) backup control unit (bcu). Python software that controls the high level functionality of BaSe
1 stars 0 forks source link

File copy to virtual hdd takes long #70

Open M-Welsch opened 1 year ago

M-Welsch commented 1 year ago
def copy_preexisting_sourcefiles_into_latest_backup(
    backup_source_dir: Path, backup_target_base_dir: Path, amount_preexisting_source_files_in_latest_backup: int
) -> None:
    latest_backup = max(backup_target_base_dir.glob("*"))
    source_files = backup_source_dir.glob("*")
    for _ in range(amount_preexisting_source_files_in_latest_backup):
        try:
            next_sourcefile = next(source_files)
            copy(next_sourcefile, latest_backup)  # Fixme: this takes really long and
        except StopIteration:
            print("not enough files in source to copy to target!")
            break

this is where this issue came up. Probably also problematic when trying to copy other test data

M-Welsch commented 1 year ago

for some reason copying the data takes really long. If we wait for copy to finish, it takes really long, but it works.