# How to manage a NetBeez Beezkeeper server with an external /data directory

**URL:** <https://community.netbeez.net/t/how-to-manage-a-netbeez-beezkeeper-server-with-an-external-data-directory/80>\
**Category:** Deploy & Configure\
**Created:** [June 13, 2023, 7:55pm UTC](https://community.netbeez.net/t/how-to-manage-a-netbeez-beezkeeper-server-with-an-external-data-directory/80 "2023-06-13T19:55:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![panickos](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.netbeez.net/panickos/32/8_2.png) [@panickos](https://community.netbeez.net/u/panickos)\
**Post date:** [June 13, 2023, 7:55pm UTC](https://community.netbeez.net/t/how-to-manage-a-netbeez-beezkeeper-server-with-an-external-data-directory/80/1 "2023-06-13T19:55:34Z")

</div>

The are many reason why you would want to keep NetBeez data on a different volume than the OS volume, such as using your own organization’s approved Ubuntu images.

If you are running a self-managed BeezKeeper instance on-prem or your public cloud account and you need the data to be kept on a separate volume that the OS volume these are the things you need to maintain:

## Symbolic links from the data partition to the root partition

```auto
/var/log/netbeez
/var/lib/mysql
/var/lib/docker
/var/lib/influxdb2
/opt/netbeez

```

For example:

```auto
ln -s /data/opt/netbeez /opt/netbeez

```

## Environment files

Create this file `/etc/bash.bashrc.d/netbeez.rc` containing:

```auto
source /opt/netbeez/app_data/netbeez.rc

```

Add the following snippet into `/etc/bash.bashrc`

```auto
#### NETBEEZ DOCKER ####################
for file in /etc/bash.bashrc.d/*; do
  source "${file}"
done
#### NETBEEZ DOCKER ####################

```

## Mount the data volume on boot

Make sure that the `/data` partition is mounted on boot by adding this into `/etc/fstab`

```auto
/dev/sdb1 /data ext4 defaults 0 0

```

_Remember to replace `/dev/sdb1` with the right device name. Use `lsblk` to find the right one. Verify your `fstab` configuration by running `sudo mount -a`._

Note that all of these actions should be done as the `root` user.
