- querying myhost on 10.10.255.255
- name_query failed to find name myhost
-
-If this success you will see output like:
-
- querying myhost on 10.10.255.255
- 10.10.1.73 myhost<00>
-
-Depending on your netmask you might need to specify the -B option to
-nmblookup. For example:
-
- nmblookup -B 10.10.1.255 myhost
-
-If necessary, experiment on the nmblookup command that will return the
-IP address of the client given its name. Then update
-$Conf{NmbLookupFindHostCmd} with any necessary options to nmblookup.
-
-=back
-
-For hosts that have the DHCP flag set to 1, these machines are
-discovered as follows:
-
-=over 4
-
-=item *
-
-A DHCP address pool ($Conf{DHCPAddressRanges}) needs to be specified.
-BackupPC will check the NetBIOS name of each machine in the range using
-a command of the form:
-
- nmblookup -A W.X.Y.Z
-
-where W.X.Y.Z is each candidate address from $Conf{DHCPAddressRanges}.
-Any host that has a valid NetBIOS name returned by this command (ie:
-matching an entry in the hosts file) will be backed up. You can
-modify the specific nmblookup command if necessary via $Conf{NmbLookupCmd}.
-
-=item *
-
-You only need to use this DHCP feature if your client machine doesn't
-respond to the NetBios multicast request:
-
- nmblookup myHost
-
-but does respond to a request directed to its IP address:
-
- nmblookup -A W.X.Y.Z
-
-=back
-
-=head2 Other installation topics
-
-=over 4
-
-=item Removing a client
-
-If there is a machine that no longer needs to be backed up (eg: a retired
-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:
-
-=over 4
-
-=item -1
-
-Don't do any regular backups on this machine. Manually
-requested backups (via the CGI interface) will still occur.
-
-=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
-and restorable.
-
-To completely remove a client and all its backups, you should remove its
-entry in the conf/hosts file, and then delete the __TOPDIR__/pc/$host
-directory. Whenever you change the hosts file, you should send
-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.
-
-=item Copying the pool
-
-If the pool disk requirements grow you might need to copy the entire
-data directory to a new (bigger) file system. Hopefully you are lucky
-enough to avoid this by having the data directory on a RAID file system
-or LVM that allows the capacity to be grown in place by adding disks.
-
-The backup data directories contain large numbers of hardlinks. If
-you try to copy the pool the target directory will occupy a lot more
-space if the hardlinks aren't re-established.
-
-The GNU cp program with the -a option is aware of hardlinks and knows
-to re-establish them. So GNU cp -a is the recommended way to copy
-the data directory and pool. Don't forget to stop BackupPC while
-the copy runs.
-
-=item Compressing an existing pool
-
-If you are upgrading BackupPC and want to turn compression on you have
-two choices:
-
-=over 4
-
-=item *
-
-Simply turn on compression. All new backups will be compressed. Both old
-(uncompressed) and new (compressed) backups can be browsed and viewed.
-Eventually, the old backups will expire and all the pool data will be
-compressed. However, until the old backups expire, this approach could
-require 60% or more additional pool storage space to store both
-uncompressed and compressed versions of the backup files.
-
-=item *
-
-Convert all the uncompressed pool files and backups to compressed.
-The script __INSTALLDIR__/bin/BackupPC_compressPool does this.
-BackupPC must not be running when you run BackupPC_compressPool.
-Also, there must be no existing compressed backups when you
-run BackupPC_compressPool.
-
-BackupPC_compressPool compresses all the files in the uncompressed pool
-(__TOPDIR__/pool) and moves them to the compressed pool
-(__TOPDIR__/cpool). It rewrites the files in place, so that the
-existing hardlinks are not disturbed.
-
-=back
-
-The rest of this section discusses how to run BackupPC_compressPool.
-
-BackupPC_compressPool takes three command line options:
-
-=over 4
-
-=item -t
-
-Test mode: do everything except actually replace the pool files.
-Useful for estimating total run time without making any real
-changes.
-
-=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