Backup & Recovery: Inexpensive Backup Solutions for Open Systems
5.3. Installation How-To
The BackupPC server runs on Unix or Linux under the Apache web server using mod_perl, which are not difficult requirements. The BackupPC server is not designed to run under Windows because Windows filesystems do not readily support Unix-style hard links. Prerequisites dictate how the backups are performed. Table 5-1 lists the high-level requirements and suggestions for tools that can meet the requirements.
The amount of disk space needed depends on the amount and type of the data to be backed up. The more diverse the data, the more disk space is needed. A RAID subsystem is not required, but it would be a good idea for performance, data protection and scalability reasons. The server doesn't need anything more than a 1.5 GHz processor with at least 512 MB of RAM. Since much of the backup computation is compression, more memory and a faster processor are needed for large numbers of clients. Of course, faster disk technologies and clean networks also improve performance. 5.3.1. Security Versus Ease of Use
As is often the case, there is a trade-off between ease of use and security. For a home installation, ease of setup is usually a higher priority than security. The opposite may be true for a division of a global company. The default configuration has the BackupPC service running as its own user on the server machine and using preshared ssh keys without passwords to connect to the clients as root, or SMB using a password in the case of Windows. This may not fit with local site security policies. Other options include setting up an rsync server on the client using stored passwords, or a two-step process of ssh to a low-privileged client account followed by sudo with a configuration that allows only rsync (or tar) to be executed. All of the BackupPC processes on the server run as one user ID. This user ID should have limited privileges on the system. The install process ensures the chosen user ID has the correct permissions on the data storage areas. If a new user ID is used, setting up the web interface requires a few extra steps. If the existing ID of the web server is used, there are fewer setup steps, but the system will be less secure. If you use a new user ID, create it before starting the install process. 5.3.2. Basic Sizing
The amount of space needed is highly dependent on the number and type of clients being backed up. The more homogeneous the clients, the more effective the disk pooling is, and the less disk you need. The more diverse the clients, the less effective the disk pooling is, and more space is needed. Additionally, if the data is relatively static, less space is needed for the incrementals. With a lot of data change, the incrementals are larger. The retention policy also affects storage requirements; more full backups and longer retention times naturally increase storage requirements.
To determine the amount of space needed for backups, add up the disk usage of each client, then multiply by the number of full backups configured. The resulting number is the amount of space required for the full backups (prior to pooling and compression). Next, estimate what percentage of data will change for each incremental. Multiply this by the total amount of data, then by the number of incrementals configured. Add this to the number for the full backups. Compression and disk pooling reduce storage requirements by a factor of six to eight, so divide the total by this factor. To provide headroom as client storage grows and as more clients are added, you might want to start with two to three times this amount of storage. For example, consider 100 laptops backing up user data that averages 4 GB per client, with each incremental averaging about 0.4 GB. Storing 3 weekly full backups takes around 1,200 GB, and 6 incremental backups takes another 240 GB for a total of 1,440 GB of raw data. Because of pooling and compression, approximately 180240 GB of storage are needed. To support growth of the user data or additional clients, 500 GB or greater capacity should be sufficient for current and future needs. Because BackupPC uses hard links to compactly store identical files, the entire data store must be on a single filesystem. Using a RAID array or LVM setup allows this filesystem to be expanded over time as needed. 5.3.3. Installing BackupPC
Once the server is identified, and the prerequisites are installed and verified to work, it is time to get down to business. Head over to http://backuppc.sourceforce.net/, and download the latest tar ball. Do not use the beta unless there is a specific need for it. If there is a patch file, download it as well. Move the tar ball into a working directory and unpack it. Change the directory to the newly created directory. If you have a patch file to apply, do that now: $ patch -p0 < [path to patchfile]
Something went wrong if you see an error message like Hunk #1 FAILED at 58, and you should verify that the patch-file version matches the distribution you downloaded. If you are still unsuccessful, search or contact the mailing list for help (see the section "The BackupPC Community" at the end of this chapter for details). The next logical step is to read the README file for any details that may have changed for this release. In addition, there is up-to-date and complete documentation in the doc/ subdirectory. Read through the BackupPC.html file, and note the specific requirements listed in the installation section. Generally, a few Perl modules need to be installed depending on how the system is configured. Now, run the following command as root: # perl ./configure.pl
This process inspects the system and asks for some installation information:
At this point, most of the questions should be answered. The script asks whether you want to continue before actually modifying the system. Answering y here allows the script to create the necessary directory structure and installs the scripts to run. As with any install script, watch the output for any errors. Several init scripts are updated with settings based on the configuration responses but are not automatically installed. These scripts are located in the init.d subdirectory where the configure script was run. Copy the correct one into the correct location for starting the service on boot. Note that starting in version 3.0 of BackupPC, the configure.pl script complies with the Filesystem Hierarchy Standard (FHS). One change is that all the configuration files are by default stored below /etc rather than below the data store. As described earlier, any of the default locations can be changed when running the configure script. If you are upgrading for the first time to version 3.0 or later, the configure.pl script continues to use the original locations for the data store, configuration files, and program executables. 5.3.3.1. Installation packages
An alternative to the manual installation procedure described here is to find and install a BackupPC package specific to your operating system. Packages exist for Debian, Ubuntu, Gentoo, and others. For example, BackupPC can be installed on Debian with: # apt-get install backuppc |
Категории