Skip to content
Snippets Groups Projects
backupninja.1 5.14 KiB
Newer Older
  • Learn to ignore specific revisions
  • micah's avatar
    micah committed
    .\"                                      Hey, EMACS: -*- nroff -*-
    .\" First parameter, NAME, should be all caps
    .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
    .\" other parameters are allowed: see man(7), man(1)
    
    elijah's avatar
    elijah committed
    .TH BACKUPNINJA 1 "October 10, 2005" "riseup" "backupninja package"
    
    micah's avatar
    micah committed
    .\" Please adjust this date whenever revising the manpage.
    .\"
    .\" Some roff macros, for reference:
    .\" .nh        disable hyphenation
    .\" .hy        enable hyphenation
    .\" .ad l      left justify
    .\" .ad b      justify to both left and right margins
    .\" .nf        disable filling
    .\" .fi        enable filling
    .\" .br        insert line break
    .\" .sp <n>    insert n+1 empty lines
    .\" for manpage-specific macros, see man(7)
    .SH NAME
    BACKUPNINJA \- A lightweight, extensible meta-backup system
    .br
    .I
    "a silent flower blossom death strike to lost data."
    .SH SYNOPSIS
    
    elijah's avatar
    elijah committed
    .B "backupninja [ \-h ] [ \-d ] [ \-n ] [ \-t ] [ \-f filename ] [ \-\-run filename ]"
    
    micah's avatar
    micah committed
    .br
    .SH DESCRIPTION
    .B Backupninja 
    allows you to coordinate system backups 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.
    .PP
    
    .SH FEATURES
    
    elijah's avatar
    elijah committed
    .IP - 2
    easy to read ini style configuration files.
    .IP -
    you can drop in scripts to handle new types of backups.
    .IP -
    backup actions can be scheduled.
    .IP -
    you can choose when status report emails are mailed to you (always, on warning, on error, never).
    .IP -
    console-based wizard (ninjahelper) makes it easy to create backup action configuration files.
    .IP -
    passwords are never sent via the command line to helper programs.
    .IP -
    in order to backup a db or sql database, you cannot simply copy database files. backupninja helps you safely export the data to a format which you can backup.
    .IP -
    works with Linux-Vservers. 
    
    .B Backup types include:
    .IP - 2
    
    secure, remote, incremental filesystem backup (via rdiff-backup). incremental data is compressed. permissions are retained even with an unpriviledged backup user.
    
    elijah's avatar
    elijah committed
    .IP -
    basic system and hardware information.
    .IP -
    encrypted remote backups (via duplicity).
    .IP -
    safe backup of MySQL, PostgreSQL, OpenLDAP, and subversion databases.
    .IP -
    burn CD/DVDs or create ISOs. 
    
    micah's avatar
    micah committed
    	 
    .\" TeX users may be more comfortable with the \fB<whatever>\fP and
    .\" \fI<whatever>\fP escape sequences to invoke bold face and italics, 
    .\" respectively.
    
    .SH OPTIONS
    .TP
    .B \-h, \-\-help           
    Show summary of options
    .TP
    .B \-d, \-\-debug          
    Run in debug mode, where all log messages are output to the current shell.
    .TP
    
    elijah's avatar
    elijah committed
    .B \-f, \-\-conffile CONF_FILE  
    Use CONF_FILE for the main configuration instead of /etc/backupninja.conf
    
    micah's avatar
    micah committed
    .TP
    .B \-t, \-\-test           
    Run in test mode, no actions are actually taken.
    .TP
    .B \-n, \-\-now            
    
    elijah's avatar
    elijah committed
    Perform actions now, instead of when they might be scheduled.
    .TP
    .B \-\-run ACTION_FILE
    Runs the action configuration ACTION_FILE and exits.
    
    .SH CONFIGURATION
    
    General settings are configured in /etc/backupninja.conf. In this file you
    
    intrigeri's avatar
    intrigeri committed
    can set the log level and change the default directory locations. See \fBbackupninja.conf(5)\fP.
    
    micah's avatar
    micah committed
    
    
    elijah's avatar
    elijah committed
    To preform the actual backup actions, backupninja processes each action configuration file in
    /etc/backup.d according to the file's suffix. See \fBbackup.d(5)\fP.
    
    .SH EXAMPLE USAGE
    
    micah's avatar
    micah committed
    .TP
    
    Backupninja can be used to implement whatever backup strategy you choose. It is intended, however, to be used like so:
    
    micah's avatar
    micah committed
    .TP
    First, databases are safely copied or exported to /var/backups.  Often, you cannot make a file backup of a database while it is in use, hence the need to use special tools to make a safe copy or export into /var/backups.
    .TP
    Then, vital parts of the file system, including /var/backups, are nightly pushed to a remote, off-site, hard disk (using rdiff-backup). The local user is root, but the remote user is not privileged. Hopefully, the remote filesystem is encrypted.
    .TP
    
    elijah's avatar
    elijah committed
    In order for this to work (ie for diff-backup to run unattended), you must create ssh keys on the source server and copy the public key to the remote user's authorized keys file. For example:
    
    micah's avatar
    micah committed
    .br
    
    root@srchost# ssh-keygen \-t rsa \-b 4096
    
    micah's avatar
    micah committed
    .br
    
    root@srchost# ssh-copy-id \-i /root/.ssh/id_dsa.pub backup@desthost
    
    micah's avatar
    micah committed
    .TP
    
    elijah's avatar
    elijah committed
    Now, you should be able to ssh from user 'root' on srchost to user 'backup' on desthost without specifying a password. When prompted for a password by ssh-keygen, just leave it blank by hitting return. The "wizard" \fBninjahelper(1)\fP will walk you through these steps.
    
    micah's avatar
    micah committed
    
    .SH FILES
    .PD 0
    \fB/usr/sbin/backupninja\fP        main script
    .br
    \fB/etc/backupninja.conf\fP        main configuration file; general options
    .br
    
    elijah's avatar
    elijah committed
    \fB/etc/cron.d/backupninja\fP      runs main script hourly
    
    micah's avatar
    micah committed
    .br
    \fB/etc/logrotate.d/backupninja\fP rotates backupninja.log
    .br
    \fB/etc/backup.d\fP                directory for configuration files
    .br
    \fB/usr/share/backupninja\fP       directory for handler scripts
    .br
    
    elijah's avatar
    elijah committed
    \fB/usr/share/doc/backupninja/examples\fP       example action configuration files.
    .br
    
    micah's avatar
    micah committed
    .PD
    
    .SH SEE ALSO
    
    elijah's avatar
    elijah committed
    .BR ninjahelper (1), 
    
    micah's avatar
    micah committed
    .BR backupninja.conf (5), 
    
    elijah's avatar
    elijah committed
    .BR backup.d (5), 
    
    micah's avatar
    micah committed
    .br
    .SH AUTHOR
    
    elijah's avatar
    elijah committed
    BACKUPNINJA was written by the riseup.net collective.