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.
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.
I just keep all my stuff at OVH and assume nothing bad will happem.
:)
But yeah, I think this sort of approach is pretty good. It's simple, but we're just a database and an rrd directory, so no need to do much complicated. Trying to do incremental backups is crazy.
Adam.
From: observium observium-bounces@observium.org On Behalf Of Stempien, Dave via observium Sent: 29 April 2021 19:43 To: Observium observium@observium.org Cc: Stempien, Dave David.Stempien@UR.Rochester.edu Subject: Re: [Observium] [EXT] Wish list
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 mailto:observium-bounces@observium.org > on behalf of Terry Stone via observium <observium@observium.org mailto:observium@observium.org > Date: Thursday, April 29, 2021 at 2:04 PM To: observium@observium.org mailto:observium@observium.org <observium@observium.org mailto:observium@observium.org > Cc: Terry Stone <terry@beach-works.com mailto: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.
participants (3)
-
Adam Armstrong
-
Stempien, Dave
-
Terry Stone