aaronhurt / zfs-replicate

POSIX compliant shell script to manage ZFS snapshot replication locally, or between hosts.
68 stars 17 forks source link

Logs directory. Where to put it? #25

Closed tschettervictor closed 2 weeks ago

tschettervictor commented 2 weeks ago

With the current layout, the script puts the log inside the directory where the script is located. For systems that simply clone the repo, this is fine. But when installing using FreeBSD ports, this will set the location inside /usr/local/sbin which is only for binary type files.

How could this be resolved to have the best of both worlds?

In XigmaNAS for example, you don't want the logs to be inside /var/log since that directory is removed upon every reboot, as it is an appliance OS.

tschettervictor commented 2 weeks ago

Upon further review, it might be better just to follow the heir structure. Even if the log directory is removed, the logs are not that important.

And if they are, users can set the LOGBASE variable to something else. This would only affect XigmaNAS users at this point who want to retain logs indefinitely.

I think putting the logs in /var/log/zfs-replicate would be best.