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

Estimate increment size before backup #25

Closed M-Welsch closed 2 years ago

M-Welsch commented 2 years ago

Currenty the base-bcu keeps enough free space on the backup hdd to take a full backup from the source. This is very inefficient since an increment is likely much smaller than a whole backup.

We need a way to determine how much space needs to be free on the backup hdd before the backup is executed. The --stats parameter of rsync seems to provide that information.

rsync --dry-run -vvv /home/max/Desktop/rsync/source/* /home/max/Desktop/rsync/sink/ --stats

M-Welsch commented 2 years ago

The upper command has to be run with Popen(command, shell=True) since the /* behind the source directory is processed within the shell. Moreover the command has to be a string, not a list in that case.

M-Welsch commented 2 years ago

implemented