# How to save variables from the workspace?

**URL:** <https://discourse.julialang.org/t/how-to-save-variables-from-the-workspace/11710>\
**Category:** New to Julia\
**Created:** [June 15, 2018, 9:45pm UTC](https://discourse.julialang.org/t/how-to-save-variables-from-the-workspace/11710 "2018-06-15T21:45:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfariacastro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mfariacastro/32/4432_2.png) [@mfariacastro](https://discourse.julialang.org/u/mfariacastro)\
**Post date:** [June 15, 2018, 9:45pm UTC](https://discourse.julialang.org/t/how-to-save-variables-from-the-workspace/11710/1 "2018-06-15T21:45:59Z")

</div>

Hi everyone, I am more or less new to Julia, having used some of the earlier versions in the past. I am now using 0.6.4 for a new project. In the past, I used the JLD package to save variables from the workspace so I can reuse/reload them later. I haven’t been able to successfully use it in the latest version though: I keep running into “isgeneric not defined” problems. I have also noticed the package has not been updated in several months. What is the go to package/method to save/load variables while preserving their formats? Thanks!

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [June 15, 2018, 10:16pm UTC](https://discourse.julialang.org/t/how-to-save-variables-from-the-workspace/11710/2 "2018-06-15T22:16:15Z")

</div>

You could try JLD2.jl (its successor) or BSON.jl.

---

<div class="post-metadata">

**Author:** ![mfariacastro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mfariacastro/32/4432_2.png) [@mfariacastro](https://discourse.julialang.org/u/mfariacastro)\
**Post date:** [June 15, 2018, 10:30pm UTC](https://discourse.julialang.org/t/how-to-save-variables-from-the-workspace/11710/3 "2018-06-15T22:30:37Z")

</div>

Thank you, I did not know about JLD2, seems to work well for what I want. Are there any advantages in using BSON instead?

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [June 15, 2018, 11:55pm UTC](https://discourse.julialang.org/t/how-to-save-variables-from-the-workspace/11710/4 "2018-06-15T23:55:39Z")

</div>

I don’t know of any advantages of either. (Last time I check both struggled with closures.)
