# How to DumpSave all variables or the whole notebook?

Is there a way to DumpSave all the variables in the notebook? Or better whole notebook so that opening it would restore all the definitions.

Definition of a variable in a context is done by myContexta=100; !! Typing "a" later will not give 100!! To call the content defined above you need to specifiy the context other wise it is assumed Global. So use myContexta to get 100.
Do this with all the needed variables in the notebook. You can use DumpSave["file","myContext"] to save all the definitions at once.
• Does that mean that in principle all the global variables can be saved by DumpSave["file","Global"]? – Al Guy Sep 2 '15 at 2:06