oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
608 stars 138 forks source link

remote backups deleted when local zone deleted #420

Closed garethhowell closed 5 years ago

garethhowell commented 5 years ago

Version 0.19.1nb1 I have a single job that backups the entire zpool. Each ZFS dataset is set to inherit the backup job. The job creates local snapshots and syncs them to a remote server and has been running fine for over a year.

Yesterday, I deleted a VM on the local machine. Initially, I could still see the zone on the remote backup. Once znapzend had run though, the remote zone had disappeared too :-(

oetiker commented 5 years ago

this is very odd since znapzend only cleans up snapshots from filesystems present on the primary system. So if you remove a filesystem on the master the state on the backup system remains untouched (which is a problem for some) ... it would be very interesting to know how you lost your zone backup

garethhowell commented 5 years ago

That is odd, then. There’s quite a lot of churn on the main machine ‘deneb’ . I’m often creating new VMs on Deneb for various purposes and then deleting them a few days later. There is a single job that backs up the ‘zones’ and is recursive. All zones are snapshotted OK on the main machine, and appear on the backup machine ‘eridani’ the next day (snapzend only runs once a day). I run znapzendztatz occasionally to check that all is well. The VM that was deleted on Deneb had been there for several months. Of course deleting the VM deleted the local snapshots. I realised fairly quickly that I needed something from the deleted VM and looked on eridani. The VM and snapshots were still there at that point. It was late, so I left it until the next day to log in to eridani to retrieve the data. However, the backup of the VM had gone. I am assuming that this was caused by znapzend cleaning up. Znapzend only runs on Deneb. I’ll try looking in the log on Deneb to see if there’s anything.

oetiker commented 5 years ago

doing a controlled test might be sensible ...

garethhowell commented 5 years ago

I’ve created a temporary dataset on deneb. It should get snapshotted and sent to eridani at midnight. I’ll check tomorrow and then delete it from deneb and check eridani again on Friday morning.

Gareth Howell gareth.howell@gmail.com

On 24 Apr 2019, at 08:45, Tobias Oetiker notifications@github.com wrote:

doing a controlled test might be sensible ...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/oetiker/znapzend/issues/420#issuecomment-486108375, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEQKNVMF7ND3QHY54MYOJTPSAFZPANCNFSM4HHLWQQQ.

garethhowell commented 5 years ago

I think this can be closed. I couldn't recreate the problem with the temporary zone. The replica on eridani was still there after I had deleted the original on deneb and let znapzend run again