# Changing hdb folder

**URL:** <https://forum.kx.com/t/changing-hdb-folder/11620>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [October 4, 2017, 2:59am UTC](https://forum.kx.com/t/changing-hdb-folder/11620 "2017-10-04T02:59:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![21sumitkhanna](https://avatars.discourse-cdn.com/v4/letter/2/f14d63/32.png) [@21sumitkhanna](https://forum.kx.com/u/21sumitkhanna)\
**Post date:** [October 4, 2017, 2:59am UTC](https://forum.kx.com/t/changing-hdb-folder/11620/1 "2017-10-04T02:59:00Z")

</div>

Currently in kdb + tick setup at EOD rdb gets saved to disk in /log/sym folder. Current start hdb script : “q sym /log/sym -p 5012”. Want to change the hdb folder from “log/sym” to “hdb”. Changed the hdb script to “q sym /hdb -p 5012”. Still at EOD tables get written to old dir. Any clue why?

---

<div class="post-metadata">

**Author:** ![Flying1](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@Flying1](https://forum.kx.com/u/Flying1)\
**Post date:** [October 4, 2017, 7:29am UTC](https://forum.kx.com/t/changing-hdb-folder/11620/2 "2017-10-04T07:29:00Z")

</div>

Which script are you loading?

---

<div class="post-metadata">

**Author:** ![jemma\_borland](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@jemma\_borland](https://forum.kx.com/u/jemma_borland)\
**Post date:** [October 4, 2017, 11:04am UTC](https://forum.kx.com/t/changing-hdb-folder/11620/3 "2017-10-04T11:04:00Z")

</div>

You’ll need to restart your tickerplant.&nbsp; The tickerplant takes two arguments: the schemafile and the name of your hdb directory - it is this you want to change, not the hdb start-up command.&nbsp; Your tickerplant start-up command probably looks like:

q) q tick.q sym /log/sym -p 5010

so you’ll want to change that to&nbsp;

q) q tick.q sym hdb -p 5010&nbsp;&nbsp;

Also your HDB won’t be saved down until it hits end-of-day, but you can manually trigger this by invoking .u.end[.z.d] in the tickerplant.

Hope this helps

Jemma&nbsp;

---

<div class="post-metadata">

**Author:** ![21sumitkhanna](https://avatars.discourse-cdn.com/v4/letter/2/f14d63/32.png) [@21sumitkhanna](https://forum.kx.com/u/21sumitkhanna)\
**Post date:** [October 4, 2017, 4:53pm UTC](https://forum.kx.com/t/changing-hdb-folder/11620/4 "2017-10-04T16:53:00Z")

</div>

Hi Jemma,  
My tickerplant start-up command looks like:

q tick.q sym log -p 5010 -t 1

here log folder is where tickerplantplant logs go and log/sym is current hdb.

If i change this to point to “hdb” where would my logs go? is there a way to mention dir for tickerplant logs and hdb?

Thanks

---

<div class="post-metadata">

**Author:** ![jemma\_borland](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@jemma\_borland](https://forum.kx.com/u/jemma_borland)\
**Post date:** [October 4, 2017, 8:53pm UTC](https://forum.kx.com/t/changing-hdb-folder/11620/5 "2017-10-04T20:53:00Z")

</div>

Hi If you change the second parameter to point to =E2=80=9Chdb=E2=80=9D, then = your logs will be saved in this directory, with the end of day write down b= eing saved down to hdb/sym. In a normal kdb+ tick setup, the log and hdb di= rectories are intertwined and the file structure is difficult to change wit= hout editing tick.q It is possible to edit tick.q and allow for further configuration, i.e. do = as you wish, or you could google for a contribution kdb+ framework on GitHu= b that would wrap around kdb+tick to provide more functionality. Kind Regards, Jemma

---

<div class="post-metadata">

**Author:** ![21sumitkhanna](https://avatars.discourse-cdn.com/v4/letter/2/f14d63/32.png) [@21sumitkhanna](https://forum.kx.com/u/21sumitkhanna)\
**Post date:** [October 5, 2017, 2:54am UTC](https://forum.kx.com/t/changing-hdb-folder/11620/6 "2017-10-05T02:54:00Z")

</div>

Thanks a lot!!
