Differences
This shows you the differences between the selected revision and the current version of the page.
| howto:backuppc 2008/09/19 21:13 | howto:backuppc 2017/12/04 19:29 current | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== HOWTO Install BackupPC ====== | ====== HOWTO Install BackupPC ====== | ||
| - | [[http://backuppc.sourceforge.net/info.html|BackupPC]] is a high-performance, enterprise-grade system for backing up Linux and WinXX PCs and laptops to a server's disk. BackupPC is highly configurable and easy to install and maintain. It runs quite well on the DNS-323. The accompanying forum thread is located [[http://forum.dsmg600.info/t2264-BackupPC-DNS-323-running-working.html|here]]. | + | [[http://backuppc.sourceforge.net/info.html|BackupPC]] is a high-performance, enterprise-grade system for backing up Linux and WinXX PCs and laptops to a server's disk. BackupPC is highly configurable and easy to install and maintain. It runs quite well on the DNS-323. The accompanying forum thread is located [[http://forum.dsmg600.info/t2264-BackupPC-DNS-323-running-working.html|here]]. \\ For a Wikipedia description click [[http://en.wikipedia.org/wiki/Backuppc|here]]. |
| + | |||
| ===== Requirements ===== | ===== Requirements ===== | ||
| Line 22: | Line 24: | ||
| cd /mnt/HD_a2 | cd /mnt/HD_a2 | ||
| rsync -av inreto.de::dns323/fun-plug/0.5/packages . | rsync -av inreto.de::dns323/fun-plug/0.5/packages . | ||
| + | rsync -av inreto.de::dns323/fun-plug/0.5/extra-packages/All/perl* . | ||
| cd packages | cd packages | ||
| funpkg -i *.tgz | funpkg -i *.tgz | ||
| Line 28: | Line 31: | ||
| + | ===== Create backuppc user ===== | ||
| + | Create user and homedirectory | ||
| + | |||
| + | useradd -m backuppc | ||
| + | |||
| + | To not lose user by reboot - store password permanently | ||
| + | |||
| + | store-passwd.sh | ||
| Line 58: | Line 69: | ||
| IO::Uncompress::Gunzip | IO::Uncompress::Gunzip | ||
| - | I don't think this is difficult, just time consuming. | + | I don't think this is difficult, just time consuming. However, if you're lazy and trust the perl automatic installer, you can run: |
| + | |||
| + | for N in Compress::Raw::Zlib IO::Compress::Base IO::Compress::Base::Common IO::Compress::Gzip IO::Compress::Gzip::Constants IO::Uncompress::Base IO::Uncompress::Gunzip | ||
| + | do perl -MCPAN -e "install $N" | ||
| + | done | ||
| Line 81: | Line 96: | ||
| Are these paths correct? [y]? y | Are these paths correct? [y]? y | ||
| BackupPC will run on host [...]? your HOSTNAME here (it's probably already the default answer) | BackupPC will run on host [...]? your HOSTNAME here (it's probably already the default answer) | ||
| - | BackupPC should run as user [backuppc]? root (it's better to create a limited user named backuppc) | + | BackupPC should run as user [backuppc]? |
| Install directory (full path) [...]? /ffp/usr/BackupPC | Install directory (full path) [...]? /ffp/usr/BackupPC | ||
| Data directory (full path) []? /ffp/backuppcdata | Data directory (full path) []? /ffp/backuppcdata | ||
| Line 112: | Line 127: | ||
| Another option is to create a startup script and put it in the /mnt/HD_a2/ffp/start/ directory | Another option is to create a startup script and put it in the /mnt/HD_a2/ffp/start/ directory | ||
| + | |||
| + | The script below works for me, if you use it you should of course NOT add the 2 lines mentioned above to the end of the fun_plug | ||
| + | |||
| + | #!/bin/sh | ||
| + | |||
| + | # PROVIDE: backuppc | ||
| + | # REQUIRE: DAEMON | ||
| + | # BEFORE: LOGIN | ||
| + | # KEYWORD: shutdown | ||
| + | |||
| + | . /ffp/etc/ffp.subr | ||
| + | |||
| + | name="backuppc" | ||
| + | start_cmd="backuppc_start" | ||
| + | restart_cmd="backuppc_restart" | ||
| + | stop_cmd="backuppc_stop" | ||
| + | status_cmd="backuppc_status" | ||
| + | |||
| + | backuppc_start() | ||
| + | { | ||
| + | ln -s /mnt/HD_a2/ffp/etc/BackupPC /etc/ | ||
| + | # If you run BackupPC under user root you don't need these commented lines, | ||
| + | # otherwise you're smart enough to figure out why I have them in my config ;-) | ||
| + | # ln -s /mnt/HD_a2/ffp/var/log/BackupPC /var/log/ | ||
| + | # su - backuppc -s /bin/sh -c '/mnt/HD_a2/ffp/usr/BackupPC/bin/BackupPC -d' | ||
| + | /mnt/HD_a2/ffp/usr/BackupPC/bin/BackupPC -d | ||
| + | echo "${name} started" | ||
| + | } | ||
| + | |||
| + | backuppc_restart() | ||
| + | { | ||
| + | backuppc_stop | ||
| + | sleep 1 | ||
| + | backuppc_start | ||
| + | } | ||
| + | |||
| + | backuppc_stop() | ||
| + | { | ||
| + | /ffp/bin/pkill -f "/mnt/HD_a2/ffp/usr/BackupPC/bin/BackupPC -d" | ||
| + | echo "${name} stopped" | ||
| + | } | ||
| + | |||
| + | backuppc_status() | ||
| + | { | ||
| + | if [ "`ps ax | grep "BackupPC -d" | grep perl`" = "" ] ; then | ||
| + | echo "${name} not running" | ||
| + | else | ||
| + | echo "${name} running" | ||
| + | fi | ||
| + | } | ||
| + | |||
| + | |||
| + | extra_commands="status" | ||
| + | run_rc_command "$1" | ||
| + | |||
| + | |||
| The last thing we need to do is fix the BackupPC_Admin cgi script to work with lighttpd. This change isn't exactly necessary if your web server is properly configured, but I found this to be simple enough: | The last thing we need to do is fix the BackupPC_Admin cgi script to work with lighttpd. This change isn't exactly necessary if your web server is properly configured, but I found this to be simple enough: | ||
| Line 257: | Line 328: | ||
| Now you're ready to add more computers to be backed up to the server and edit your settings to your liking. | Now you're ready to add more computers to be backed up to the server and edit your settings to your liking. | ||
| + | |||
| + | |||
| + | |||
| ===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
| - | "unknown host" error when starting a backup | + | == "unknown host" error when starting a backup == |
| + | |||
| This can happen if you have added a host to conf/hosts but forgotten to reload the config file. | This can happen if you have added a host to conf/hosts but forgotten to reload the config file. | ||
| Line 269: | Line 344: | ||
| And to make this work on startup add to the end of your fun_plug file: | And to make this work on startup add to the end of your fun_plug file: | ||
| echo "192.168.xxx.xxx computer1 computer1" >> /etc/hosts | echo "192.168.xxx.xxx computer1 computer1" >> /etc/hosts | ||
| + | |||
| + | |||
| + | Edited by PetoZ 4.1.2010. | ||
| + | |||
| + | == backup aborted (inet connect: Connection timed out) == | ||
| + | |||
| + | Connection is blocked on firewall or rsyncd on client computer is not running. | ||
| + | |||
| + | |||
| + | == restore failed (Unable to read 4 bytes) == | ||
| + | |||
| + | To fix this change read only = false in c:/rsyncd/rsyncd.conf file on your client computer. | ||
| + | I tested it and it works on Windows XP Home and Professional. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||