Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleting snapshots after exporting and bugs after #15 upgrade #16

Closed
Ogy opened this issue Sep 25, 2017 · 15 comments
Closed

deleting snapshots after exporting and bugs after #15 upgrade #16

Ogy opened this issue Sep 25, 2017 · 15 comments

Comments

@Ogy
Copy link

Ogy commented Sep 25, 2017

Hi, really great work, thanks for it.
Please consider deleting old snapshots after successful export of all images, not between exporting.
And there is a bug: second disk isn't unprotected before deleting.
another a little bug with: "rbd: failed to create snapshot: (17) File exists" (please see log))
another bug: loop will destroy barc snapshot of first disk, cause IMHO keep=2 and VM has 2 disks/snapshots or etc.

because i ran barc at screen, i lost output from it.
i've deleted all snapshots and re-ran it again, all errors have appeared again, please see log below

#i tried it even without symbol '=' .. same results

eve4pve-barc backup --vmid=135 --label='daily' --path=/snapshoty-sshfs --keep=2

Start backup 2017-09-25 17:11:13
VM 135 - ======== Ceph Image 'rbd/vm-135-disk-1' ========
VM 135 - Creating snapshot rbd/vm-135-disk-1@barcdaily170925171113
VM 135 - ======== Ceph Image 'rbd/vm-135-disk-2' ========
VM 135 - Creating snapshot rbd/vm-135-disk-2@barcdaily170925171113
VM 135 - ======== Ceph Image 'rbd/vm-135-disk-1' ========
VM 135 - Creating snapshot rbd/vm-135-disk-1@barcdaily170925171113
rbd: failed to create snapshot: (17) File exists
ERROR: rbd snap create rbd/vm-135-disk-1@barcdaily170925171113
VM 135 - Export initial '/snapshoty-sshfs/barc/135/daily/170925171113rbd.vm-135-disk-1.img'
Exporting image: 100% complete...done.
VM 135 - Size 1.0G
VM 135 - Export initial '/snapshoty-sshfs/barc/135/daily/170925171113rbd.vm-135-disk-2.img'
Exporting image: 100% complete...done.
VM 135 - Size 50G
/usr/sbin/eve4pve-barc: line 574: [: -eq: unary operator expected
VM 135 - Export diff ''
rbd: image name was not specified
ERROR: rbd export-diff --from-snap rbd/vm-135-disk-1@barcdaily170925171113 ''
VM 135 - Remove snapshot rbd/vm-135-disk-1@barcdaily170925171113
VM 135 - Remove file ''
VM 135 - Copy config
End backup 2017-09-25 17:12:45

echo $?

0

SNAPID NAME SIZE
159 testcopy 1024 MB
SNAPID NAME SIZE
160 testcopy 51200 MB
188 barcdaily170925172359 51200 MB

thanks for your time and work
appreciate it
best regards
Tomas

@Ogy
Copy link
Author

Ogy commented Sep 25, 2017

omg, sorry for bold and bad proportions

@franklupo
Copy link
Member

Delete all snapshots and (or move) files in directory.
Because 2 times "Creating snapshot rbd / vm-135-disk-1 @ barcdaily170925171113"?

@franklupo
Copy link
Member

run with parameter --debug and send me output.

Thanks

@Ogy
Copy link
Author

Ogy commented Sep 25, 2017

thanks, i've done it meanwhile without debug, so i reran it with debug.
both outputs included in attachement
thanks
tomas
barc-output.txt

@franklupo
Copy link
Member

Can you send me config file of vm?

thanks

@Ogy
Copy link
Author

Ogy commented Sep 26, 2017

Good morning, sure i can :) in a attachement
btw i deleted snapshot testcopy from shell
135.txt

@franklupo
Copy link
Member

Execute in host shell

qm config 135 --current

and attach result.
thanks

@Ogy
Copy link
Author

Ogy commented Sep 26, 2017

agent: 1
bootdisk: virtio0
cores: 1
memory: 2048
name: jabber7
net0: virtio=C6:15:0F:51:26:F0,bridge=vmbr13
numa: 0
onboot: 1
ostype: l26
smbios1: uuid=67aab1f2-32b1-4700-8a80-aa2710182c32
sockets: 1
virtio0: ceph-10Gb:vm-135-disk-1,cache=writeback,size=1G
virtio1: ceph-10Gb:vm-135-disk-2,cache=writeback,size=50G

@franklupo
Copy link
Member

Ok the problem is the snapshot in configuration file VM/CT.
I fix problem, reading last configuration.

If you remove the snapshot testcopy work.

@Ogy
Copy link
Author

Ogy commented Sep 26, 2017

wow, you are right, so i can't have own snapshots ? - i can handle it

@franklupo
Copy link
Member

I fix problem in Next release.

@franklupo
Copy link
Member

Why

Please consider deleting old snapshots after successful export of all images, not between exporting.

?

@Ogy
Copy link
Author

Ogy commented Sep 26, 2017

it is safer approach, IMHO
things like testcopy snapshot occurs, i've ended with no snapshot on 1st disk..
or any other failure can occur, like disk or network die during exporting.
it was just idea.. and i've got a new one :-D going create #17
thanks for your time and efford

@franklupo
Copy link
Member

in case of error you would have many snapshots on the image. There should only be a snapshot. The performers would be affected

@Ogy
Copy link
Author

Ogy commented Sep 26, 2017

thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants