# Using the &persistent attribute

**URL:** <https://community.zeek.org/t/using-the-persistent-attribute/5154>\
**Category:** Zeek\
**Created:** [January 22, 2018, 2:17pm UTC](https://community.zeek.org/t/using-the-persistent-attribute/5154 "2018-01-22T14:17:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lamps\_Jereme](https://avatars.discourse-cdn.com/v4/letter/l/82dd89/32.png) [@Lamps\_Jereme](https://community.zeek.org/u/Lamps_Jereme)\
**Post date:** [January 22, 2018, 2:17pm UTC](https://community.zeek.org/t/using-the-persistent-attribute/5154/1 "2018-01-22T14:17:14Z")

</div>

I am a little confused as to how this attribute will work. Ideally I would like a state table that persists across numerous iterations of stopping/starting bro (broctl deploy).

To get this to work do I simply need the &persistent attribute and Bro magically handles the rest?

Or do I also need to use the functions checkpoint\_state() (in bro\_done) with rescan\_state (in bro\_init) to load the tables?

Best,

Jereme

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [January 24, 2018, 3:34am UTC](https://community.zeek.org/t/using-the-persistent-attribute/5154/2 "2018-01-24T03:34:40Z")

</div>

The former: at startup and termination checkpoint\_state() and  
rescan\_state are called automatically, respectively. You can in  
addition call them during operation for checkpointing/rereading the  
state on the fly.

That said, please note that &persistent is going to go away, it will  
likely be deprecated starting with Bro 2.6. Broker's data stores are  
going to be the primary replacement.

Robin

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:45pm UTC](https://community.zeek.org/t/using-the-persistent-attribute/5154/3 "2022-05-06T15:45:31Z")

</div>


