13. Appup Cookbook

13 Appup Cookbook

This section includes examples of .appup files for typical cases of upgrades/downgrades done in runtime.

13.1 Changing a Functional Module

When a functional module has been changed, for example, if a new function has been added or a bug has been corrected, simple code replacement is sufficient, for example:

{"2",
 [{"1", [{load_module, m}]}],
 [{"1", [{load_module, m}]}]
}.

13.2 Changing a Residence Module

In a system implemented according to the OTP design principles, all processes, except system processes and special processes, reside in one of the behaviours supervisor, gen_server, gen_fsm, gen_statem or gen_event. These belong to the STDLIB application and upgrading/down