Automatically transfer config after snap auto updates?

When MAAS is auto-updated by snap, the /var/snap/maas/current symlink is changed to point to the new install. This means that changes that I’ve made to regiond.conf, rackd.conf, preseeds, etc. are set back to defaults, which is not nice.

Is there a recommended way to have the config be automatically moved over after snap does its auto-updates?

Currently I’m using a cron job to overwrite config files in “current”, but it seems kinda crude and potentially failure-prone.

Thanks.

Hey @andrew-boatrocker , could you be more specific? That directory is already supposed to be preserved, see (https://snapcraft.io/docs/environment-variables#heading--snap-data)

The last time that my MAAS snap was automatically updated, my custom preseeds didn’t get copied to the new install.

If I have time later this week or early next week I’ll see if I can recreate what happened. Good to know that it’s already a feature, even though it didn’t work for me that time.