backup script for db, config.php, rrd/
![](https://secure.gravatar.com/avatar/e99b896dc850fad9bda60656f9786324.jpg?s=120&d=mm&r=g)
Hi all, I spent my Sunday afternoon (on-call, luckily quiet though :) writing this backup script for Observium.
It takes a backup destination directory and number of backups to keep using rotation which is 0 by default. Then it makes a tmp directory. It copies config.php there, does a mysql dump, and copies rrd/ into the tmp directory. It tars up the tmp directory into a tarball in the backup directory and deletes the tmp directory.
It is meant to run from the scripts/ directory, it maybe isnt as polished as the other main scripts or compatible with all systems because of different options with the commands it runs. Its working for me though on my Ubuntu 14.04 test system. Please offer suggestions! Thanks. -Nick
![](https://secure.gravatar.com/avatar/e99b896dc850fad9bda60656f9786324.jpg?s=120&d=mm&r=g)
On Sun, Mar 13, 2016 at 08:57:13PM -0700, Nick Schmalenberger wrote:
Hi all, I spent my Sunday afternoon (on-call, luckily quiet though :) writing this backup script for Observium.
It takes a backup destination directory and number of backups to keep using rotation which is 0 by default. Then it makes a tmp directory. It copies config.php there, does a mysql dump, and copies rrd/ into the tmp directory. It tars up the tmp directory into a tarball in the backup directory and deletes the tmp directory.
It is meant to run from the scripts/ directory, it maybe isnt as polished as the other main scripts or compatible with all systems because of different options with the commands it runs. Its working for me though on my Ubuntu 14.04 test system. Please offer suggestions! Thanks. -Nick
Oops I forgot to remove some old stuff from an older version, use this one instead. Thanks! -Nick
participants (1)
-
Nick Schmalenberger