Solved ZFS missing directory

This morning (2020-03-22) I received this message from cron:

Code:
cp:
/var/spool/backups/ca/harte-lyne/hamilton/vhost06/hll_vhost06_etc_rc_conf.txt:
No such file or directory

However, looking in the root history file I find this:
Code:
hg mkdir | grep vhost06
2044  2020-03-11 16:23:30: mkdir -p /var/spool/backups/ca/harte-lyne/hamilton/vhost06/
2084  2020-03-12 15:37:01: mkdir -p /var/spool/backups/ca/harte-lyne/hamilton/vhost06/
2129  2020-03-13 17:27:44: mkdir -p /var/spool/backups/ca/harte-lyne/hamilton/vhost06/
2248  2020-03-21 22:43:54: mkdir /var/spool/backups/ca/harte-lyne/hamilton/vhost06/

Checking the file system shows that the directory is indeed missing.

There is nothing in /var/log/cron showing that the directory was removed. The disappearance of this directory is clearly a recurring event. What could be causing it?
 
Last edited:
Which cron job is this? What is it trying to do? It is probably running cp. Is that missing directory ...conf.txt the source or the target?

I wouldn't expect to see a message in /var/log/cron, it only shows which cron jobs were started, not what they do. For example, one of my cron jobs is my own (self-written) backup software, which creates and deletes many things, every hour or two.

It seems you are running some sort of backup software, on a stock FreeBSD system there is no directory /var/spool/backups. Look at all your crontabs to see which cron jobs there are, and which are non-stock.
 
All of the cron jobs for root are non-stock. This is not a directory structure created by a software package. It is just a place to copy important configuration files so that they can be picked up en-masse by a scheduled rsync . Having written that now I wonder if it is rsync that is the culprit. I will check to see if ther are any --delete flags on any of those jobs that might account for this.
 
Rsync was the culprit. I changed the cron command to remove the - -delete-after option and the directory stopped disappearing.
 
Back
Top