lamw / ghettoVCB

ghettoVCB
MIT License
1.29k stars 365 forks source link

Sometimes STATUS.ok not created #234

Open madiwodo opened 3 years ago

madiwodo commented 3 years ago

When a large VM is backed up (without errors) sometimes the file STATUS.ok is not created. We use NFS storage and I think the file is not created because of an NFS timeout on the NAS.

I have added this to the script: logger "info" "Successfully completed backup for ${VM_NAME}!\n" **# Added the NFS_IO_HACK check and function call here. Some NAS devices slow during the write of the files.

Added the Brute-force delay in case it is needed.

                if [[ "${ENABLE_NFS_IO_HACK}" -eq 1 ]]; then
                    NfsIoHack
                    sleep "${NFS_BACKUP_DELAY}"
                fi**
                [[ ${ENABLE_COMPRESSION} -eq 1 ]] && [[ $COMPRESSED_OK -eq 1 ]] || echo "Successfully completed backup" > ${VM_BACKUP_DIR}/STATUS.ok
                VM_OK=1

Maybe an idea to add it?