Corsinvest / cv4pve-barc

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

Restore is not working and giving token is 0 error #61

Open symmcom opened 4 years ago

symmcom commented 4 years ago

I am trying to restore a VM that was backed up with eve4pve-barc. Whenever I try to restore it ends up with following error:

rbd: error opening image vm-104000031-disk-0: (2) No such file or directory
/usr/sbin/eve4pve-barc: line 1258: local: 0/0: division by 0 (error token is "0")

I did the delete the VM from Proxmox. Does the VM need to be present for me to restore?

MRLOLKOPF commented 4 years ago

Hi, looks like the same problem like I have: https://github.com/Corsinvest/cv4pve-barc/issues/54

symmcom commented 4 years ago

Hi, looks like the same problem like I have: #54

Yep, looks like exact issue. I am not seeing any work around to manually restore this VMs till a fix is in the code. Anyone any idea how to restore?

lephisto commented 4 years ago

How are you trying to restore it?

symmcom commented 4 years ago

How are you trying to restore it?

Yes I am. I also tried to assemble, neither worked. Version 0.21 however works as it always had been. For the time being I am backing up everything again from scratch using ver 0.2.1. At this moment the backup done with 0.2.5 is no good if i cannot restore it.

symmcom commented 4 years ago

Not trying to pester or anything, but any update on this issue? Restoring backups still remained impossible.

alyarb commented 3 years ago

update the regex on lines 1168 and 1194 with this

regex='^([0-9]+)([a-zA-Z0-9_-]+).(.).(diff|img).?(.)?'

franklupo commented 3 years ago

which version?

alyarb commented 3 years ago

0.2.5-renew, I just grabbed the latest one

On Thu, Aug 13, 2020 at 11:43 AM Daniele Corsini notifications@github.com wrote:

which version?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Corsinvest/cv4pve-barc/issues/61#issuecomment-673554022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5LXKJ6TQ3Z7AVWMJMK6JTSAQC35ANCNFSM4N5X2I5A .

franklupo commented 3 years ago

Please test new version

mrtwister76 commented 3 years ago

I'm having this issue on version 0.2.6 too. Tried restoring the backup to another PVE cluster & it doesn't seem to work.

I've tried without recreating a VM of the same ID & with creating a VM of the same ID. Each time I get the following output:

ACTION: Restore image
Start restore 2020-09-26 13:10:33 20200926100716ceph_vm_pool.vm-2014-disk-0.img.zz
Remove all snapshots
rbd: error opening image vm-2014-disk-0: (2) No such file or directory
ERROR: rbd snap purge ceph_vm_pool/vm-2014-disk-0
Backup 20200926100716ceph_vm_pool.vm-2014-disk-0.img.zz restored in ceph_vm_pool/vm-2014-disk-0 with success!
Consider to manually create VM/CT and change config file from backup adapting restored image.
End restore 2020-09-26 13:10:33
/mnt/backups/barc/cv4pve-barc/eve4pve-barc: line 1256: local: 0/0: division by 0 (error token is "0")

No disk image is restored to the Ceph storage in any case.

Any help appreciated! At present it's impossible to restore with version 0.2.6 for me, thus the backups are useless :(

mrtwister76 commented 3 years ago

This should be fixed in #73

alyarb commented 3 years ago

I had trouble with the newer regex as well so I went back to 0.2.5 with:

declare -r renum='^[0-9]+$' declare -r retime='([0-9]+)([d,w])$'

declare -r reimg='^.\/([0-9]+)([a-zA-Z0-9_-]+).(.).(diff|img).?(.*)?'

REMOVED BY AY

declare -r reimg='^([0-9]+)([a-zA-Z0-9_-]+).(.).(diff|img).?(.)?'

ADDED BY AY

declare -r redateex='^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})$'

sorry...

On Sat, Sep 26, 2020 at 12:47 PM mrtwister76 notifications@github.com wrote:

This should be fixed in #73 https://github.com/Corsinvest/cv4pve-barc/pull/73

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Corsinvest/cv4pve-barc/issues/61#issuecomment-699519341, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5LXKJXAKJBM3RQM7VM7BTSHYLJ3ANCNFSM4N5X2I5A .