Check file size matches.
This commit is contained in:
parent
3c5ef98636
commit
4f1c7f6ebb
2 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
name: "Minio Backup"
|
||||
version: "0.0.8"
|
||||
version: "0.0.9"
|
||||
slug: minio-backup
|
||||
description: >-
|
||||
"Backup the backup folder using minio."
|
||||
|
|
|
@ -52,8 +52,12 @@ def main():
|
|||
else:
|
||||
obj = objects[file.name]
|
||||
logger.info("File %s already exists in s3", file.name)
|
||||
logger.info("s3_size", obj.size)
|
||||
logger.info("local_size", file.stat().st_size)
|
||||
if obj.size != file.stat().st_size:
|
||||
logger.warning(
|
||||
"Size in s3 (%s) is different to local size (%s)",
|
||||
obj.size[0],
|
||||
file.stat().st_size,
|
||||
)
|
||||
|
||||
logger.warning(
|
||||
"The following files do not already exist and will be backed up: %s", to_upload
|
||||
|
|
Loading…
Reference in a new issue