I run this once a day via cron on my observium system:

 

#!/bin/bash

mysqldump --databases observium --add-drop-table --extended-insert > observium-dump.sql

tar zcf observium-rrd.tar.gz /opt/observium/rrd

 

A few hours later, on a backup server, I have cron pull a copy of these two files and the config.php.  It would be just as easy to add a few additional lines to this script to push copy in the other direction (from observium to backup server) I guess, but I find it easier to rotate backups on my backup server the other way.

 

I use a .my.conf file to store the database credentials to avoid having to enter an interactive password.

 

From: observium <observium-bounces@observium.org> on behalf of Terry Stone via observium <observium@observium.org>
Date: Thursday, April 29, 2021 at 2:04 PM
To: observium@observium.org <observium@observium.org>
Cc: Terry Stone <terry@beach-works.com>
Subject: [EXT] [Observium] Wish list

Rather than re-invent the wheel writing a script does anyone have a script that can be run as a con job to backup rrd files, observium database and config.php to an external server.

 

Thanks.