Giter Club home page Giter Club logo

backuppc-visualize's Introduction

backuppc-visualize

BackupPC-Visualize - a backup duration visualization tool

DESCRIPTION

Plots a visual timeline of recent BackupPC host backup durations, allowing a better understanding of which backups are running long or otherwise causing trouble.

  • Full and incremental backups are shown in different colors.
  • An exclude list filters hosts from the output.
  • Number of days to plot is adjustable.
  • Sort by host name or start of most recent backup.

DEPENDENCIES

Requires the Ploticus graphical plotting package. See http://ploticus.sourceforge.net/

USAGE

BackupPC-Visualize (bpcviz) consists of two parts. A Perl script that gathers backup data from /var/lib/backuppc/pc/<host>/backups, munges and sorts the data, and a Ploticus script that renders the data in a useful display.

The intention is to generate graphs that can be viewed online (launched from a cronjob or a simple web form), but bpcviz works equally well from the command-line directly on the BackupPC server or on a copy of the "backups" files on your own workstation.

bpcviz-gatherdata takes the following optional parameters:

  • -d : the number of days to view, always anchored on "today"
  • -p : path to backup data; defaults to /var/lib/backuppc/pc
  • -e '' : a space-separated list of Perl regular expressions to filter from the host names
  • -s <time|host> : Sort by host name or start time of most recent backup. The default is "time".

bpcviz.plot is the default Ploticus script. Feel free to use this as a starting point to customize your own plot output. bpcviz-gatherdata is called directly from the Ploticus script, so any adjustment to its parameters is done here.

example.sh is a simple example script that runs the Ploticus script and displays the graph (using ImageMagick or GraphicsMagick's display command). If you are on Debian Linux, the Ploticus package doesn't name the Ploticus binary as "pl" as Ploticus expects. I create a symlink of /usr/local/bin/pl.

AUTHOR

Carl D Cravens [email protected]

LICENSE & COPYRIGHT

Copyright 2013 Carl D Cravens

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.


VERSION: 0.0.4

Source repo: https://github.com/ravenx99/backuppc-visualize/


backuppc-visualize's People

Contributors

ravenx99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

backuppc-visualize's Issues

Document the exclude list more clearly

I don't think it's clear how the exclude list works, even if you understand Perl regexes.

  • Explain in more detail
  • Provide examples
  • Explain the "guts"... that "x y z" is embedded as an alternation string

Document working with data "offline"

The current documentation assumes that you're running bpcviz directly on the BackupPC machine, or that you know how to get the data to your workstation.

Explain how to:

  • Use bpcviz-generate to create a datafile that can be copied to another machine.
  • How to fix the .plot file to read a file instead of call a script
  • How to tar up just pc/*/backups so you can copy that to another machine and work with a full copy of the raw data.

Hosts without recent backups aren't shown

If a host hasn't had a backup in the plot window, it isn't shown in the list of hosts. You can work around this by plotting a very long time period and hosts without backups should show up at the end of the list, but the usual view is two or three days and the hosts should show up there as well.

Incomplete backups are not in the plot

Failed/aborted backups are not recorded in the 'backups' file, and there's no trivial way to gather that data. It would be nice if bpcviz could gather that data, as a failed backup that ran for 10 hours is an important data point.

Change date format to yyyy-mm-dd.hr:mn:sc

I propose to change date format to yyyy-mm-dd.hr:mn:sc for internal time representation. It seems to me more clean and usable for scripting than mm-dd-yyyy.hr:mn:sc.
P.S. Proposed change will not affect date format in plots.

Print backup numbers on bars

Optionally print the number of the backup on the bar to make it easier to match up plot bars to backup entries.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.