Originally Posted by linuxguy7820
I'm using an external USB drive to perform system backups. The script I'm using has a mount command - mount /dev/sdcx /systembak, it works fine until the external drive is mounted into a different USB port which causes the device path to change and the script needs to be modified to reflect that change. Looking in the /dev/disk/ directory I see ./by-id ./by-label ./by-path ./by-uuid. I've been able to mount the disk using one of the device pointers in those directories; are any of those device pointers static or do they change every time the USB disk is plugged into a different USB port.
(I don't have the ability to actually test it right now which is why I'm asking the question)
It is safe to mount your drive by label like this
mount LABEL=your_drives_label /systembak/
because the label will only change if you manually change it. You can find your drive's label in /dev/disk/by-label/. You may also define this default behaviour in /etc/fstab.
Hope this helps