Synology DS1511+ & updatedb

July 28, 2011

The default updatedb setup on Synology DS1511+ (3.1-1748) indexes all directories except the proc file system.

I tend to use the locate command quite a lot, so I wanted to have two separate databases. One for all system files, and another for my storage volume.

This one will be the default one. I'm simply excluding my storage volume and USB disk:


updatedb -e "/volume1 \
             /volumeUSB1" \
             -o /opt/var/mlocate/mlocate.db

And here's a dedicated database, which will only have /volume1 indexes:


updatedb -e "/bin \
             /dev \
             /etc \
             /etc.defaults \
             /initrd \
             /lib \
             /lib64 \
             /linuxrc \
             /lost+found \
             /mnt \
             /opt \
             /proc \
             /root \
             /sbin \
             /sys \
             /tmp \
             /usr \
             /var \
             /var.defaults" \
             -o /opt/var/mlocate/volume1.db