This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
backuppc [2014/11/24 01:52] ben |
backuppc [2014/11/24 02:02] (current) ben |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Installation ===== | ===== Installation ===== | ||
* Download the installation package from [[http:// | * Download the installation package from [[http:// | ||
- | * Install Perl if it isn't already: | + | * Install Perl if it isn't already: |
- | sudo apt-get install perl | + | sudo apt-get install perl |
- | * If you want BackupPC to be able to compress the backups (probably a good idea, unless you have lots of hard disk space and CPU time is scarce), run: | + | </ |
- | | + | * If you want BackupPC to be able to compress the backups (probably a good idea, unless you have lots of hard disk space and CPU time is scarce), run: < |
- | :then from < | + | cpan |
- | | + | </ |
- | :and then exit < | + | * then from '' |
- | * If you want web access to BackupPC (again, a good idea) you'll need to install Apache2 and < | + | install Compress:: |
- | sudo apt-get install apache2 libapache2-mod-perl2 | + | </ |
- | * Enable | + | * and then exit '' |
- | sudo a2enmod suexec | + | * If you want web access to BackupPC (again, a good idea) you'll need to install Apache2 and '' |
- | * Extract the .tar.gz file: | + | sudo apt-get install apache2 libapache2-mod-perl2 |
- | tar -xzf BackupPC-3.1.0.tar.gz | + | </code> |
- | * Change into the newly-created directory: | + | * Enable '' |
- | cd BackupPC-3.1.0 | + | sudo a2enmod suexec |
- | * Create a symlink at **/ | + | </ |
- | sudo ln / | + | * Extract the .tar.gz file: <code bash> |
- | * Run the configuration script | + | tar -xzf BackupPC-3.1.0.tar.gz |
- | sudo ./ | + | </ |
+ | * Change into the newly-created directory: | ||
+ | cd BackupPC-3.1.0 | ||
+ | </ | ||
+ | * Create a symlink at **/ | ||
+ | sudo ln / | ||
+ | </ | ||
+ | * Run the configuration script: <code bash> | ||
+ | sudo ./ | ||
+ | </ | ||
* Follow the instructions, | * Follow the instructions, | ||
- | * Modify the BackupPC configuration file: | + | * Modify the BackupPC configuration file: <code bash> |
- | vi / | + | vi / |
- | * Modify the list of hosts to back up: | + | </ |
- | vi / | + | * Modify the list of hosts to back up: <code bash> |
- | * Rename the script it placed in your **cgi-bin** directory to give it a **.cgi** extension: | + | vi / |
- | mv / | + | </ |
- | * SuExec can only work per-virtual host, so create a new virtual host for BackupPC specifically: | + | * Rename the script it placed in your **cgi-bin** directory to give it a **.cgi** extension: |
- | sudo cp / | + | mv / |
- | * Enable that site: | + | </ |
- | sudo a2ensite backuppc | + | * SuExec can only work per-virtual host, so create a new virtual host for BackupPC specifically: |
+ | sudo cp / | ||
+ | </ | ||
+ | * Enable that site: <code bash> | ||
+ | sudo a2ensite backuppc | ||
+ | </ | ||
* Modify the new site to tell Apache to listen on a new port (e.g. 8085), that this virtual host will be on that port, to deny access to everything in **/ | * Modify the new site to tell Apache to listen on a new port (e.g. 8085), that this virtual host will be on that port, to deny access to everything in **/ | ||
- | | + | <code apache> |
- | | + | |
- | < | + | NameVirtualHost *:8085 |
- | | + | < |
- | | + | SuexecUserGroup backuppc backuppc |
- | + | DocumentRoot /var/www/ | |
- | | + | |
- | | + | #Also prevent access to our .htpasswd file |
- | | + | <Files ~ " |
- | | + | Order allow, |
- | | + | Deny from all |
- | | + | </ |
- | | + | < |
- | | + | Options Indexes FollowSymLinks MultiViews |
- | | + | AllowOverride None |
- | | + | Order allow, |
- | | + | Deny from all |
- | | + | </ |
- | | + | < |
- | | + | Order allow, |
- | | + | Allow from all |
- | | + | </ |
- | | + | < |
- | | + | AddHandler cgi-script .cgi .pl |
- | | + | Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch |
- | | + | Order allow, |
- | + | Allow from all | |
- | | + | |
- | | + | AuthType Basic |
- | | + | AuthName " |
- | | + | AuthUserFile / |
- | | + | Require valid-user |
- | + | </ | |
- | | + | |
- | | + | ErrorLog / |
- | | + | LogLevel warn |
- | | + | CustomLog / |
- | </ | + | ServerSignature On |
- | * Additionally, | + | </ |
- | | + | </code> |
- | :then you can just go to http://// | + | * Additionally, |
- | * Save that file and reload Apache: | + | ErrorDocument 403 / |
- | sudo / | + | </ |
- | * Create a password file that matches the above Apache configuration. | + | * then you can just go to '' |
- | | + | * Save that file and reload Apache: |
- | * Add any required extra users to that password file so that every user mentioned in the BackupPC hosts configuration file can log in: | + | sudo / |
- | | + | </ |
- | * Copy the **init.d** script from BackupPC' | + | * Create a password file that matches the above Apache configuration. |
- | sudo cp ~/ | + | htpasswd -c / |
- | * Tell BackupPC to start on boot: | + | </code> |
- | sudo update-rc.d backuppc defaults | + | * Add any required extra users to that password file so that every user mentioned in the BackupPC hosts configuration file can log in: <code bash> |
- | * Set the permissions of the BackupPC | + | htpasswd / |
- | sudo chmod 755 / | + | </code> |
- | * Ensure that the permissions on the BackupPC directories are correct: | + | * Copy the **init.d** script from BackupPC' |
- | sudo chown -R backuppc: | + | sudo cp ~/ |
- | sudo find /data -type d -exec chmod 750 {} \; | + | </ |
- | * Start BackupPC: | + | * Tell BackupPC to start on boot: <code bash> |
- | sudo / | + | sudo update-rc.d backuppc defaults |
- | * Browse to http://// | + | </ |
+ | * Set the permissions of the BackupPC | ||
+ | sudo chmod 755 / | ||
+ | </ | ||
+ | * Ensure that the permissions on the BackupPC directories are correct: | ||
+ | sudo chown -R backuppc: | ||
+ | sudo find /data -type d -exec chmod 750 {} \; | ||
+ | </ | ||
+ | * Start BackupPC: | ||
+ | sudo / | ||
+ | </ | ||
+ | * Browse to '' | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== |