Corsinvest / cv4pve-barc

Backup And Restore Ceph for Proxmox VE
https://www.cv4pve-tools.com
GNU General Public License v3.0
83 stars 22 forks source link

snapshot housekeeping dies on missing snapshot - why? #60

Open alyarb opened 4 years ago

alyarb commented 4 years ago

If the barc snapshot is missing from the RBD, it aborts. who would want that functionality?

consider the current code:

#Snapshot Housekeeping..                
                #find last snapshot in ceph
                latest_snap=$(rbd snap ls "$image_spec" | \
                              awk '{print $2}' | \
                              grep "$opt_label" | sort -r | head -n 1)

                #not exist snapshot on rbd
                if [ -z "$latest_snap" ]; then
                    log error "VM $vm_id - Ceph last snapshot '$image_spec' not found!";                    
                    call_hook_script "export-diff-abort" "-" "-"                 
                    rc=30                         
                    break;
                fi

We want to backup this VM/disk... the snapshot is merely a means to an end. If it's missing, forget about it, create a new one, and do a new run with renew=0....?

lephisto commented 4 years ago

THis is to protect you from a broken incremental snapshot chain in your backups.

I have plans to auto-fix this, eg make a full backup if the Snap is missing. Currently the sanity of the Backupchain has to be taken care of manually.

alyarb commented 4 years ago

Thank you, looking forward to an update