Backing up your Zabbix setup
Before working on any Zabbix setup, it is vital to make a backup of everything important. In this recipe, we will go through some of the most important steps you should always take before doing maintenance on your Zabbix setup.
Getting ready
We are going to need our Zabbix server, for which I’ll use lar-book-rocky
. Make sure to get the CLI to the server ready, as this whole recipe will use the Linux CLI.
How to do it…
- Let’s start by logging in to our Zabbix server via the Linux CLI and create some new directories that we are going to use for our Zabbix backups. Preferably, this directory would be on another partition:
mkdir /opt/zbx-backup/ mkdir /opt/zbx-backup/database/ mkdir /opt/zbx-backup/zbx-config/ mkdir /opt/zbx-backup/nginx/ mkdir /opt/zbx-backup/lib/ mkdir /opt/zbx-backup/shared/ mkdir /opt/zbx-backup/shared/zabbix/ mkdir /opt/zbx-backup/shared/doc/
- It’s important to back up all of our Zabbix configuration...