Hi people. I ve a debian with 2 entries in the fstab, mounted in /media. One is an internal disk and another is a remote NAS (in the same lan, mounted in /media/backups). Sometimes, for unknown reasons, the NAS fails and the nightly backups are made in the /media/backups directory of the computer instead in the "/media/backups" of the NAS. The main disk is little and a no space left in device is shown everywhere... the apache stop working and I ve many problems when this occurs, some idea how to solve that? thanks!
Make sure that the backup script first checks to see if the backup location is mounted. A simple trick is to put a file with a specific name in the directory used as a mountpoint. If the file appears there, the backup drive isn't mounted.
Clear space where you can
Thread moved to the "Debian" sub forum for a better fit.
You can also use the mountpoint command Code: mountpoint -q /media/backups || exit 1
mountpoint -q /media/backups || exit 1
General Scripts - https://gitlab.com/jmgibson1981/homescripts My backup scripts - https://gitlab.com/jmgibson1981/bash-backups
Ubuntu Forums Code of Conduct