* On the phase 2 retry pass with rsync, verify the cached checksums
[BackupPC.git] / doc-src / BackupPC.pod
index ef114b8..1362a97 100644 (file)
@@ -41,7 +41,7 @@ cancel backups and browse and restore files from backups.
 =item *
 
 The http/cgi user interface has internationalization (i18n) support,
-currently providing English, French, German and Spanish.
+currently providing English, French, German, Spanish and Italian.
 
 =item *
 
@@ -96,10 +96,13 @@ BackupPC is Open Source software hosted by SourceForge.
 
 =item Full Backup
 
-A full backup is a complete backup of a share. BackupPC can be configured to
-do a full backup at a regular interval (often weekly). BackupPC can also
-be configured to keep a certain number of full backups, and to keep
-a smaller number of very old full backups.
+A full backup is a complete backup of a share. BackupPC can be
+configured to do a full backup at a regular interval (typically
+weekly).  BackupPC can be configured to keep a certain number
+of full backups.  Exponential expiry is also supported, allowing
+full backups with various vintages to be kept (for example, a
+settable number of most recent weekly fulls, plus a settable
+number of older fulls that are 2, 4, 8, or 16 weeks apart).
 
 =item Incremental Backup
 
@@ -121,6 +124,23 @@ BackupPC's CGI interface "fills-in" incremental backups based on the
 last full backup, giving every backup a "full" appearance.  This makes
 browsing and restoring backups easier.
 
+=item Partial Backup
+
+When a full backup fails or is canceled, and some files have already
+been backed up, BackupPC keeps a partial backup containing just the
+files that were backed up successfully.  The partial backup is removed
+when the next successful backup completes, or if another full backup
+fails resulting in a newer partial backup.  A failed full backup
+that has not backed up any files, or any failed incremental backup,
+is removed; no partial backup is saved in these cases.
+
+The partial backup may be browsed or used to restore files just like
+a successful full or incremental backup.
+
+With the rsync transfer method the partial backup is used to resume
+the next full backup, avoiding the need to retransfer the file data
+already in the partial backup.
+
 =item Identical Files
 
 BackupPC pools identical files using hardlinks.  By "identical
@@ -184,6 +204,13 @@ Three BackupPC mailing lists exist for announcements (backuppc-announce),
 developers (backuppc-devel), and a general user list for support, asking
 questions or any other topic relevant to BackupPC (backuppc-users).
 
+The lists are archived on SourceForge and Gmane.  The SourceForge lists
+are not always up to date and the searching is limited, so Gmane is
+a good alternative.  See:
+
+    http://news.gmane.org/index.php?prefix=gmane.comp.sysutils.backup.backuppc
+    http://sourceforge.net/mailarchive/forum.php?forum_id=503
+
 You can subscribe to these lists by visiting:
 
     http://lists.sourceforge.net/lists/listinfo/backuppc-announce
@@ -228,7 +255,9 @@ BackupPC server data to tape.
 Various programs and scripts use rsync to provide hardlinked backups.
 See, for example, Mike Rubel's site (L<http://www.mikerubel.org>),
 J. W. Schultz's dirvish (L<http://www.pegasys.ws/dirvish>),
+Ben Escoto's rdiff-backup (L<http://rdiff-backup.stanford.edu>),
 and John Bowman's rlbackup (L<http://www.math.ualberta.ca/imaging/rlbackup>).
+
 BackupPC provides many additional features, such as compressed storage,
 hardlinking any matching files (rather than just files with the same name),
 and storing special files without root privileges.  But these other scripts
@@ -245,13 +274,30 @@ releases of BackupPC:
 
 =item *
 
-Adding hardlink support to rsync.
+Adding hardlink support to rsync.  Currently the tar XferMethod
+correctly saves/restores hardlinks, but rsync does not.  Rsync
+2.6.2 has greatly improved the efficiency of saving hardlink
+information, so File::RsyncP and BackupPC::Xfer::RsyncFileIO need
+the corresponding changes.  Hardlink support is necessary for
+doing a bare-metal restore of a *nix system.
 
 =item *
 
-Adding block and file checksum caching to rsync.  This will significantly
-increase performance since the server doesn't have to read each file
-(twice) to compute the block and file checksums.
+Adding more complete utf8 support.  BackupPC should use utf8 as the
+native charset for storing file names, and the CGI script should emit
+utf8 so that the file names can be rendered correctly.  Additional
+configuration parameters should allow you to specify the client Xfer
+charset (ie: the filcharset delivered by the XferMethod).  BackupPC
+should encode/decode between this charset and utf8 when doing a
+backup/restore. That way BackupPC can store all files in utf8 no
+matter what charset is used by the XferMethod to deliver the file
+names.  Secondly, the CGI charset should be configurable (default
+utf8) and the CGI script BackupPC_Admin should encode the utf8 file
+names in the desired output charset.  Finally, the charset used to
+deliver file names when restoring individual file names should also
+be configurable, and again BackupPC_Admin should encode the file
+names in this charset (again, utf8 default).  That should allow the
+"Save As" IE dialog to default to the correct file name.
 
 =item *
 
@@ -276,26 +322,14 @@ be specified (eg: MySQL, ascii text etc).
 
 =item *
 
-Disconnect the notion of a physical host and a backup client.
-Currently there is a one-to-one match between physical hosts
-and backup clients.  Instead, the current notion of a host
-should be replaced by a backup client.  Each backup client
-corresponds to a physical host.  A physical host could have
-several backup clients.  This is useful for backing up
-different types of data, or backing up different portions
-of a machine with different frequencies or settings.
-
-(Note: this has already been implemented in 2.0.0.)
-
-=item *
-
-Resuming incomplete full backups.  Useful if a machine
-(eg: laptop) is disconnected from the network during a backup,
-or if the user manually stops a backup.  This would be supported
-initially for rsync.  The partial dump would be kept, and be
-browsable.  When the next dump starts, an incremental against
-the partial dump would be done to make sure it was up to date,
-and then the rest of the full dump would be done.
+Because of file name mangling (adding "f" to start of each file
+name) and with pending utf8 changes, BackupPC is not able to
+store files whose file name length is 255 bytes or greater. The
+format of the attrib file should be extended so that very long
+file names (ie: >= 255) are abbreviated on the file system, but
+the full name is stored in the attrib file.  This could also be
+used to eliminate the leading "f", since that is there to avoid
+collisions with the attrib file.
 
 =item *
 
@@ -313,24 +347,35 @@ same manner as rsync will.
 Support --listed-incremental or --incremental for tar,
 so that incrementals will depend upon any attribute change (eg: exist,
 mtime, file size, uid, gid), rather than just mtime.  This will allow
-tar to be to as capable as FileSys::SmbClient and rsync.
+tar to be to as capable as FileSys::SmbClient and rsync.  This is
+low priority since rsync is really the preferred method.
+
+=item *
+
+In addition to allowing a specific backup (incremental or full) to
+be started from the CGI interface, also allow a "regular" backup
+to be started.  This would behave just like a regular background
+backup and determine whether a full, incremental or nothing
+should be done.
 
 =item *
 
 For rysnc (and smb when FileSys::SmbClient is supported, and tar when
 --listed-incremental is supported) support multi-level incrementals.
 In fact, since incrementals will now be more "accurate", you could
-choose to never to full dumps (except the first time), or at a
+choose to never do full backups (except the first time), or at a
 minimum do them infrequently: each incremental would depend upon
-the last, giving a continuous chain of differential dumps.
+the last, giving a continuous chain of differential backups.
 
 =item *
 
-Add a backup browsing feature that shows backup history by file.
-So rather than a single directory view, it would be a table showing
-the files (down) and the backups (across).  The internal hardlinks
-encode which files are identical across backups.  You could immediately
-see which files changed on which backups.
+Allow diffs between two different backed up files to be displayed.
+The history feature in 2.1.0 does show files that are the same
+between backups.  Most often we would like to just take the diff of
+the same host, path and file between different backups, but it would
+be nice to generalize it to any pair of files (ie: different hosts,
+backups, paths etc).  But I'm not sure how the user interface would
+look.
 
 =item *
 
@@ -343,7 +388,7 @@ around 15-20%, which isn't spectacular, and likely not worth the
 implementation effort. The program xdelta (v1) on SourceForge (see
 L<http://sourceforge.net/projects/xdelta>) uses an rsync algorithm for
 doing efficient binary file deltas.  Rather than using an external
-program, File::RsyncP will eventually get the necessary delta
+program, File::RsyncP would eventually get the necessary delta
 generation code from rsync.
 
 =back
@@ -369,7 +414,7 @@ time and money) for marketing, PR and advertising, so it's up to
 all of you!
 
 Also, everyone is encouraged to contribute patches, bug reports, feature
-and design suggestions, code, and documentation corrections or
+and design suggestions, new code, and documentation corrections or
 improvements.
 
 =head1 Installing BackupPC
@@ -405,8 +450,8 @@ compression is on.
 =item *
 
 Perl version 5.6.0 or later. BackupPC has been tested with
-version 5.6.0, 5.6.1 and 5.8.0. If you don't have perl, please
-see L<http://www.cpan.org>.
+version 5.6.0, 5.6.1, 5.8.0, 5.8.1 and 5.8.2. If you don't
+have perl, please see L<http://www.cpan.org>.
 
 =item *
 
@@ -427,6 +472,7 @@ you are backing up linux/unix DHCP machines.  See L<http://www.samba.org>.
 Version 2.2.0 or later of Samba is required (smbclient's tar feature in
 2.0.8 and prior has bugs for file path lengths around 100 characters
 and generates bad output when file lengths change during the backup).
+Samba versions 3.x are stable and recommended instead of 2.x.
 
 See L<http://www.samba.org> for source and binaries.  It's pretty easy to
 fetch and compile samba, and just grab smbclient and nmblookup, without
@@ -450,7 +496,8 @@ version.
 
 For BackupPC to use Rsync you will also need to install the perl
 File::RsyncP module, which is available from
-L<http://perlrsync.sourceforge.net>.  Version 0.44 or later is required.
+L<http://perlrsync.sourceforge.net>.
+Version 0.51 or later is required.
 
 =item *
 
@@ -502,6 +549,15 @@ more troublesome, since it keeps this file locked all the time, so it
 cannot be read by smbclient whenever Outlook is running.  See the
 L<Limitations|limitations> section for more discussion of this problem.
 
+In addition to total disk space, you shold make sure you have
+plenty of inodes on your BackupPC data partition. Some users have
+reported running out of inodes on their BackupPC data partition.
+So even if you have plenty of disk space, BackupPC will report
+failures when the inodes are exhausted.  This is a particular
+problem with ext2/ext3 file systems that have a fixed number of
+inodes when the file system is built.  Use "df -i" to see your
+inode usage.
+
 =head2 Step 1: Getting BackupPC
 
 Download the latest version from L<http://backuppc.sourceforge.net>.
@@ -553,8 +609,16 @@ BackupPC-__VERSION__.tar.gz, run these commands as root:
     cd BackupPC-__VERSION__
     perl configure.pl
 
-You will be prompted for the full paths of various executables, and
-you will be prompted for the following information:
+The configure.pl also accepts command-line options if you wish
+to run it in a non-interactive manner.  It has self-contained
+documentation for all the command-line options, which you can
+read with perldoc:
+
+    perldoc configure.pl
+
+When you run configure.pl you will be prompted for the full paths
+of various executables, and you will be prompted for the following
+information:
 
 =over 4
 
@@ -723,7 +787,7 @@ DHCP addresses to search is specified in $Conf{DHCPAddressRanges}.
 
 Note also that the $Conf{ClientNameAlias} feature does not work for
 clients with DHCP set to 1.
-    
+
 =item User name
 
 This should be the unix login/email name of the user who "owns" or uses
@@ -806,13 +870,19 @@ and then set $Conf{XferMethod} to "tar" (use tar on the network
 mounted file system).
 
 Also, to make sure that file names with 8-bit characters are correctly
-transferred by smbclient you should add this to samba's smb.conf file:
+transferred by smbclient you should add this to samba's smb.conf file
+for samba 2.x:
 
     [global]
        # Accept the windows charset
        client code page = 850
        character set = ISO8859-1
 
+For samba 3.x this should instead be:
+
+    [global]
+       unix charset = ISO8859-1
+
 This setting should work for western europe.  
 See L<http://www.oreilly.com/catalog/samba/chapter/book/ch08_03.html>
 for more information about settings for other languages.
@@ -854,7 +924,7 @@ is recommended.  Rsync is run on the remote client via rsh or ssh.
 
 The relevant configuration settings are $Conf{RsyncClientPath},
 $Conf{RsyncClientCmd}, $Conf{RsyncClientRestoreCmd}, $Conf{RsyncShareName},
-$Conf{RsyncArgs}, $Conf{RsyncRestoreArgs} and $Conf{RsyncLogLevel}.
+$Conf{RsyncArgs}, and $Conf{RsyncRestoreArgs}.
 
 =item rsyncd
 
@@ -864,10 +934,14 @@ the client machine and BackupPC connects directly to it.
 
 The relevant configuration settings are $Conf{RsyncdClientPort},
 $Conf{RsyncdUserName}, $Conf{RsyncdPasswd}, $Conf{RsyncdAuthRequired},
-$Conf{RsyncShareName}, $Conf{RsyncArgs}, $Conf{RsyncRestoreArgs}
-and $Conf{RsyncLogLevel}.  In the case of rsyncd, $Conf{RsyncShareName}
-is the name of an rsync module (ie: the thing in square brackets in
-rsyncd's conf file -- see rsyncd.conf), not a file system path.
+$Conf{RsyncShareName}, $Conf{RsyncArgs}, and $Conf{RsyncRestoreArgs}.
+$Conf{RsyncShareName} is the name of an rsync module (ie: the thing
+in square brackets in rsyncd's conf file -- see rsyncd.conf), not a
+file system path.
+
+Be aware that rsyncd will remove the leading '/' from path names in
+symbolic links if you specify "use chroot = no" in the rsynd.conf file.
+See the rsyncd.conf manual page for more information.
 
 =back
 
@@ -903,6 +977,10 @@ for a password. There are two common versions of ssh: v1 and v2. Here
 are some instructions for one way to setup ssh.  (Check which version
 of SSH you have by typing "ssh" or "man ssh".)
 
+=item Mac OS X
+
+In general this should be similar to Linux/Unix machines.
+
 =over 4
 
 =item OpenSSH Instructions
@@ -1035,9 +1113,9 @@ Copy BackupPC's public key (BackupPC_id_rsa_1024_a.pub) to the
 =item Fix permissions
 
 You will probably need to make sure that all the files
-in /.ssh2 have no group or other read/write permission:
+in ~/.ssh2 have no group or other read/write permission:
 
-    chmod -R go-rwx /.ssh2
+    chmod -R go-rwx ~/.ssh2
 
 You should do the same thing for the BackupPC user on the server.
 
@@ -1083,7 +1161,7 @@ Next, force protocol version 1 by adding:
 
 to BackupPC's ~/.ssh/config on the server.
 
-Next, run "chmod -R go-rwx ~/.ssh" on the server and "chmod -R go-rwx /.ssh"
+Next, run "chmod -R go-rwx ~/.ssh" on the server and "chmod -R go-rwx ~/.ssh"
 on the client.
 
 Finally, test using:
@@ -1269,12 +1347,12 @@ to Apache's 1.x httpd.conf file:
     </IfModule>
 
 Apache 2.0.44 with Perl 5.8.0 on RedHat 7.1, Don Silvia reports that
-this works:
+this works (with tweaks from Michael Tuzi):
 
     LoadModule perl_module modules/mod_perl.so
     PerlModule Apache2
 
-    <Location /path/to/cgi/>
+    <Directory /path/to/cgi/>
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
@@ -1287,7 +1365,7 @@ this works:
        AuthType Basic
        AuthUserFile /path/to/user_file
        Require valid-user
-    </Location>
+    </Directory>
 
 There are other optimizations and options with mod_perl.  For
 example, you can tell mod_perl to preload various perl modules,
@@ -2040,6 +2118,15 @@ Each archive type is specified by a BackupPC host with its XferMethod
 set to 'archive'. This allows for multiple configurations at sites where
 there might be a combination of tape and cd/dvd backups being made.
 
+BackupPC provides a menu that allows one or more hosts to be archived.
+The most recent backup of each host is archived using BackupPC_tarCreate,
+and the output is optionally compressed and split into fixed-sized
+files (eg: 650MB).
+
+The archive for each host is done by default using
+__INSTALLDIR__/BackupPC_archiveHost.  This script can be copied
+and customized as needed.
+
 =head2 Configuring an Archive Host
 
 To create an Archive Host, add it to the hosts file just as any other host
@@ -2051,13 +2138,13 @@ the Archive Hosts's pc directory, adding the following line:
 $Conf{XferMethod} = 'archive';
 
 To further customise the archive's parameters you can adding the changed
-parameters in the host's config.pl file. The parameters are explained in the config.pl
-file.
+parameters in the host's config.pl file. The parameters are explained in
+the config.pl file.  Parameters may be fixed or the user can be allowed 
+to change them (eg: output device).
 
-The example archive programs included with BackupPC are for a CD and 
-Tape archive. The programs are called BackupPC_archivecd and 
-BackupPC_archivetape. These are specified by the ArchiveClientCmd configuration
-parameter.
+The per-host archive command is $Conf{ArchiveClientCmd}.  By default
+this invokes __INSTALLDIR__/BackupPC_archiveHost, which you can
+copy and customize as necessary.
 
 =head2 Starting an Archive
 
@@ -3156,7 +3243,7 @@ See L<http://backuppc.sourceforge.net>.
 
 =head1 Copyright
 
-Copyright (C) 2001-2003 Craig Barratt
+Copyright (C) 2001-2004 Craig Barratt
 
 =head1 Credits
 
@@ -3166,14 +3253,23 @@ Xavier provided the French translation fr.pm, with additions from
 Guillaume.
 
 Ryan Kucera contributed the directory navigation code and images
-for v1.5.0.  He also contributed the first skeleton of BackupPC_restore.
+for v1.5.0.  He contributed the first skeleton of BackupPC_restore.
+He also added a significant revision to the CGI interface, including
+CSS tags, in v2.1.0.
 
 Guillaume Filion wrote BackupPC_zipCreate and added the CGI support
 for zip download, in addition to some CGI cleanup, for v1.5.0.
+Guillaume continues to support fr.pm updates for each
+new version.
+
+Josh Marshall implemented the Archive feature in v2.1.0.
+
+Javier Gonzalez provided the Spanish translation, es.pm for v2.0.0.
 
-Javier Gonzalez provided the Spanish translation, es.pm.
+Manfred Herrmann provided the German translation, de.pm for v2.0.0.
+Manfred continues to support de.pm updates for each new version.
 
-Manfred Herrmann provided the German translation, de.pm.
+Lorenzo Cappelletti provided the Italian translation, it.pm for v2.1.0.
 
 Many people have reported bugs, made useful suggestions and helped
 with testing; see the ChangeLog and the mail lists.