Skip to content
Snippets Groups Projects
Select Git revision
  • debian
  • master default protected
  • systemd_integration
  • borg-sftp-support
  • nap-initial
  • mariaback_full-intial
  • move-mail-deps
  • borg-ssh-keygen
  • bugfix-borg-handler-create-options
  • borg-custom-init-options
  • 11293-partition_table_backup
  • tests
  • stretch-backports
  • no_vservers
  • pristine-tar
  • upstream
  • backupninja_debian/1.1.0-1
  • backupninja_upstream/1.1.0
  • backupninja-1.1.0
  • backupninja_debian/1.0.2-1
  • backupninja_upstream/1.0.2
  • backupninja-1.0.2
  • backupninja_debian/1.0.1-2
  • backupninja_debian/1.0.1-1
  • backupninja_upstream/1.0.1
  • backupninja-1.0.1
  • backupninja_debian/1.0-1
  • backupninja_upstream/1.0
  • backupninja-1.0
  • backupninja_debian/1.0_rc1-1
  • backupninja_upstream/1.0_rc1
  • backupninja-1.0-rc1
  • backupninja_debian/0.9.10-2
  • backupninja_debian/0.9.10-1
  • backupninja_upstream/0.9.10
  • backupninja-0.9.10
36 results

README.md

Blame
  • Forked from Liberate / backupninja
    291 commits behind, 123 commits ahead of the upstream repository.
    Ben's avatar
    Benzhaomin authored and Jerome Charaoui committed
    b4b2e0b0
    History
    README.md 10.06 KiB
                                          |\_
                 B A C K U P N I N J A   /()/
                                         `\|
    
      a silent flower blossom death strike to lost data.

    Backupninja allows you to coordinate system backup by dropping a few simple configuration files into /etc/backup.d/. Most programs you might use for making backups don't have their own configuration file format. Backupninja provides a centralized way to configure and coordinate many different backup utilities.

    Features

    The key features of backupninja are:

    • easy to read ini style configuration files
    • you can drop in scripts to handle new types of backups
    • backup actions can be scheduled
    • you can choose when status report emails are mailed to you (always, on warning, on error, never)
    • console-based wizard (ninjahelper) makes it easy to create backup action configuration files
    • passwords are never sent via the command line to helper programs
    • works with Linux-Vservers

    The following backup types are supported:

    • secure, remote, incremental filesystem backup (via rdiff-backup) incremental data is compressed. permissions are retained even with an unpriviledged backup user
    • backup of mysql databases (via mysqlhotcopy and mysqldump)
    • basic system and hardware info
    • encrypted remote backups (via duplicity or borgbackup)
    • backup of subversion repositories

    Installation

    See the installation documentation.

    Options

    The following options are available:

    • -h, --help: this usage message
    • -d, --debug: run in debug mode, where all log messages are output to the current shell
    • -f, --conffile FILE: use FILE for the main configuration instead of /etc/backupninja.conf
    • -t, --test: test run mode. This will test if the backup could run, without actually preforming any backups. For example, it will attempt to authenticate or test that ssh keys are set correctly.
    • -n, --now: perform actions now, instead of when they might be scheduled. No output will be created unless also run with -d.
    • --run FILE: runs the specified action FILE (e.g. one of the /etc/backup.d/ files). Also puts backupninja in debug mode.

    ninjahelper

    ninjahelper is an additional script which will walk you through the process of configuring backupninja. Ninjahelper has a menu driven curses based interface (using dialog).

    To add an additional 'wizard' to ninjahelper, follow these steps:

    1. To add a helper for the handler "blue", create the file blue.helper in the directory where the handlers live. (ie /usr/share/backupninja).

    2. Next, you need to add your helper to the global HELPERS variable and define the main function for your helper (the function name is always <helper>_wizard). for example, blue.helper:

          HELPERS="$HELPERS blue:description_of_this_helper"
          blue_wizard() {
            ... do work here ...
          }
    3. Look at the existing helpers to see how they are written. Try to re-use functions, such as the dialog functions that are defined in easydialog.sh, or the vserver functions defined in lib/vserver.

    4. Test, re-test, and test again. Try to break the helper by going backwards, try to think like someone who has no idea how to configure your handler would think, try to make your helper as simple as possible. Walk like a cat, become your shadow, don't let your senses betray you.

    Configuration

    Configuration files

    The general configuration file is /etc/backupninja.conf. In this file you can set the log level and change the default directory locations. You can force a different general configuration file with backupninja -f /path/to/conf.

    To preform the actual backup, backupninja processes each configuration file in /etc/backup.d according to the file's suffix: