* Add run-time check that IO::Dirent is functioning correctly,
[BackupPC.git] / doc-src / BackupPC.pod
index 849bfaf..ec1ea8d 100644 (file)
@@ -120,7 +120,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 +223,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
@@ -238,7 +243,7 @@ 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
+    http://sourceforge.net/mailarchive/forum.php?forum=backuppc-users
 
 You can subscribe to these lists by visiting:
 
@@ -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,8 +348,8 @@ 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
+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 RAID5) so that you can expand the
 file system as necessary.
 
@@ -415,6 +421,28 @@ with mod_perl support.
 
 =back
 
+=head2 What type of storage space do I need?
+
+BackupPC uses hardlinks to pool files common to different backups.
+Therefore BackupPC's data store (__TOPDIR__) must point to a single
+file system that supports hardlinks.  You cannot split this file
+system with multiple mount points or using symbolic links to point a
+sub-directory to a different file system (it is ok to use a single
+symbolic link at the top-level directory (__TOPDIR__) to point the
+entire data store somewhere else).  You can of course use any kind of
+RAID system or logical volume manager that combines the capacity of
+multiple disks into a single, larger, file system. Such approaches
+have the advantage that the file system can be expanded without having
+to copy it.
+
+Any standard linux or unix file system supports hardlinks.  NFS mounted
+file systems work too (provided the underlying file system supports
+hardlinks).  But windows based FAT and NTFS file systems will not work.
+
+Starting with BackupPC 3.1.0, run-time checks are done at startup and
+at the start of each backup to ensure that the file system can support
+hardlinks, since this is a common area of configuration problems.
+
 =head2 How much disk space do I need?
 
 Here's one real example for an environment that is backing up 65 laptops
@@ -458,7 +486,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
@@ -470,16 +498,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.
@@ -490,6 +518,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:
 
@@ -572,13 +605,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.
@@ -593,7 +629,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.
@@ -629,15 +665,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:
@@ -1002,9 +1042,9 @@ 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
+Setup instructions for ssh can be found at
 L<http://backuppc.sourceforge.net/faq/ssh.html>.
 
 =item Clients that use DHCP
@@ -1140,13 +1180,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:
 
@@ -1325,7 +1369,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");'
@@ -1344,7 +1388,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>
@@ -1354,7 +1398,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.
 
@@ -1419,7 +1463,7 @@ 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
@@ -1453,12 +1497,50 @@ the -a option and rsync -H.  However, the large number of hardlinks
 in the pool will make the memory usage large and the copy very slow.
 Don't forget to stop BackupPC while the copy runs.
 
+Starting in 3.0.0 a new script bin/BackupPC_tarPCCopy can be
+used to assist the copy process.  Given one or more pc paths
+(eg: TOPDIR/pc/HOST or TOPDIR/pc/HOST/nnn), BackupPC_tarPCCopy 
+creates a tar archive with all the hardlinks pointing to ../cpool/....
+Any files not hardlinked (eg: backups, LOG etc) are included
+verbatim.
+
+You will need to specify the -P option to tar when you extract
+the archive generated by BackupPC_tarPCCopy since the hardlink
+targets are outside of the directory being extracted.
+
+To copy a complete store (ie: __TOPDIR__) using BackupPC_tarPCCopy
+you should:
+
+=over 4
+
+=item *
+
+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) without the need to preserve hardlinks.
+
+=item *
+
+copy the pc directory using BackupPC_tarPCCopy:
+
+    su __BACKUPPCUSER__
+    cd NEW_TOPDIR
+    mkdir pc
+    cd pc
+    __INSTALLDIR__/bin/BackupPC_tarPCCopy __TOPDIR__/pc | tar xvPf -
+
+=back
+
 =back
 
 =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
 
@@ -1581,59 +1663,28 @@ incremental or full backup.
 
 The usage is:
 
-   BackupPC_tarCreate [-t] [-h host] [-n dumpNum] [-s shareName]
-                   [-r pathRemove] [-p pathAdd] [-b BLOCKS] [-w writeBufSz]
-                    files/directories...
+    BackupPC_tarCreate [options] files/directories...
+    Required options:
+       -h host         host from which the tar archive is created
+       -n dumpNum      dump number from which the tar archive is created
+                       A negative number means relative to the end (eg -1
+                       means the most recent dump, -2 2nd most recent etc).
+       -s shareName    share name from which the tar archive is created
+  
+    Other options:
+       -t              print summary totals
+       -r pathRemove   path prefix that will be replaced with pathAdd
+       -p pathAdd      new path prefix
+       -b BLOCKS       BLOCKS x 512 bytes per record (default 20; same as tar)
+       -w writeBufSz   write buffer size (default 1048576 = 1MB)
+       -e charset      charset for encoding file names (default: value of
+                       $Conf{ClientCharset} when backup was done)
+       -l              just print a file listing; don't generate an archive
+       -L              just print a detailed file listing; don't generate an archive
 
 The command-line files and directories are relative to the specified
 shareName.  The tar file is written to stdout.
 
-The required options are:
-
-=over 4
-
-=item -h host
-
-host from which the tar archive is created
-
-=item -n dumpNum
-
-dump number from which the tar archive is created
-
-=item -s shareName
-
-share name from which the tar archive is created
-
-=back
-
-Other options are:
-
-=over 4
-
-=item -t
-
-print summary totals
-
-=item -r pathRemove
-
-path prefix that will be replaced with pathAdd
-
-=item -p pathAdd
-
-new path prefix
-
-=item -b BLOCKS
-
-the tar block size, default is 20, meaning tar writes data in 20 * 512
-bytes chunks.
-
-=item -w writeBufSz
-
-write buffer size, default 1048576 (1MB).  You can increase this if
-you are trying to stream to a fast tape device.
-
-=back
-
 The -h, -n and -s options specify which dump is used to generate
 the tar archive.  The -r and -p options can be used to relocate
 the paths in the tar archive so extracted files can be placed
@@ -1648,57 +1699,27 @@ incremental or full backup.
 
 The usage is:
 
-   BackupPC_zipCreate [-t] [-h host] [-n dumpNum] [-s shareName]
-                   [-r pathRemove] [-p pathAdd] [-c compressionLevel]
-                   files/directories...
+    BackupPC_zipCreate [options] files/directories...
+    Required options:
+       -h host         host from which the zip archive is created
+       -n dumpNum      dump number from which the tar archive is created
+                       A negative number means relative to the end (eg -1
+                       means the most recent dump, -2 2nd most recent etc).
+       -s shareName    share name from which the zip archive is created
+  
+    Other options:
+       -t              print summary totals
+       -r pathRemove   path prefix that will be replaced with pathAdd
+       -p pathAdd      new path prefix
+       -c level        compression level (default is 0, no compression)
+       -e charset      charset for encoding file names (default: cp1252)
 
 The command-line files and directories are relative to the specified
-shareName.  The zip file is written to stdout.
-
-The required options are:
-
-=over 4
-
-=item -h host
-
-host from which the zip archive is created
-
-=item -n dumpNum
-
-dump number from which the zip archive is created
-
-=item -s shareName
-
-share name from which the zip archive is created
-
-=back
-
-Other options are:
-
-=over 4
-
-=item -t
-
-print summary totals
-
-=item -r pathRemove
-
-path prefix that will be replaced with pathAdd
-
-=item -p pathAdd
-
-new path prefix
-
-=item -c level
-
-compression level (default is 0, no compression)
-
-=back
-
-The -h, -n and -s options specify which dump is used to generate
-the zip archive.  The -r and -p options can be used to relocate
-the paths in the zip archive so extracted files can be placed
-in a location different from their original location.
+shareName.  The zip file is written to stdout. The -h, -n and -s
+options specify which dump is used to generate the zip archive.  The
+-r and -p options can be used to relocate the paths in the zip archive
+so extracted files can be placed in a location different from their
+original location.
 
 =back
 
@@ -1757,6 +1778,17 @@ The next screen allows you to adjust the parameters for this archive run.
 Press the "Start the Archive" to start archiving the selected hosts with the
 parameters displayed.
 
+=head2 Starting an Archive from the command line
+
+The script BackupPC_archiveStart can be used to start an archive from
+the command line (or cron etc).  The usage is:
+
+    BackupPC_archiveStart archiveHost userName hosts...
+
+This creates an archive of the most recent backup of each of
+the specified hosts.  The first two arguments are the archive
+host and the user name making the request.
+
 =head1 Other CGI Functions
 
 =head2 Configuration and Host Editor
@@ -1795,7 +1827,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
@@ -2102,8 +2134,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
@@ -2439,6 +2469,8 @@ Error message if archive failed.
 
 =back
 
+=back
+
 =head2 Compressed file format
 
 The compressed file format is as generated by Compress::Zlib::deflate
@@ -2640,7 +2672,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
 
@@ -2736,7 +2769,7 @@ See L<http://backuppc.sourceforge.net>.
 
 =head1 Copyright
 
-Copyright (C) 2001-2006 Craig Barratt
+Copyright (C) 2001-2007 Craig Barratt
 
 =head1 Credits
 
@@ -2779,8 +2812,14 @@ Jono Woodhouse from CapeSoft Software (www.capesoft.com) provided a
 new CSS skin for 3.0.0 with several layout improvements.  Sean Cameron
 (also from CapeSoft) designed new and more compact file icons for 3.0.0.
 
+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.
+
 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!