5c6f2a162a0bfc1673e57ff336a7597b7358285a
[matthijs/upstream/backupninja.git] / docs / man / backupninja.1
1 .\"                                      Hey, EMACS: -*- nroff -*-
2 .\" First parameter, NAME, should be all caps
3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4 .\" other parameters are allowed: see man(7), man(1)
5 .TH BACKUPNINJA 1 "January 2, 2005" "riseup" "backupninja package"
6 .\" Please adjust this date whenever revising the manpage.
7 .\"
8 .\" Some roff macros, for reference:
9 .\" .nh        disable hyphenation
10 .\" .hy        enable hyphenation
11 .\" .ad l      left justify
12 .\" .ad b      justify to both left and right margins
13 .\" .nf        disable filling
14 .\" .fi        enable filling
15 .\" .br        insert line break
16 .\" .sp <n>    insert n+1 empty lines
17 .\" for manpage-specific macros, see man(7)
18 .SH NAME
19 BACKUPNINJA \- A lightweight, extensible meta-backup system
20 .br
21 .I
22 "a silent flower blossom death strike to lost data."
23 .SH SYNOPSIS
24 .B "backupninja [ \-h ] [ \-d ] [ \-f filename]"
25 .br
26 .SH DESCRIPTION
27 .B Backupninja 
28 allows you to coordinate system backups by dropping a few
29 simple configuration files into /etc/backup.d/. Most programs you
30 might use for making backups don't have their own configuration file
31 format. Backupninja provides a centralized way to configure and
32 coordinate many different backup utilities.
33 .PP
34
35 .SH FEATURES
36  - easy to read ini style configuration files.
37  - secure, remote, incremental filesytem backup (via rdiff-backup).
38    incremental data is compressed. permissions are retained even
39    with an unprivileged backup user.
40  - backup of mysql databases (via mysqlhotcopy and mysqldump).
41  - backup of ldap databases (via slapcat and ldapsearch).
42  - passwords are never sent via the command line to helper programs.
43  - you can drop in scripts to handle new types of backups.
44  - backup actions can be scheduled
45  - you can choose when status report emails are mailed to you
46    (always, on warning, on error, never).
47          
48 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
49 .\" \fI<whatever>\fP escape sequences to invoke bold face and italics, 
50 .\" respectively.
51
52 .SH OPTIONS
53 .TP
54 .B \-h, \-\-help           
55 Show summary of options
56 .TP
57 .B \-d, \-\-debug          
58 Run in debug mode, where all log messages are output to the current shell.
59 .TP
60 .B \-f, \-\-conffile FILE  
61 Use FILE for the main configuration instead of /etc/backupninja.conf
62 .TP
63 .B \-t, \-\-test           
64 Run in test mode, no actions are actually taken.
65 .TP
66 .B \-n, \-\-now            
67 Perform actions now, instead of when they  might be scheduled.
68
69 .SH EXAMPLES
70 .TP
71 Backupninja can be used to impliment whatever backup strategy you choose. It is intended, however, to be used like so:
72 .TP
73 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.
74 .TP
75 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.
76 .TP
77 There are many different backup strategies out there, including "pull style", magnetic tape, rsync + hard links, etc. We believe that the strategy outlined above is the way to go because: (1) hard disks are very cheap these days, (2) pull style backups are no good, because then the backup server must have root on the production server, and (3) rdiff-backup is more space efficient and featureful than using rsync + hard links.
78
79 .SH SSH KEYS
80 .TP
81 In order for rdiff-backup to sync files over ssh 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:
82
83 .br
84 root@srchost# ssh-keygen -t dsa
85 .br
86 root@srchost# ssh-copy-id -i /root/.ssh/id_dsa.pub backup@desthost
87
88 .TP
89 Now, you should be able to ssh from user 'root' on srchost to user 'backup' on desthost without specifying a password.
90
91 .TP
92 Note: when prompted for a password by ssh-keygen, just leave it blank by hitting return.
93
94 .SH FILES
95 .PD 0
96 \fB/usr/sbin/backupninja\fP        main script
97 .br
98 \fB/etc/backupninja.conf\fP        main configuration file; general options
99 .br
100 \fB/etc/cron.d/backupninja\fP      runs main script nightly
101 .br
102 \fB/etc/logrotate.d/backupninja\fP rotates backupninja.log
103 .br
104 \fB/etc/backup.d\fP                directory for configuration files
105 .br
106 \fB/usr/share/backupninja\fP       directory for handler scripts
107 .br
108 .PD
109
110 .SH SEE ALSO
111 .BR backupninja.conf (5), 
112 .br
113 .SH AUTHOR
114 BACKUPNINJA was written by <elijah@riseup.net>.
115 .br 
116 BACKUPNINJA was packaged by <micah@riseup.net>.
117 .PP
118 This manual page was written by stefani <stefani@riseup.net>.