# Upgrade ports with custom build options



## Peter2121 (Aug 30, 2018)

Hello,
I have a jail with some software, installed from ports. I know that build options for some ports were modified by a script, used to deploy this jail.
Now I want to upgrade ports, using portmaster. Will it reuse the build options, configured during the last install of ports or will it reset them to default ones?
Is it possible to reuse currently configured build options for all ports automatically during update by portmaster?


----------



## SirDice (Aug 30, 2018)

Peter2121 said:


> Will it reuse the build options, configured during the last install of ports or will it reset them to default ones?


If /var/db/ports/ is still intact the ports system will use the exact same options. 



Peter2121 said:


> Is it possible to reuse currently configured build options for all ports automatically during update by portmaster?


This is the default mode of operation.


----------



## VladiBG (Aug 30, 2018)

Yes the port options are saved in /var/db/ports. You can check the option that were used there or going in the port directory and view them using `make showconfig`
Keep in mind that some options are changing during the update of the ports. That's why aways read the /usr/ports/UPDATING

When i update my servers (i'm using portupgrade) i first make a full backup then restore this backup in virtual machine and test if everything is updating without problem and if there's some major version changes in the configuration i write down what step i'm making to resolve them. After i'm shure that the ports in the production will update without issue i proceed with the real update.


----------



## Peter2121 (Aug 30, 2018)

VladiBG said:


> When i update my servers (i'm using portupgrade) i first make a full backup then restore this backup in virtual machine and test if everything is updating without problem and if there's some major version changes in the configuration i write down what step i'm making to resolve them. After i'm sure that the ports in the production will update without issue i proceed with the real update.




Thanks, normally I clone my jail and test the upgrade on the clone. So during the next update of the main jail I know which steps could produce problems.


----------

