gkiefer / backup2l

backup2l - A Low-Maintenance Backup/Restore Tool
https://gkiefer.github.io/backup2l
GNU General Public License v2.0
47 stars 16 forks source link

Filesize mismatch in Summary Info #13

Closed ComradePashka closed 1 year ago

ComradePashka commented 6 years ago

Hello Gundolf!

I am using your script and seems that summary information in mail reports is generated before archive is completely created.

Here is little piece of the mail report:

Wed Jul 18 05:42:18 BST 2018

Summary
=======

Backup       Date       Time  |  Size   | Skipped  Files+D |  New  Obs. | Err.
------------------------------------------------------------------------------
backup.1     2018-06-30 01:05 |  231.5G |       6  3764015 |3764015     0 |    0
backup.2     2018-07-09 01:06 |  113.7G |       7  3766091 |3766091     0 |    0
backup.21    2018-07-10 01:05 |    0.1G |       7  3766143 |  335   283 |    0
backup.22    2018-07-11 01:03 |    0.1G |       7  3766173 |  443   413 |    0
backup.23    2018-07-12 01:03 |    0.1G |       7  3766230 |  379   322 |    0
backup.24    2018-07-13 01:02 |    0.1G |       7  3766417 |  502   315 |    0
backup.25    2018-07-14 01:03 |    0.1G |       7  3766513 |  434   338 |    0
backup.26    2018-07-15 01:03 |    0.1G |       7  3766583 |  386   316 |    0
backup.27    2018-07-16 01:03 |    0.1G |       7  3766647 |  395   331 |    0
backup.3     2018-07-18 01:06 |   42.3G |       7  3766928 |3766928     0 |    0

while actual size for backup.3.tar.gz is 238039M (~238GiB). Sizes for backup1 and backup2 looks correct so the issue happens just time to time. It's not really big problem, but everytime I need to check backup filesizes manually to be sure that they was created succesfully.

I am using backup2l v1.6-pre2 Please, let me know if you need more details. Thank you.

gkiefer commented 6 years ago

The size of the archive is determined freshly at the time the summary is printed, this line is responsible for that:

https://github.com/gkiefer/backup2l/blob/461f446fdfc01d9a98b0a41a66baca5df6ea20ba/backup2l#L591

The reported discrepancies may be due to some special behavior of the file system you use (e.g. caching, delayed writing) in conjunction with the 'du' utility. Your may check and run the 'du' command manually again.

For further help, I would need to know:

BTW: If a backup is not created successfully, this will very very likely be noticable by an error message in the log and/or by a discrepancy during backup2l's built-in TOC check (-> column 'Errors' in the summary).