This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Fogpuppy
Fogpuppy

Hi, This is a Linux "new user" question that may have been answered before but I couldn't find it. We run under nginx, use SQLite on Ubuntu. The partition that the web site is stored on has limited storage. So anything that take up significant room needs to be placed in another partition. Additionally we're looking to conform to some consistent guidelines for our system setup. The obvious directory I saw that might be a problem is "storage". Inside it is "logs", "temp", and "app" and the SQLite database. I don't think the database is a problem but logs, temp and app might be and I'm not sure about the others.

For Logs ideally we'd move that to /var/log and and add log rotation rules. I'd probably do it with a symlink unless there's a simply way to configure it. How big does this log get. How often would it need to be rotated? Would log rotation "break" anything?

For temp, ideally we'd move it to /tmp using a symlink. But ...is there anything in here that needs to be kept across system boots? If so ... how is it manged for storage.

for app .. my question is what is really written into this directory. it has a media folder and an upload folder. We don't plan to allow any file uploads to this site more than "transient files" that are processed and then deleted. But for "safety" it would be ideal if we could move that as well. Again, I could symlink it or if there's a configuration setting ....

There are some "cache" directories in a few other places but I'm assuming a) they get cleaned out periodical (ie they a rereally a cache) and b) they won't get that big.

thanks for the help anyone ..

JeffGoldblum
JeffGoldblum

For the storage/app folder, you can either symlink it or configure any other form of remote storage in config/filesystems.php. I would recommend choosing somewhere with enough space because this is where all uploaded files go (in the media library and in files attached with the FileUpload widget using File model relationships).

Symlinking logs is fine, but there's also config/logging.php (available in the L6 branch, will be in stable in about a month) https://github.com/octobercms/october/blob/wip/laravel-6/config/logging.php. Note that the database also stores most log entries in the system_event_logs table so you should be fine rotating out log files (although log file rotation might be covered under one of the options available under config/logging)

Temp shouldn't contain anything required across system boots, for the most part it should be automatically cleaned by whatever code puts anything in it (although sometimes that doesn't happen, but deleting those files or no longer having access to them should be fine).

Cache directories should be fine, just make sure nothing else is deleting them, otherwise that could cause problems if it expects a file to exist in the cache directory but suddenly it doesn't.

Fogpuppy
Fogpuppy

Thanks for the response. It’s very helpful!

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.