Skip to content
/ BaNG Public

Backup Next Generation for Linux & Mac using rsync (support hardlinks and btrfs snapshots), Web-Frontend, Statistics, History-Merger)

License

Notifications You must be signed in to change notification settings

isgphys/BaNG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0b5f279 · Jan 31, 2025
Aug 25, 2022
Nov 30, 2016
Jan 31, 2025
Jan 17, 2025
Jun 2, 2022
Jan 29, 2018
Aug 25, 2022
Jan 29, 2018
Mar 27, 2023
Aug 25, 2022
Feb 17, 2023
Nov 20, 2014
Mar 5, 2013
Jul 23, 2020
Feb 14, 2018
Dec 17, 2014
Jul 4, 2016
Feb 3, 2022
Oct 17, 2019
Dec 5, 2014
Jan 31, 2025
Feb 17, 2023
Feb 2, 2024
Feb 2, 2024

Repository files navigation

BaNG - Backup Next Generation

Backup tool developed and used by the IT Services Group of the Physics Department at ETH Zurich.

Motivation

A couple of years ago, our backups were made with bash scripts that would start a single rsync process per client to back up the data to a file system on a remote server. We used hard links to avoid a linear increase in backup space with the number of recent backups we wanted to keep. Still, because of the daily file changes, we always planned the backup space to be roughly twice as large as the productive file server.

At some point, due to the ever increasing storage volumes, the backups started to take longer and longer, and would eventually reach the critical 24 hours limit, thereby making daily backups impossible. Independently, the ext and xfs file systems used on the backup server struggled with the large number of files and hard links, especially when wiping older backups. For these reasons we decided to replan our backups from scratch.

Thus BaNG, our next generation backup tool, was born. It allows to start multiple rsync processes in parallel for higher transfer rates. If the backup server has btrfs, BaNG uses its snapshot feature to store several backups. Combined with the built-in compression the required amount of backup space is greatly reduced. In addition to command line tools, BaNG has a web front-end to explore the status of the backups at a single glance, while also providing graphs to better analyze the performance and scheduling.

Since 2012 we have been using it in production for our daily backups of 5+ PiB of data across several SAN servers, Linux and Mac workstations. However, it may still contain bugs and is primarily meant for advanced users. Please refer to the documentation for more details.

Main Features

  • Perl wrapper for established rsync tool
    • compatible with Linux and OS X
    • supports rsh and ssh as remote shell
    • supports hard links and btrfs snapshots
    • incremental transfers, restorable from single backup
    • multiple forked processes for faster transfers
    • wipe based on daily/weekly/monthly backup rotation scheme
    • generate cron entry for scheduled backups and wipes
  • Configurability
    • Easy and extensive configuration options
    • Configurable at several levels (host, group, server, default)
    • Based on text files in the YAML format
  • Reporting
    • Report detailed statistics to MySQL database
    • Report via socket to Xymon monitoring server
    • Report per email
  • Perl Dancer web front-end
    • User authentication and authorization
    • Dashboard with most important information
    • List backup paths to facilitate restore
    • View cron schedule of backup and wipe jobs
    • View configuration parameters
    • Create a new host or group from the web interface
    • View status reports of latest backup jobs
    • View errors in global log files
    • Graphs with various statistics
    • Swimlane graph of the backup schedule
    • Bar charts of largest backup jobs
    • Customizable menu entry for additional links
    • Documentation rendered from markdown files
    • Performance monitoring ( needs Netdata)
  • Command Line Interface - BaNGadm
    • Create / delete host or group config
    • Show available groups
    • Create target folder structure
    • Show / purge all failed backups
    • Create DB dumps
    • Create DB archive
    • Modify BTRFS properties
    • Generate and write cronjob file or print crontab to standard out
    • Check if cronjob file / crontab up-to-date