Updatedb messing with backups..

marotori

Member
Jun 17, 2009
161
1
16
This may have come up before.. but I thought worth mentioning.

If you occasionally have backups using the vzdump system fail - because the /mnt/pve/vzsnap folder could not be unmounted...The issue is most likely the mlocate cron job traversing this mount point.The fix is very simple - and really should be included by default from the install cdrom.

edit: /etc/updatedb.conf

Change this line:PRUNEPATHS="/tmp /var/spool /media /mnt/pve"

To include the path /mnt/pve

Job done.

Now future snapshot backups will not get locked down by the files being open - and then not being able to unmount the file system!

Rob
 
Thanks for the tip! Got me wondering why vzsnap0 doesn't always get unmounted.
Although this way I won't be able to find the images I need, since currently I'm using
locate <VMID> | grep raw

:rolleyes:
Maybe it would be better to exclude /mnt/vzsnap0 instead?
 
You could always do a:

find /var/lib/vz -name "*id*"

Or... Just make sure the cron for mlocate runs at a time that does not interfere!

Rob




Sent from my iPhone using Tapatalk