crontab entries deleted (with no backup) after 11.1-U4 upgrade

Status
Not open for further replies.

sidh

Cadet
Joined
Mar 16, 2018
Messages
2
Hi,

In the past I had the (bad ?) habit to use "crontab -e" and add new crontab lines to perform rsync jobs with success/fail mail notifications.
Recently we upgraded to 11.1-U4 and we realized the crontab was replaced and our previous crontab version has not been saved in the system snapshot made during the upgrade.

I've been told "crontab -e" was not the way to add cron in FreeNAS and I had to use web ui.

So I went to the rsync task web ui and then I realized I could not receive any mail notification : I don't know if rsync job failed or succeed (I have to ssh and look the /var/log/cron file)

Therefore it appears to me that if I want to perform a rsync task with mail notification, I have to use the FreeNAS crontab web ui with rsync and mail command line ... ... ...
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
sidh said:
I had the (bad ?) habit to use "crontab -e"

When you open a session to FreeNAS, you should see this:

Code:
Welcome to FreeNAS

Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.


It applies in a kind-of complicated way, so sometimes not on reboot, but on upgrades... anyway, using the UI makes sure the system puts it back from the database each time it's needed.
 

sidh

Cadet
Joined
Mar 16, 2018
Messages
2
Yes I most often use SSH instead of web UI for diagnosing a problem on FreeNAS and for dealing with Active Directory, I need to start/stop service by CLI sometimes, so I can say the web UI has its limits, that is why for critical task like rsync backup , I thought the basesystem crontab utility was appropriate.

Furthermore there was a snapshot made before upgrade, even if the crontab is replaced during the upgrade, why aren't the changes I made to crontab in the snapshot ?

For example with rsync task, through web UI I have no idea if the rsync job succeed or failed, so it's not fair claiming web UI is mandatory when it doesn't provide the same level of control.

Because FreeNAS is derivated from FreeBSD I felt confident in the POLA principle, but it was an error. Here we are far from POLA .
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
Most of the core OS configuration files are re-written using the database as the master at various intervals.

Directly editing those files is an illusion of making a permanent change until the next re-write is triggered.

This is why there are options in the UI to set crontab and things like tunables to control loading of sysctl and kernel modules as directly editing those files also results in a temporary situation which will be overwritten by the information from the DB.
 
Status
Not open for further replies.
Top