# How to flush map from HAProxy to disk after set map

**URL:** <https://discourse.haproxy.org/t/how-to-flush-map-from-haproxy-to-disk-after-set-map/300>\
**Category:** Help!\
**Created:** [May 19, 2016, 2:45pm UTC](https://discourse.haproxy.org/t/how-to-flush-map-from-haproxy-to-disk-after-set-map/300 "2016-05-19T14:45:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepagarhaproxy](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@deepagarhaproxy](https://discourse.haproxy.org/u/deepagarhaproxy)\
**Post date:** [May 19, 2016, 2:45pm UTC](https://discourse.haproxy.org/t/how-to-flush-map-from-haproxy-to-disk-after-set-map/300/1 "2016-05-19T14:45:26Z")

</div>

I am setting map key, value using socket. But same is not flushed to map file on disk.  
This means HAProxy restart gets old load2 - 2 value and not new value 22.

**How could a map be flushed to disk after set map?**  
Could someone please clarify as documentation is blank on flush part.

$ echo “set map /home/cloud/load.map load2 22” | sudo socat /var/run/haproxy.sock stdio

$ cat load.map  
load1 10  
load2 2

$ echo “show map /home/cloud/load.map” | sudo socat /var/run/haproxy.sock stdio  
0x15890f0 load1 10  
0x1589120 load2 22

---

<div class="post-metadata">

**Author:** ![deepagarhaproxy](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@deepagarhaproxy](https://discourse.haproxy.org/u/deepagarhaproxy)\
**Post date:** [May 19, 2016, 2:59pm UTC](https://discourse.haproxy.org/t/how-to-flush-map-from-haproxy-to-disk-after-set-map/300/2 "2016-05-19T14:59:14Z")

</div>

Got Solution here  
[http://comments.gmane.org/gmane.comp.web.haproxy/16324](http://comments.gmane.org/gmane.comp.web.haproxy/16324)

Solution as per HAProxy support:

Are these meant to also modify the acl/map file on disk?

1. During the runtime, HAProxy never acces to the filesystem, so the  
original files containing map left unchanged.

2. you can run a process which reads acls/maps content from HAProxy  
socket and write it to a file on disk.
