-=item -r
-
-Read check: re-read the compressed file and compare it against
-the original uncompressed file. Can only be used in test mode.
-
-=item -c #
-
-Number of children to fork. BackupPC_compressPool can take a long time
-to run, so to speed things up it spawns four children, each working on a
-different part of the pool. You can change the number of children with
-the -c option.
-
-=back
-
-Here are the recommended steps for running BackupPC_compressPool:
-
-=over 4
-
-=item *
-
-Stop BackupPC (eg: "/etc/init.d/backuppc stop").
-
-=item *
-
-Set $Conf{CompressLevel} to a non-zero number (eg: 3).
-
-=item *
-
-Do a dry run of BackupPC_compressPool. Make sure you run this as
-the BackupPC user (__BACKUPPCUSER__):
-
- BackupPC_compressPool -t -r
-
-The -t option (test mode) makes BackupPC_compressPool do all the steps,
-but not actually change anything. The -r option re-reads the compressed
-file and compares it against the original.
-
-BackupPC_compressPool gives a status as it completes each 1% of the job.
-It also shows the cumulative compression ratio and estimated completion
-time. Once you are comfortable that things look ok, you can kill
-BackupPC_compressPool or wait for it to finish.
-
-=item *
-
-Now you are ready to run BackupPC_compressPool for real. Once again,
-as the BackupPC user (__BACKUPPCUSER__), run:
-
- BackupPC_compressPool
-
-You should put the output into a file and tail this file. (The running
-time could be twice as long as the test mode since the test mode file
-writes are immediately followed by an unlink, so in test mode it is
-likely the file writes never make it to disk.)
-
-It is B<critical> that BackupPC_compressPool runs to completion before
-re-starting BackupPC. Before BackupPC_compressPool completes, none of
-the existing backups will be in a consistent state. If you must stop
-BackupPC_compressPool for some reason, send it an INT or TERM signal
-and give it several seconds (or more) to clean up gracefully.
-After that, you can re-run BackupPC_compressPool and it will start
-again where it left off. Once again, it is critical that it runs
-to 100% completion.
-
-=back
-
-After BackupPC_compressPool completes you should have a complete set
-of compressed backups (and your disk usage should be lower). You
-can now re-start BackupPC.
-
-=back
-
-=head2 Debugging installation problems
-
-This section will probably grow based on the types of questions on
-the BackupPC mail list. Eventually the FAQ at
-L<http://backuppc.sourceforge.net/faq/> will include more details
-than this section.
-
-=over 4
-
-=item Check log files
-
-Assuming BackupPC can start correctly you should inspect __TOPDIR__/log/LOG
-for any errors. Assuming backups for a particular host start, you
-should be able to look in __TOPDIR__/pc/$host/LOG for error messages
-specific to that host. Always check both log files.
-
-=item CGI script doesn't run
-
-Perhaps the most common program with the installation is getting the
-CGI script to run. Often the setuid isn't configured correctly, or
-doesn't work on your system.
-
-First, try running BackupPC_Admin manually as the BackupPC user, eg:
-
- su __BACKUPPCUSER__
- __CGIDIR__/BackupPC_Admin
-
-Now try running it as the httpd user (which ever user apache runs as);
-
- su httpd
- __CGIDIR__/BackupPC_Admin
-
-In both cases do you get normal html output?
-
-If the first case works but the second case fails with an error that
-the wrong user is running the script then you have a setuid problem.
-(This assumes you are running BackupPC_Admin without mod_perl, and
-you therefore need seduid to work. If you are using mod_perl then
-apache should run as user __BACKUPPCUSER__.)
-
-First you should make sure the cgi-bin directory is on a file system
-that doesn't have the "nosuid" mount option.
-
-Next, experiment by creating this script:
-
- #!/bin/perl
-
- printf("My userid is $> (%s)\n", (getpwuid($>))[0]);
-
-then chown it to backuppc and chmod u+s:
-
- root# chown backuppc testsetuid
- root# chmod u+s testsetuid
- root# chmod a+x testsetuid
- root# ls -l testsetuid
- -rwsr-xr-x 1 backuppc wheel 76 Aug 26 09:46 testsetuid*
-
-Now run this program as a normal user. What uid does it print?
-Try changing the first line of the script to directly call sperl:
-
- #!/usr/bin/sperl5.8.0
-
-(modify according to your version and path). Does this work
-instead?
-
-Finally, you should invoke the CGI script from a browser, using
-a URL like:
-
- http://myHost/cgi-bin/BackupPC/BackupPC_Admin
-
-You should make sure REMOTE_USER is being set by apache (see the
-earlier section) so that user authentication works. Make sure
-the config settings $Conf{CgiAdminUserGroup} and $Conf{CgiAdminUsers}
-correctly specify the privileged administrator users.
-
-=item You cannot access per-host information in the CGI interface
-
-If you get the error
-
- Only privileged users can view information about host xyz
-
-it means that BackupPC_Admin is unable to match the user's login
-name (supplied by Apache via the REMOTE_USER environment variable)
-with either that host's user name (in the conf/hosts file) or
-with the administrators specified in the $Conf{CgiAdminUsers}
-or $Conf{CgiAdminUserGroup} settings.
-
-The most common problem is that REMOTE_USER is not set because the
-Apache authentication is not correctly configured. In this case
-BackupPC_Admin will report this additional error:
-
- Note: $ENV{REMOTE_USER} is not set, which could mean there is an
- installation problem. BackupPC_Admin expects Apache to authenticate
- the user and pass their user name into this script as the REMOTE_USER
- environment variable. See the documentation.
-
-You should review the configuration instructions to setup Apache
-authentication correctly. To test if REMOTE_USER is being set
-correctly, there is a simple script called printenv that is
-included with Apache. This is a simple CGI script that prints
-out all the environment variables. Place this script in the
-same directory as BackupPC_Admin and run it with a URL like:
-
- http://myHost/cgi-bin/BackupPC/printenv
-
-Check the value of the REMOTE_USER environment variable.
-Here's a copy of the printenv script:
-
- #!/usr/bin/perl
- ##
- ## printenv -- demo CGI program which just prints its environment
- ##
-
- print "Content-type: text/plain\n\n";
- foreach $var (sort(keys(%ENV))) {
- $val = $ENV{$var};
- $val =~ s|\n|\\n|g;
- $val =~ s|"|\\"|g;
- print "${var}=\"${val}\"\n";
- }
-
-=item Can't ping or find host
-
-Please read the section L<How BackupPC Finds Hosts|how backuppc finds hosts>.
-
-The BackupPC_dump command now has a -v option, so the easiest way to
-debug backup problems on a specific host is to run BackupPC_dump
-manually as the BackupPC user:
-
- su __BACKUPPCUSER__
- __INSTALLDIR__/bin/BackupPC_dump -v -f hostName
-
-This will run a full dump on hostName (replace with your host name).
-It will show each command (eg: ping, nmblookup and the full dump
-commands) and the output from each command. Reading the output
-carefully should show you what the problem is.
-
-You can also verify that nmblookup correctly returns the netbios name.
-This is essential for DHCP hosts, and depending upon the setting of
-$Conf{FixedIPNetBiosNameCheck} might also be required for fixed IP
-address hosts too. Run this command:
-
- nmblookup -A hostName
-
-Verify that the host name is printed. The output might look like:
-
- received 7 names
- DELLLS13 <00> - P <ACTIVE>
- DOMAINNAME <00> - <GROUP> P <ACTIVE>
- DELLLS13 <20> - P <ACTIVE>
- DOMAINNAME <1e> - <GROUP> P <ACTIVE>
- DELLLS13 <03> - P <ACTIVE>
- DELLLS13$ <03> - P <ACTIVE>
- CRAIG <03> - P <ACTIVE>
-
-The first name, converted to lower case, is used for the host name.
-
-=item Transport method doesn't work
-
-The BackupPC_dump command has a -v option, so the easiest way to
-debug backup problems on a specific host is to run BackupPC_dump
-manually as the BackupPC user:
-
- su __BACKUPPCUSER__
- __INSTALLDIR__/bin/BackupPC_dump -v -f hostName
-
-This will run a full dump on hostName (replace with your host name)
-and will print all the output from each command, including the log
-output.
-
-The most likely problems will relate to connecting to the smb shares on
-each host. On each failed backup, a file __TOPDIR__/pc/$host/XferLOG.bad.z
-will be created. This is the stderr output from the transport program.
-You can view this file via the CGI interface, or manually uncompress it
-with;
-
- __INSTALLDIR__/bin/BackupPC_zcat __TOPDIR__/pc/$host/XferLOG.bad.z | more
-
-The first line will show the full command that was run (eg: rsync, tar
-or smbclient). Based on the error messages you should figure out what
-is wrong. Possible errors on the server side are invalid host, invalid
-share name, bad username or password. Possible errors on the client
-side are misconfiguration of the share, username or password.
-
-You should try running the command manually to see what happens.
-For example, for smbclient you should it manually and verify that
-you can connect to the host in interactive mode, eg:
-
- smbclient '\\hostName\shareName' -U userName
-
-shareName should match the $Conf{SmbShareName} setting and userName
-should match the the $Conf{SmbShareUserName} setting.
-
-You will be prompted for the password. You should then see this prompt:
-
- smb: \>
-
-Verify that "ls" works and then type "quit" to exit.
-
-=back
-
-=head1 Restore functions