lowercase (lc) hostname to get increments
[BackupPC.git] / doc-src / BackupPC.pod
index 3f50272..c11216e 100644 (file)
@@ -43,15 +43,16 @@ and restore files from backups.
 
 The http/cgi user interface has internationalization (i18n) support,
 currently providing English, French, German, Spanish, Italian,
-Dutch and Portuguese-Brazilian.
+Dutch, Polish, Portuguese-Brazilian and Chinese
 
 =item *
 
-No client-side software is needed. On WinXX the standard smb protocol is
-used to extract backup data. On linux, unix or MacOSX clients, rsync or
-tar (over ssh/rsh/nfs) is used to extract backup data. Alternatively,
-rsync can also be used on WinXX (using cygwin), and Samba could be
-installed on the linux or unix client to provide smb shares).
+No client-side software is needed. On WinXX the standard smb
+protocol is used to extract backup data. On linux, unix or MacOSX
+clients, rsync, tar (over ssh/rsh/nfs) or ftp is used to extract
+backup data. Alternatively, rsync can also be used on WinXX (using
+cygwin), and Samba could be installed on the linux or unix client
+to provide smb shares).
 
 =item *
 
@@ -120,7 +121,7 @@ files that changed since the last full (level 0).
 
 For SMB and tar, BackupPC uses the modification time (mtime) to
 determine which files have changed since the last lower-level
-backup.  That mean SMB and tar incrementals are not able to detect
+backup.  That means SMB and tar incrementals are not able to detect
 deleted files, renamed files or new files whose modification time
 is prior to the last lower-level backup.
 
@@ -223,11 +224,16 @@ The SourceForge project page is at:
 
 This page has links to the current releases of BackupPC.
 
-=item BackupPC FAQ
+=item BackupPC Wiki
 
-BackupPC has a FAQ at L<http://backuppc.sourceforge.net/faq>.
+BackupPC has a Wiki at L<http://backuppc.wiki.sourceforge.net>.
+Everyone is encouraged to contribute to the Wiki.  Anyone with
+a SourceForge account can edit the Wiki.
 
-=item Mail lists
+The old FAQ is at L<http://backuppc.sourceforge.net/faq>, but
+is deprecated in favor of the Wiki.
+
+=item Mailing lists
 
 Three BackupPC mailing lists exist for announcements (backuppc-announce),
 developers (backuppc-devel), and a general user list for support, asking
@@ -273,9 +279,8 @@ pooling) and a convenient user interface to rsync.
 Two popular open source packages that do tape backup are
 Amanda (L<http://www.amanda.org>)
 and Bacula (L<http://www.bacula.org>).
-Amanda can also backup WinXX machines to tape using samba.
-These packages can be used as back ends to BackupPC to backup the
-BackupPC server data to tape.
+These packages can be used as complete solutions, or also as back
+ends to BackupPC to backup the 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/computers/rsync_snapshots>),
@@ -299,7 +304,7 @@ consideration.
 =head2 Road map
 
 The new features planned for future releases of BackupPC
-are at L<http://backuppc.sourceforge.net/faq/roadMap.html>.
+are on the Wiki at L<http://backuppc.wiki.sourceforge.net>.
 
 Comments and suggestions are welcome.
 
@@ -321,9 +326,10 @@ time and money) for marketing, PR and advertising, so it's up to
 all of you!  Feel free to vote for BackupPC at
 L<http://freshmeat.net/projects/backuppc>.
 
-Also, everyone is encouraged to contribute patches, bug reports, feature
-and design suggestions, new code, FAQs, and documentation corrections or
-improvements.  Answering questions on the mail list is a big help too.
+Also, everyone is encouraged to contribute patches, bug reports,
+feature and design suggestions, new code, Wiki additions (you can
+do those directly) and documentation corrections or improvements.
+Answering questions on the mailing list is a big help too.
 
 =head1 Installing BackupPC
 
@@ -342,9 +348,9 @@ you can run. You should be able to run 4-8 simultaneous backups on a
 moderately configured server.
 
 Several users have reported significantly better performance using
-reiser compared to ext3 for the BackupPC data file system.  It is
-also recommended you consider either an LVM or raid setup (either
-in HW or SW; eg: 3Ware RAID5) so that you can expand the
+reiserfs compared to ext3 for the BackupPC data file system.  It is
+also recommended you consider either an LVM or RAID setup (either
+in HW or SW; eg: 3Ware RAID10 or RAID5) so that you can expand the
 file system as necessary.
 
 When BackupPC starts with an empty pool, all the backup data will be
@@ -391,11 +397,10 @@ distributions for most platforms.
 
 =item *
 
-If you are using tar to backup linux/unix machines you should have version
-1.13.7 at a minimum, with version 1.13.20 or higher recommended.  Use
+If you are using tar to backup linux/unix machines, those machines should have
+version 1.13.7 at a minimum, with version 1.13.20 or higher recommended.  Use
 "tar --version" to check your version.  Various GNU mirrors have the newest
-versions of tar, see for example L<http://www.funet.fi/pub/gnu/alpha/gnu/tar>.
-As of July 2006 the latest version is 1.15.1.
+versions of tar; see L<http://www.gnu.org/software/tar/>.
 
 =item *
 
@@ -480,7 +485,7 @@ 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
+In addition to total disk space, you should 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
@@ -492,16 +497,16 @@ inode usage.
 =head2 Step 1: Getting BackupPC
 
 Some linux distributions now include BackupPC.  The Debian
-distribution, supprted by Ludovic Drolez, can be found at
-L<http://packages.debian.org/backuppc>; it should be included
-in the next stable Debian release.  On Debian, BackupPC can
+distribution, supported by Ludovic Drolez, can be found at
+L<http://packages.debian.org/backuppc> and is included
+in the current stable Debian release.  On Debian, BackupPC can
 be installed with the command:
 
     apt-get install backuppc
 
 In the future there might be packages for Gentoo and other
 linux flavors.  If the packaged version is older than the
-released version then you will probably want to install the
+released version then you may want to install the
 latest version as described below.
 
 Otherwise, manually fetching and installing BackupPC is easy.
@@ -512,6 +517,11 @@ download the latest version.
 
 =head2 Step 2: Installing the distribution
 
+Note: most information in this step is only relevant if you build
+and install BackupPC yourself.  If you use a package provided by a
+distribution, the package management system should take of installing
+any needed dependencies.
+
 First off, there are three perl modules you should install.
 These are all optional, but highly recommended:
 
@@ -541,15 +551,22 @@ module is installed.
 To use rsync and rsyncd with BackupPC you will need to install File::RsyncP.
 You can run "perldoc File::RsyncP" to see if this module is installed.
 File::RsyncP is available from L<http://perlrsync.sourceforge.net>.
-Version 0.52 or later is required.
+Version 0.68 or later is required.
+
+=item File::RsyncP
+
+To use ftp with BackupPC you will need to install three libraries:
+Net::FTP, Net::FTP::RetrHandle and Net::FTP::AutoReconnect. You can
+run "perldoc Net::FTP" to see if a particular module is installed.
 
 =back
 
-To build and install these packages, fetch the tar.gz file and
-then run these commands:
+To build and install these packages you should use the cpan program.
+Alternatively, you can fetch the tar.gz file from L<http://www.cpan.org>
+and then run these commands:
 
-    tar zxvf Archive-Zip-1.16.tar.gz
-    cd Archive-Zip-1.16
+    tar zxvf Archive-Zip-1.26.tar.gz
+    cd Archive-Zip-1.26
     perl Makefile.PL
     make
     make test
@@ -594,13 +611,16 @@ read with perldoc:
     perldoc configure.pl
 
 Starting with BackupPC 3.0.0, the configure.pl script by default
-complies with the file system hierarchy conventions.  The major
-difference compared to earlier versions is that by default
+complies with the file system hierarchy (FHS) conventions.  The
+major difference compared to earlier versions is that by default
 configuration files will be stored in /etc/BackupPC
 rather than below the data directory, __TOPDIR__/conf,
-and the log files will be stored in /var/log/BackupPC.
+and the log files will be stored in /var/log/BackupPC
 rather than below the data directory, __TOPDIR__/log.
 
+Note that distributions may choose to use different locations for
+BackupPC files than these defaults.
+
 If you are upgrading from an earlier version the configure.pl script
 will keep the configuration files and log files in their original
 location.
@@ -615,7 +635,7 @@ information.
 
 It is best if BackupPC runs as a special user, eg backuppc, that has
 limited privileges. It is preferred that backuppc belongs to a system
-administrator group so that sys admin members can browse backuppc files,
+administrator group so that sys admin members can browse BackupPC files,
 edit the configuration files and so on. Although configurable, the
 default settings leave group read permission on pool files, so make
 sure the BackupPC user's group is chosen restrictively.
@@ -651,15 +671,19 @@ On this installation, this is __INSTALLDIR__.
 You should decide where the BackupPC CGI script resides.  This will
 usually be below Apache's cgi-bin directory.
 
+It is also possible to use a different directory and use Apache's
+``<Directory>'' directive to specifiy that location.  See the Apache
+HTTP Server documentation for additional information.
+
 On this installation, this is __CGIDIR__.
 
-=item Apache image directory
+=item Apache image Directory
 
 A directory where BackupPC's images are stored so that Apache can
-serve them.  This should be somewhere under Apache's DocumentRoot
-directory.
+serve them.  You should ensure this directory is readable by Apache and
+create a symlink to this directory from the BackupPC CGI bin Directory.
 
-=item Config and Log directories
+=item Config and Log Directories
 
 In this installation the configuration and log directories are
 located in the following locations:
@@ -677,11 +701,12 @@ they can be set for new installations using command-line options.
 =head2 Step 3: Setting up config.pl
 
 After running configure.pl, browse through the config file,
-__CONFDIR__/config.pl, and make sure all the default settings
-are correct. In particular, you will need to decide whether to use
-smb, tar or rsync transport (or whether to set it on a per-PC basis)
-and set the relevant parameters for that transport method.
-See the section L<Client Setup|step 5: client setup> for more details.
+__CONFDIR__/config.pl, and make sure all the default settings are
+correct. In particular, you will need to decide whether to use
+smb, tar,or rsync or ftp transport (or whether to set it on a
+per-PC basis) and set the relevant parameters for that transport
+method. See the section L<Client Setup|step 5: client setup> for
+more details.
 
 =head2 Step 4: Setting up the hosts file
 
@@ -785,9 +810,10 @@ Here's a simple example of a hosts file:
 
 =head2 Step 5: Client Setup
 
-Three methods for getting backup data from a client are supported: smb,
-tar and rsync.  Smb or rsync are the preferred methods for WinXX clients
-and rsync or tar are the preferred methods for linux/unix/MacOSX clients.
+Four methods for getting backup data from a client are supported:
+smb, tar, rsync and ftp.  Smb or rsync are the preferred methods
+for WinXX clients and rsync or tar are the preferred methods for
+linux/unix/MacOSX clients.
 
 The transfer method is set using the $Conf{XferMethod} configuration
 setting. If you have a mixed environment (ie: you will use smb for some
@@ -959,15 +985,22 @@ 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}, 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.
+$Conf{RsyncShareName}, $Conf{RsyncArgs}, $Conf{RsyncArgsExtra}, 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.
 
+=item ftp
+
+You need to be running an ftp server on the client machine.
+The relevant configuration settings are $Conf{FtpShareName},
+$Conf{FtpUserName}, $Conf{FtpPasswd}, $Conf{FtpBlockSize},
+$Conf{FtpPort}, $Conf{FtpTimeout}, and $Conf{FtpFollowSymlinks}.
+
 =back
 
 You need to set $Conf{ClientCharset} to the client's charset so that
@@ -1024,10 +1057,10 @@ Note that if you run rsyncd (rsync daemon), ssh is not used.
 In this case, rsyncd provides its own authentication, but there
 is no encryption of network data.  If you want encryption of
 network data you can use ssh to create a tunnel, or use a
-program like stunnel.  If someone submits instructions I
+program like stunnel.
 
-Setup instructions for ssh are at
-L<http://backuppc.sourceforge.net/faq/ssh.html>.
+Setup instructions for ssh can be found at
+L<http://backuppc.sourceforge.net/faq/ssh.html> or on the Wiki.
 
 =item Clients that use DHCP
 
@@ -1162,13 +1195,17 @@ run this command:
 
 If this prints mod_perl.c then your Apache supports mod_perl.
 
+Note: on some distributions (like Debian) the command is not ``httpd'',
+but ``apache'' or ``apache2''. Those distributions will generally also
+use ``apache'' for the Apache user account and configuration files.
+
 Using mod_perl with BackupPC_Admin requires a dedicated Apache
 to be run as the BackupPC user (__BACKUPPCUSER__).  This is
 because BackupPC_Admin needs permission to access various files
 in BackupPC's data directories.  In contrast, the standard
 installation (without mod_perl) solves this problem by having
 BackupPC_Admin installed as setuid to the BackupPC user, so that
-BackupPC_Admin runs as the BackuPC user.
+BackupPC_Admin runs as the BackupPC user.
 
 Here are some specifics for each setup:
 
@@ -1347,7 +1384,7 @@ BackupPC (starting with v2.0.0) looks up hosts with DHCP = 0 in this manner:
 First DNS is used to lookup the IP address given the client's name
 using perl's gethostbyname() function.  This should succeed for machines
 that have fixed IP addresses that are known via DNS.  You can manually
-see whether a given host have a DNS entry according to perls'
+see whether a given host have a DNS entry according to perl's
 gethostbyname function with this command:
 
     perl -e 'print(gethostbyname("myhost") ? "ok\n" : "not found\n");'
@@ -1366,7 +1403,7 @@ If this fails you will see output like:
     querying myhost on 10.10.255.255
     name_query failed to find name myhost
 
-If this success you will see output like:
+If it is successful you will see output like:
 
     querying myhost on 10.10.255.255
     10.10.1.73 myhost<00>
@@ -1376,7 +1413,7 @@ nmblookup.  For example:
 
     nmblookup -B 10.10.1.255 myhost
 
-If necessary, experiment on the nmblookup command that will return the
+If necessary, experiment with the nmblookup command which will return the
 IP address of the client given its name.  Then update
 $Conf{NmbLookupFindHostCmd} with any necessary options to nmblookup.
 
@@ -1424,24 +1461,24 @@ machine) you have two choices.  First, you can keep the backups accessible
 and browsable, but disable all new backups.  Alternatively, you can
 completely remove the client and all its backups.
 
-To disable backups for a client there are two special values for
-$Conf{FullPeriod} in that client's per-PC config.pl file:
+To disable backups for a client $Conf{BackupsDisable} can be
+set to two different values in that client's per-PC config.pl file:
 
 =over 4
 
-=item -1
+=item 1
 
 Don't do any regular backups on this machine.  Manually
 requested backups (via the CGI interface) will still occur.
 
-=item -2
+=item 2
 
 Don't do any backups on this machine.  Manually requested
 backups (via the CGI interface) will be ignored.
 
 =back
 
-This will still allow that client's old backups to be browsable
+This will still allow the client's old backups to be browsable
 and restorable.
 
 To completely remove a client and all its backups, you should remove its
@@ -1451,11 +1488,11 @@ BackupPC a HUP (-1) signal so that it re-reads the hosts file.
 If you don't do this, BackupPC will automatically re-read the
 hosts file at the next regular wakeup.
 
-Note that when you remove a client's backups you won't initially recover
-a lot of disk space.  That's because the client's files are still in
-the pool.  Overnight, when BackupPC_nightly next runs, all the unused
-pool files will be deleted and this will recover the disk space used
-by the client's backups.
+Note that when you remove a client's backups you won't initially
+recover much disk space.  That's because the client's files are
+still in the pool.  Overnight, when BackupPC_nightly next runs,
+all the unused pool files will be deleted and this will recover
+the disk space used by the client's backups.
 
 =item Copying the pool
 
@@ -1498,7 +1535,7 @@ stop BackupPC so that the store is static.
 =item *
 
 copy the cpool, conf and log directory trees using any technique
-(like cp, rsync or tar) wihtout the need to preserve hardlinks.
+(like cp, rsync or tar) without the need to preserve hardlinks.
 
 =item *
 
@@ -1516,8 +1553,9 @@ copy the pc directory using BackupPC_tarPCCopy:
 
 =head2 Fixing installation problems
 
-Please see the FAQ at L<http://backuppc.sourceforge.net/faq> for
-debugging suggestions.
+Please see the Wiki at L<http://backuppc.wiki.sourceforge.net> for
+debugging suggestions.  If you find a solution to your problem that
+could help other users please add it to the Wiki!
 
 =head1 Restore functions
 
@@ -1571,7 +1609,7 @@ will be deferred if there is a backup currently running for that host.
 When the restore job is run, smbclient, tar, rsync or rsyncd is used
 (depending upon $Conf{XferMethod}) to actually restore the files.
 Sorry, there is currently no option to cancel a restore that has been
-started.
+started.  Currently ftp restores are not fully implemented.
 
 A record of the restore request, including the result and list of
 files and directories, is kept.  It can be browsed from the host's
@@ -1804,7 +1842,7 @@ user.
 =head2 RSS
 
 BackupPC supports a very basic RSS feed.  Provided you have the
-XML::RSS perl module installed, a URL simular to this will
+XML::RSS perl module installed, a URL similar to this will
 provide RSS information:
 
     http://localhost/cgi-bin/BackupPC/BackupPC_Admin?action=rss
@@ -1958,15 +1996,15 @@ same (only displayed if $Conf{XferLogLevel} >= 2).
 =back
 
 As BackupPC_tarExtract extracts the files from smbclient or tar, or as
-rsync runs, it checks each file in the backup to see if it is identical
-to an existing file from any previous backup of any PC. It does this
-without needed to write the file to disk. If the file matches an
-existing file, a hardlink is created to the existing file in the pool.
-If the file does not match any existing files, the file is written to
-disk and the file name is saved in __TOPDIR__/pc/$host/NewFileList for
-later processing by BackupPC_link.  BackupPC_tarExtract and rsync can handle
-arbitrarily large files and multiple candidate matching files without
-needing to write the file to disk in the case of a match.  This
+rsync or ftp runs, it checks each file in the backup to see if it is
+identical to an existing file from any previous backup of any PC. It
+does this without needed to write the file to disk. If the file matches
+an existing file, a hardlink is created to the existing file in the
+pool. If the file does not match any existing files, the file is written
+to disk and the file name is saved in __TOPDIR__/pc/$host/NewFileList
+for later processing by BackupPC_link.  BackupPC_tarExtract and rsync
+can handle arbitrarily large files and multiple candidate matching files
+without needing to write the file to disk in the case of a match.  This
 significantly reduces disk writes (and also reads, since the pool file
 comparison is done disk to memory, rather than disk to disk).
 
@@ -2111,8 +2149,6 @@ last email was sent.  Should not be edited.
 All of BackupPC's data (PC backup images, logs, configuration information)
 is stored below this directory.
 
-=back
-
 Below __TOPDIR__ are several directories:
 
 =over 4
@@ -2204,7 +2240,7 @@ a suffix of 0, 1, ....
 
 =item XferERR or XferERR.z
 
-Output from the transport program (ie: smbclient, tar or rsync)
+Output from the transport program (ie: smbclient, tar, rsync or ftp)
 for the most recent failed backup.
 
 =item new
@@ -2214,7 +2250,7 @@ directory is renamed if the backup succeeds.
 
 =item XferLOG or XferLOG.z
 
-Output from the transport program (ie: smbclient, tar or rsync)
+Output from the transport program (ie: smbclient, tar, rsync or ftp)
 for the current backup.
 
 =item nnn (an integer)
@@ -2223,7 +2259,7 @@ Successful backups are in directories numbered sequentially starting at 0.
 
 =item XferLOG.nnn or XferLOG.nnn.z
 
-Output from the transport program (ie: smbclient, tar or rsync)
+Output from the transport program (ie: smbclient, tar, rsync or ftp)
 corresponding to backup number nnn.
 
 =item RestoreInfo.nnn
@@ -2283,11 +2319,11 @@ Stop time of the backup in unix seconds.
 
 =item nFiles
 
-Number of files backed up (as reported by smbclient, tar or rsync).
+Number of files backed up (as reported by smbclient, tar, rsync or ftp).
 
 =item size
 
-Total file size backed up (as reported by smbclient, tar or rsync).
+Total file size backed up (as reported by smbclient, tar, rsync or ftp).
 
 =item nFilesExist
 
@@ -2311,7 +2347,7 @@ Total size of files that were not in the pool
 
 =item xferErrs
 
-Number of errors or warnings from smbclient, tar or rsync.
+Number of errors or warnings from smbclient, tar, rsync or ftp.
 
 =item xferBadFile
 
@@ -2410,7 +2446,7 @@ Number of errors from BackupPC_tarCreate during restore.
 
 =item xferErrs
 
-Number of errors from smbclient, tar or rsync during restore.
+Number of errors from smbclient, tar, rsync or ftp during restore.
 
 =back
 
@@ -2448,6 +2484,8 @@ Error message if archive failed.
 
 =back
 
+=back
+
 =head2 Compressed file format
 
 The compressed file format is as generated by Compress::Zlib::deflate
@@ -2649,7 +2687,8 @@ since it saves attribute meta-data separate from the files.  Since
 BackupPC mostly does reads from disk, maintaining the access time of
 files generates a lot of unnecessary disk writes.  So, provided 
 BackupPC has a dedicated data disk, you should consider mounting
-BackupPC's data directory with the noatime attribute (see mount(1)).
+BackupPC's data directory with the noatime (or, with Linux kernels
+>=2.6.20, relatime) attribute (see mount(1)).
 
 =head2 Limitations
 
@@ -2745,7 +2784,7 @@ See L<http://backuppc.sourceforge.net>.
 
 =head1 Copyright
 
-Copyright (C) 2001-2007 Craig Barratt
+Copyright (C) 2001-2009 Craig Barratt
 
 =head1 Credits
 
@@ -2790,10 +2829,14 @@ new CSS skin for 3.0.0 with several layout improvements.  Sean Cameron
 
 Youlin Feng provided the Chinese translation for 3.1.0.
 
+Karol 'Semper' Stelmaczonek provided the Polish translation for 3.1.0.
+
 Jeremy Tietsort provided the host summary table sorting feature for 3.1.0.
 
+Paul Mantz contributed the ftp Xfer method for 3.2.0.
+
 Many people have reported bugs, made useful suggestions and helped
-with testing; see the ChangeLog and the mail lists.
+with testing; see the ChangeLog and the mailing lists.
 
 Your name could appear here in the next version!