Best way to add custom settings? - to not get overwritten

Hi,
i recently switch from DO to Hetzner, in an attempt to resolve my issue with " [Upstream timed out (110: Unknown error)] - since it was a 1cpu 1gb ram DO, so now 2cpu and 4gb ram - same issue.

however when migrating, the few local settings that i had made, such as using an external relay - therefore /etc/postfix/sasl_passwd and /etc/postfix/main.cf - i had to set again, aswell as trial and error with many forum suggestions, found that roundcubemail needed imap timeout set aswell as nginx conf.

But what is the best practice with mailinabox to set extra values, so - they dont get overwritten with next update, any .local that should be used.

example for greylog i have a /etc/postgrey/whitelist_clients.local for that purpose but not included in the normal backup

And any way to make the backup “sudo management/backup.py” also include those changes :slight_smile:

not sure if it’s doable, and currently i just have it on my own wiki space, but to not forget settings, when next version of ubuntu is supported etc

Usually, you would not need any modification that are overwritten on an upgrade or installation of MiaB. This external relay is an exception of course. Are all these changes specific to your situation? Otherwise, they might be included in MiaB via a github pull request, if they benefit other users as well.
Personally, I have a script that backs up the files I added to /etc (e.g. postgrey whitelist, spamassassin rules). Note that you can store a script as $STORAGE_HOME/backup/after-backup. This will be executed after the backup has been performed. This does not make it part of the MiaB backup, but might still be useful for your purpose.

I use Ansible for my customizations.
Have a look at GitHub - amedee/ansible-servers: Ansible playbooks to configure my servers
I’m not going to explain how it works, this is 100% a “works for me” solution.

Main benefit for me is that I often don’t need to do full file backups. Ansible takes care of line-in-file changes.