Ha! Everyone is welcome here (Androids included) as long as they converse in good faith.
That’s good. Is it possible to specify versions in Unraid, instead of using latest
? I find that to be a better habit to be in because it forces you to be intentional about updates and follow the steps outlined here: Updating farmOS | farmOS
It’s also good to hear that Unraid provides backup options. The database is the main thing you want to create a snapshot of before updating farmOS to a new version.
Question: When you go to https://[your-farmOS-domain]/admin/reports/status, do you see “Database updates: Up to date”? That will indicate that update.php
has been run between updates. You’ll want to make sure that’s always “Up to date” before you use farmOS after an update.
Hmm can you help me to understand what commands you ran on MySQL?
The trusted host settings are actually just configured in settings.php
- they don’t have any relationship to the database, as far as I understand it.
It’s basically a way to protect against a certain type of attack, byt defining what hosts your website is officially available under. You would add something like this to your settings.php
file:
$settings['trusted_host_patterns'] = [
'^www\.example\.com$',
];
(Where www.example.com
is the URL of your farmOS instance.)
Worth noting: you can also probably ignore this warning without worrying. I think it is more important for bigger public-facing website installations of Drupal, which farmOS is not.
OK so it sounds like Unraid is creating a volume to persist data from the /opt/drupal/web/sites
directory in the container. That’s good!
Your settings.php
file will be in default/settings.php
. That’s where things like your database login credentials get stored, as well as the trusted host settings and private filesystem configuration.
Try creating a directory called private
in your user/appdata/farmos/default
directory. This directory will need to have the correct permissions on it, which will depend somewhat on your environment. If you are familiar with running Linux commands I would try this (from a terminal in the user/appdata/farmos/default
directory):
chown www-data:www-data private
chmod 0770 private
Then add this line to settings.php
(at the bottom is fine):
$settings['file_private_path'] = '/opt/drupal/web/sites/default/private/files';
Finally, clear your caches by going to https://[your-farmos-domain]/admin/config/development/performance in the browser and clicking “Clear all caches”.
If it’s successful, you should see this in https://[your-farmOS-domain]/admin/config/media/file-system under “Private file system path”: /opt/drupal/web/sites/default/private/files
and file uploads should work.
Important to note: In your setup there are TWO things you should be including in your backups: your database (farmOS data) and your user/appdata/farmos
directory (which includes settings.php
and all uploaded files).