This siteAll blogsLe 17ClémentCCBCuisineLe 3ContactSe connecterS'inscrire
  • All blogs
  • Le 17
  • Clément
  • CCB
  • Cuisine
  • Le 3
  • Contact

  • S'inscrire

Recettes informatiques

  • Page de garde
  • Contact
  • Se connecter
  • « DKIM and SPF
  • Minimal BC for Mingw »

Migration from BackupPC 3 (Debian package) to BackupPC 4 (Standalone Installation)

Posted by mazet on Feb 26 2018 in Systeme, Debian


As Debian v9 does not provide anymore packages for BackupPC, I describes in this post how to migrate a BackupPC v3 (BPC3) installed from Debian packages (Debian v8) to a BackupPC v4 (BPC4) from tarball and to respect most of the Debian file hierarchy.


Define directories to store BackupPC files and configuration files

Shell

ROOT=/usr/local/share/backuppc4
ETC=/etc/backuppc4
LOG=/var/log/backuppc4
RUN=/var/run/backuppc4


Copy configurations files from BPC3 before migration

Shell

cp -r /etc/backuppc $ETC
chown backuppc:backuppc -R $ETC


Stop old BPC service

Shell

service backuppc stop


Install BPC 4 files

Shell

perl ./configure.pl --batch \
        --install-dir $ROOT \
        --cgi-dir     $ROOT/cgi-bin \
        --html-dir    $ROOT/image \
        --data-dir /var/lib/backuppc/ \
        --hostname $(hostname) \
        --html-dir-url /backuppc4/image


Modifiy service to access correct configuration file directory

Shell

sed -e "s,/etc/BackupPC,$ETC," \
    -e "s/var/log/BackupPC/,$LOG," \
    -e "s/var/run/BackupPC/,$RUN," $ROOT/lib/BackupPC/Lib.pm


Create web files

Shell

mkdir $ROOT/www/
{ cd $ROOT/www/; ln -s ../image .; }
cat > $ROOT/www/index.cgi <<EOF
#!/bin/sh
sudo -u backuppc -E -- $ROOT/cgi-bin/BackupPC_Admin
EOF
chmod a+x $ROOT/www/index.cgi


Give access to CGI file

Shell

cat > /etc/sudoers.d/backuppc4 <<EOF
# User privilege specification
www-data        ALL=(backuppc) NOPASSWD: SETENV: $ROOT/cgi-bin/BackupPC_Admin
EOF
chmog u-s $ROOT/cgi-bin/BackupPC_Admin


Create Apache configuration file

Shell

cat > $ETC/apache.conf <<EOF
Alias /backuppc4 $ROOT/www
 
<Directory $ROOT/www>
        Options ExecCGI FollowSymlinks
        AddHandler cgi-script .cgi
        DirectoryIndex index.cgi
 
        AuthType Basic
        AuthUserFile $ETC/htpasswd
        AuthGroupFile $ETC/htgroup
        AuthName "BackupPC Administrative Interface"
        require valid-user
</Directory>
EOF


Create standard directories to run BPC4

Shell

mkdir $LOG; chown backuppc:backuppc $LOG
mkdir $RUN; chown backuppc:backuppc $RUN


Add Systemd service

Shell

cp systemd/backuppc.service /etc/systemd/system/backuppc4.service
sed -e "s,/var/run/BackupPC/,$RUN," /etc/systemd/system/backuppc4.service
systemctl daemon-reload
systemctl enable backuppc4.service
systemctl start backuppc4.service
This entry was posted by mazet and filed under Systeme, Debian.

No feedback yet

Catégories

  • Toutes
  • Non catégorisé
  • Programmation
    • Awk
    • Bash
    • C
    • C++
    • Javascript
    • LaTeX
    • Perl
    • Tcl/Tk
  • Systeme
    • Android
    • Debian
    • Ubuntu

Contenu

  • Linux Router
  • Creating a network between 2 virtual machines on Windows with Qemu
  • Build a Debian package for pdmenu
  • Extract informations from epub file
  • Connexion PostgreSql / Java par Socket Unix
  • Example of fork and respawn
  • Start SSH daemon on Git portable distribution
  • Create a git mirror
  • Color diff
  • Create on Debian a Minecraft server
  • GIT/HG/SVN on multiple repos simultaneously
  • Convert Comics into CBZ format
  • Random password generator function
  • Convert to camelCase
  • DKIM and SPF
  • Migration from BackupPC 3 (Debian package) to BackupPC 4 (Standalone Installation)
  • Minimal BC for Mingw
  • Diskless Debian cluster
  • Colorize log file
  • Generate certificates with (or without) a certificate authority
Juillet 2025
Lun Mar Mer Jeu Ven Sam Dim
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
 << <   > >>
  • Accueil
  • Récemment
  • Archives
  • Catégories
  • Derniers commentaires

Rechercher

Flux XML

  • RSS 2.0: Posts
  • Atom: Posts
What is RSS?

©2025 by Laurent Mazet • Contact • Aide • Run your own website!

b2evolution CCMS

Cookies are required to enable core site functionality.