{"id":17278,"date":"2023-06-16T20:07:51","date_gmt":"2023-06-16T17:07:51","guid":{"rendered":"https:\/\/kifarunix.com\/?p=17278"},"modified":"2024-03-10T09:50:43","modified_gmt":"2024-03-10T06:50:43","slug":"how-to-install-backuppc-on-debian-12","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-backuppc-on-debian-12\/","title":{"rendered":"How to Install BackupPC on Debian 12"},"content":{"rendered":"\n<p>In this guide, we will learn how to install BackupPC on Debian 12.&nbsp;<a href=\"https:\/\/backuppc.github.io\/backuppc\/\" target=\"_blank\" rel=\"noreferrer noopener\">BackupPC<\/a>&nbsp;is a free, high-performance enterprise-grade backup software suite with a web-based frontend that can be used for backing up Linux, Windows and mac OSXs PCs and laptops to a server\u2019s disk.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-backup-pc-on-debian-12\">Installing BackupPC on Debian 12<\/a><ul><li><a href=\"#what-features-does-backup-pc-offer\">What features does BackupPC offer?<\/a><\/li><li><a href=\"#install-backup-pc-server\">Install BackupPC Server<\/a><\/li><li><a href=\"#configuring-backup-pc-server-on-debian-12\">Configuring BackupPC Server on Debian 12<\/a><ul><li><a href=\"#define-backup-pc-backup-protocol\">Define BackupPC Backup Protocol<\/a><\/li><li><a href=\"#define-backup-pc-backup-user\">Define BackupPC Backup User<\/a><\/li><li><a href=\"#configure-backup-pc-apache-authentication\">Configure BackupPC Apache Authentication<\/a><\/li><li><a href=\"#open-apache-http-server-on-firewall\">Open Apache HTTP Server on Firewall<\/a><\/li><li><a href=\"#accessing-backup-pc-web-interface\">Accessing BackupPC Web Interface<\/a><\/li><li><a href=\"#generate-backup-user-ssh-keys\">Generate Backup User SSH Keys<\/a><\/li><li><a href=\"#create-backup-user-account-on-clients\">Create Backup User Account On Clients<\/a><\/li><li><a href=\"#copy-backup-pc-server-ssh-keys-to-backup-clients\">Copy BackupPC Server SSH Keys to Backup Clients<\/a><\/li><li><a href=\"#allow-backup-user-to-run-rsync-with-passwordless-sudo\">Allow Backup User to Run Rsync with Passwordless Sudo<\/a><\/li><li><a href=\"#secure-backup-pc-login-on-the-backup-client\">Secure BackupPC Login on the Backup Client<\/a><\/li><\/ul><\/li><li><a href=\"#accessing-backup-pc-web-user-interface\">Accessing BackupPC Web User Interface<\/a><\/li><li><a href=\"#backup-hosts-using-backup-pc\">Backup Hosts using BackupPC<\/a><\/li><li><a href=\"#update-global-backup-pc-server-configurations\">Update Global BackupPC Server Configurations<\/a><\/li><li><a href=\"#related-tutorials\">Related Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-backup-pc-on-debian-12\">Installing BackupPC on Debian 12<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-features-does-backup-pc-offer\">What features does BackupPC offer?<\/h3>\n\n\n\n<p>BackupPC features:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Clever pooling scheme minimizes disk storage and disk I\/O. Identical files across multiple backups of the same or different PC are stored only once resulting in substantial savings in disk storage and disk writes. Also known as &#8220;data deduplication&#8221;.<\/li>\n\n\n\n<li>Optional compression provides additional reductions in storage. CPU impact of compression is low since only new files (those not already in the pool) need to be compressed.<\/li>\n\n\n\n<li>A powerful http\/cgi user interface allows administrators to view log files, configuration, current status and allows users to initiate and cancel backups and browse and restore files from backups very quickly.<\/li>\n\n\n\n<li>No client-side software is needed. On WinXX the smb protocol is used. On Linux or Unix clients, rsync or tar (over ssh\/rsh\/nfs) can be used<\/li>\n\n\n\n<li>Flexible restore options. Single files can be downloaded from any backup directly from the CGI interface. Zip or Tar archives for selected files or directories can also be downloaded from the CGI interface.<\/li>\n\n\n\n<li>BackupPC supports mobile environments where laptops are only intermittently connected to the network and have dynamic IP addresses (DHCP).<\/li>\n\n\n\n<li>Flexible configuration parameters allow multiple backups to be performed in parallel.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-backup-pc-server\">Install BackupPC Server<\/h3>\n\n\n\n<p>Update and upgrade your system packages.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt update<\/pre>\n\n\n\n<p>Once the system update is done, proceed to install BackupPC.<\/p>\n\n\n\n<p>BackupPC is usually available on the default APT repositories (Check <a href=\"https:\/\/github.com\/backuppc\/backuppc\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">releases<\/a> to compare with the version available on repos.):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-cache policy backuppc<\/code><\/pre>\n\n\n\n<pre class=\"scroll-sz\"><code>\nbackuppc:\n  Installed: (none)\n  Candidate: 4.4.0-8\n  Version table:\n     4.4.0-8 500\n        500 http:\/\/deb.debian.org\/debian bookworm\/main amd64 Packages\n<\/code><\/pre>\n\n\n\n<p>As of this writing, BackupPC 4.4.0 is the current release. The above confirms that the default Debian 12 repos provide the latest BackupPC packages.<\/p>\n\n\n\n<p>Hence, BackupPC can be installed using the package,&nbsp;<code>backuppc<\/code> by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt install -y backuppc<\/pre>\n\n\n\n<p>During the installation, you will be prompted to choose the web server to be used by BackupPC. Apache web server is used in this guide.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1337\" height=\"331\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backuppc-web-server.png\" alt=\"Install BackupPC on Debian 12\" class=\"wp-image-10383\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backuppc-web-server.png?v=1631299727 1337w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backuppc-web-server-768x190.png?v=1631299727 768w\" sizes=\"(max-width: 1337px) 100vw, 1337px\" \/><\/figure>\n\n\n\n<p>A default BackupPC administrative user,&nbsp;<code>backuppc<\/code>, and its password is also created during the installation. This user is used to administer various tasks such as access to BackupPC web dashboard, carry out backups etc.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1887\" height=\"439\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-admin-credentials.png\" alt=\"Install BackupPC on Debian 12\" class=\"wp-image-17289\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-admin-credentials.png?v=1686890742 1887w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-admin-credentials-768x179.png?v=1686890742 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-admin-credentials-1536x357.png?v=1686890742 1536w\" sizes=\"(max-width: 1887px) 100vw, 1887px\" \/><\/figure>\n\n\n\n<p>You can choose to copy the password provided or you can proceed and reset the password later by executing the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">htpasswd \/etc\/backuppc\/htpasswd backuppc<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configuring-backup-pc-server-on-debian-12\">Configuring BackupPC Server on Debian 12<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"define-backup-pc-backup-protocol\">Define BackupPC Backup Protocol<\/h4>\n\n\n\n<p>BackupPC uses different protocols to get backup data from devices being backed up:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>smb<\/strong>&nbsp;\u2013 used for backing up windows machines<\/li>\n\n\n\n<li><strong>tar<\/strong>&nbsp;\u2013 used for backing up Linux\/Unix\/MacOSX systems<\/li>\n\n\n\n<li><strong>rsync<\/strong>&nbsp;\u2013 used for backing up Linux\/Unix\/MacOSX systems. This can also be used to backup Windows systems.<\/li>\n<\/ul>\n\n\n\n<p>In this tutorial we are going to configure BackupPC to use the <strong>rsync<\/strong> protocol as a backup method.<\/p>\n\n\n\n<p>Thus, change the line;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$Conf{XferMethod} = 'smb';<\/code><\/pre>\n\n\n\n<p>To;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$Conf{XferMethod} = 'rsync';<\/code><\/pre>\n\n\n\n<p>Using the command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i '\/$Conf{XferMethod} =\/s\/smb\/rsync\/' \/etc\/backuppc\/config.pl<\/code><\/pre>\n\n\n\n<p>This is customizable per client system being backed up as well.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"define-backup-pc-backup-user\">Define BackupPC Backup User<\/h4>\n\n\n\n<p>Also, by default, BackupPC is using root user to run backup tasks. However, in this guide, we are going to use a&nbsp;<code>backuppc<\/code>&nbsp;user to execute backup tasks.<\/p>\n\n\n\n<p><strong><code>backuppc<\/code><\/strong> user is created automatically during installation of BackupPC.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>id backuppc<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>uid=117(backuppc) gid=125(backuppc) groups=125(backuppc)<\/code><\/pre>\n\n\n\n<p>If you happen to change the backup user, edit BackupPC configuration file,&nbsp;<code>\/etc\/backuppc\/config.pl<\/code>&nbsp;and replace the&nbsp;<strong>root<\/strong>&nbsp;user with a user you are using for backup under the&nbsp;<strong>Rsync\/Rsyncd Configuration.<\/strong> <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed '\/RsyncSshArgs\/s\/-l root\/-l backuppc\/' \/etc\/backuppc\/config.pl<\/code><\/pre>\n\n\n\n<p>The line should look like;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$Conf{RsyncSshArgs} = &#91;'-e', '$sshPath -l backuppc'];<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"configure-backup-pc-apache-authentication\">Configure BackupPC Apache Authentication<\/h4>\n\n\n\n<p>BackupPC uses htpasswd user files to restrict access to web interface. <\/p>\n\n\n\n<p>As such, you require a valid user in order to authenticate.<\/p>\n\n\n\n<p>The Web authentication user and its hashed credential password is stored under the&nbsp;<code>\/etc\/backuppc\/htpasswd<\/code>.<\/p>\n\n\n\n<p>The password is generated during the installation. If you want, you can reset the password by running;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>htpasswd \/etc\/backuppc\/htpasswd backuppc<\/code><\/pre>\n\n\n\n<p>Allow external access to BackupPC, which is set to only allow connections from localhost by default.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i 's\/local\/all granted\/' \/etc\/backuppc\/apache.conf<\/code><\/pre>\n\n\n\n<p>This is how the BackupPC Apache config file looks like without comment lines;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/backuppc\/apache.conf<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\nAlias \/backuppc \/usr\/share\/backuppc\/cgi-bin\/\n\n&lt;Directory \/usr\/share\/backuppc\/cgi-bin\/>\n\tAllowOverride None\n\n        # Uncomment the line below to ensure that nobody can sniff important\n        # info from network traffic during editing of the BackupPC config or\n        # when browsing\/restoring backups.\n        # Requires that you have your webserver set up for SSL (https) access.\n        #SSLRequireSSL\n\t\t\t\t\t\n\tOptions ExecCGI FollowSymlinks\n\tAddHandler cgi-script .cgi\n\tDirectoryIndex index.cgi\n\n        AuthUserFile \/etc\/backuppc\/htpasswd\n\tAuthType basic\n\tAuthName \"BackupPC admin\"\n\n        &lt;RequireAll>\n\t\t# Comment out this line once you have setup HTTPS and uncommented SSLRequireSSL\n\t\tRequire all granted\n\n\t\t# This line ensures that only authenticated users may access your backups\n\t\tRequire valid-user\n\t&lt;\/RequireAll>\n&lt;\/Directory>\n<\/code><\/pre>\n\n\n\n<p>Next, restart both backuppc and Apache service to apply the changes made above.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl restart backuppc apache2<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"open-apache-http-server-on-firewall\">Open Apache HTTP Server on Firewall<\/h4>\n\n\n\n<p>If UFW is running, allow external access to Apache.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ufw allow \"WWW Full\"<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"accessing-backup-pc-web-interface\">Accessing BackupPC Web Interface<\/h4>\n\n\n\n<p>You should now be able to access you via your server IP or resolvable domain name.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;IP-or-domain\/backuppc<\/code><\/pre>\n\n\n\n<p>You will be prompted to authenticate. Use the basic auth credentials created above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1907\" height=\"705\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-web-ui.png\" alt=\"Install BackupPC on Debian 12\" class=\"wp-image-17290\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-web-ui.png?v=1686891757 1907w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-web-ui-768x284.png?v=1686891757 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-web-ui-1536x568.png?v=1686891757 1536w\" sizes=\"(max-width: 1907px) 100vw, 1907px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"generate-backup-user-ssh-keys\">Generate Backup User SSH Keys<\/h4>\n\n\n\n<p>For rsync to work, BackupPC requires passwordless SSH login for&nbsp;<strong>backuppc<\/strong>&nbsp;user to every client it will be getting backup data from.<\/p>\n\n\n\n<p>This also means that you should create a dedicated <code>backuppc<\/code> user on the hosts you need to backup, at least using the rsync protocol.<\/p>\n\n\n\n<p>As a result, switch to backuppc user on BackupPC server and generate passwordless ssh keys and copy them to every host you want to backup.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>usermod -s \/bin\/bash backuppc<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">su - backuppc<\/pre>\n\n\n\n<p>This will opens up the sh shell. You can run bash command to launch bash shell.<\/p>\n\n\n\n<p>Generate SSH key pair by running the following command;<\/p>\n\n\n\n<pre id=\"block-091a8dec-81b9-46a2-8c2b-7880177325dc\" class=\"wp-block-code\"><code>ssh-keygen<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\nGenerating public\/private rsa key pair.\nEnter file in which to save the key (\/var\/lib\/backuppc\/.ssh\/id_rsa): \nCreated directory '\/var\/lib\/backuppc\/.ssh'.\nEnter passphrase (empty for no passphrase): \nEnter same passphrase again: \nYour identification has been saved in \/var\/lib\/backuppc\/.ssh\/id_rsa\nYour public key has been saved in \/var\/lib\/backuppc\/.ssh\/id_rsa.pub\nThe key fingerprint is:\nSHA256:Oe5pz3Yuo7cKcHSV5PfriLmHd7ae3V7bdtBPYgQEwu0 backuppc@bookworm\nThe key's randomart image is:\n+---[RSA 3072]----+\n|       ..o++.    |\n|        .+o .    |\n|      . ... ..   |\n|     . . .E. ..  |\n|    . . S    ... |\n|     o . .    +.o|\n|      . .  . ..+o|\n|       o.o*o+oooO|\n|       .=*BXo+==*|\n+----[SHA256]-----+\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"create-backup-user-account-on-clients\">Create Backup User Account On Clients<\/h4>\n\n\n\n<p>On Linux client servers you want to backup, login and create an account dedicated for backup purposes.<\/p>\n\n\n\n<p>For example, create a backuppc user account on remote client.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">useradd -m backuppc<\/pre>\n\n\n\n<pre id=\"block-9caafdd3-de77-4e9c-90ba-fdd996ffa653\" class=\"wp-block-preformatted\">passwd backuppc<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"copy-backup-pc-server-ssh-keys-to-backup-clients\">Copy BackupPC Server SSH Keys to Backup Clients<\/h4>\n\n\n\n<p>Now login backup to backuppc user on the BackupPC server and copy the SSH public key for backuppc user to backuppc user on the client. <strong>Copy the keys while logged as backuppc user.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>whoami<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>backuppc<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh-copy-id backuppc@192.168.43.214<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Where 192.168.43.214 is my client IP address. Once you copy the key, you should be able to login without being prompted for a password.<\/li>\n<\/ul>\n\n\n\n<p>Now, test the login to client with the backup user to ensure user can successfully login to client. You can use root user if you didn\u2019t make the changes above.<\/p>\n\n\n\n<pre id=\"block-a250f279-7faf-4e42-8aa3-4b94c0f17e80\" class=\"wp-block-code\"><code>su - backuppc<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh -l backuppc client_IP whoami<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>backuppc<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre id=\"block-075e55d4-9c3c-4be4-8f88-bfde572e8586\" class=\"wp-block-code\"><code>ssh -l root client_IP whoami<\/code><\/pre>\n\n\n\n<p>Sample output<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>root<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"allow-backup-user-to-run-rsync-with-passwordless-sudo\">Allow Backup User to Run Rsync with Passwordless Sudo<\/h4>\n\n\n\n<p>If you changed your backup user to non-root user on the BackupPC server, for example <strong><code>backuppc<\/code><\/strong> user in this case, then login to the client host as an administrative user and allow the non-user to run the rsync command without being prompted for password by adding the user to sudoers list.&nbsp;<code>backuppc<\/code>&nbsp;user is used in this case.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh user@client_IP<\/code><\/pre>\n\n\n\n<p>Run the command below&nbsp;to find the absolute path of rsync.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">which rsync<\/pre>\n\n\n\n<p>If rsync command is not installed, run the following commands to install it.<\/p>\n\n\n\n<pre id=\"block-d93da83d-289f-403a-a724-d6ba0d79135e\" class=\"wp-block-code\"><code>apt install rsync -y<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install rsync -y<\/code><\/pre>\n\n\n\n<p>Next, update the sudoers file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"backuppc ALL=NOPASSWD: \/usr\/bin\/rsync\" | sudo tee \/etc\/sudoers.d\/backuppc<\/code><\/pre>\n\n\n\n<p>Confirm if there is any error with sudoers file;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>visudo -c -f \/etc\/sudoers<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"secure-backup-pc-login-on-the-backup-client\">Secure BackupPC Login on the Backup Client<\/h4>\n\n\n\n<p>You may also want to disable ssh agent-forwarding, port-forwarding or even the pty for backuppc user logging in to the client from BackupPC.<\/p>\n\n\n\n<p>To do this, login to client, edit the ssh authorized key file and add the line below before the&nbsp;<code>ssh-rsa<\/code><strong>&nbsp;<\/strong>keyword.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from=\u201dbackuppc_server_ip\u201d,no-agent-forwarding,no-port-forwarding,no-pty<\/code><\/pre>\n\n\n\n<p>Replace the&nbsp;<code>backuppc_server_ip<\/code>&nbsp;with the IP address of the backuppc server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vim \/home\/backuppc\/.ssh\/authorized_keys<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>from=\"192.168.43.154\",no-agent-forwarding,no-port-forwarding,no-pty<\/strong> ssh-rsa AAAAB3NzaC1SSSc2EAAAADAQABAAABAQDYuDSNIPxQL6hNh6FeW4wj3hYJ+p42SD9BGVg5Rn6HuzIAi1zrU2pRceQ5VDRj5nXxSjs+oJJ4lXZ\/HTaUQDBFysVyIe9Sc4Z9Z5nmmmGWIJnKWfuvzSYbV2JbSJjcTfUPjH32DOvU+4PMdil\/4GjKW7pr8fyywl4XuhZMU6RfVw0LgzYuqzUQX5D6Q4MsgIN4HGqBsnVIBvSz2TcPc0hovtfKQMmUBQvp7L9Ob3AKuG01ZZznQ8Q6+eGL7EJHnS30h\/FLM8rKBxsvI6El8xog2E0\/ALnNGKWsg2NTEqWqQ3xpUDEnA6exgHEm+2xCuKAy1sAuSJHJHScUMLZIUE36t2+nB0Vn backuppc@backuppc.kifarunix-demo.com<\/code><\/pre>\n\n\n\n<p>Next, you can also configure ssh logins to backuppc user accounts on clients hosts from the BackupPC server only. This can be done by editing&nbsp;<code>sshd_config<\/code>&nbsp;file on the client and configuring as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo vim \/etc\/ssh\/sshd_config<\/pre>\n\n\n\n<p>Add the line below to SSHd configuration to allow login to the client as backuppc from the BackupPC server only.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Match Host 192.168.43.154\n         AllowUsers backuppc<\/code><\/pre>\n\n\n\n<p>Reload SSH configurations<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl reload ssh<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-backup-pc-web-user-interface\">Accessing BackupPC Web User Interface<\/h3>\n\n\n\n<p>You can login as shown above.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"backup-hosts-using-backup-pc\">Backup Hosts using BackupPC<\/h3>\n\n\n\n<p>If you noticed, the localhost, which is the server running backuppc is already added as one of the backup hosts.<\/p>\n\n\n\n<p>The backup tried to run but failed, due to some default backup protocol (tar) errors.<\/p>\n\n\n\n<p>Since we are using rsync as a backup protocol in this guide, you need to update this for the localhost backup to run.<\/p>\n\n\n\n<p>Hence, <strong>click on hostname (localhost for example)<\/strong> &gt; <strong>edit config &gt; Xfer<\/strong> &gt; <strong>XferMethod &gt; Rsync<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1896\" height=\"654\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backup-protocol.png\" alt=\"\" class=\"wp-image-10387\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backup-protocol.png?v=1631305724 1896w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backup-protocol-768x265.png?v=1631305724 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backup-protocol-1536x530.png?v=1631305724 1536w\" sizes=\"(max-width: 1896px) 100vw, 1896px\" \/><\/figure>\n\n\n\n<p>Update <strong>RsyncShareName<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1903\" height=\"833\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/rsync-share-name.png\" alt=\"\" class=\"wp-image-10388\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/rsync-share-name.png?v=1631305751 1903w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/rsync-share-name-768x336.png?v=1631305751 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/rsync-share-name-1536x672.png?v=1631305751 1536w\" sizes=\"(max-width: 1903px) 100vw, 1903px\" \/><\/figure>\n\n\n\n<p>Click <strong>Save<\/strong>.<\/p>\n\n\n\n<p>Reset the local account password for backuppc user.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>passwd backuppc<\/code><\/pre>\n\n\n\n<p>Keep the password save.<\/p>\n\n\n\n<p>Install rsync and allow BackupPC user to execute rsync with sudo without password.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install rsync<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"backuppc ALL=NOPASSWD: $(which rsync)\" | sudo tee \/etc\/sudoers.d\/backuppc<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>su - backuppc<\/code><\/pre>\n\n\n\n<p>Copy the password generated above to server itself.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh-copy-id backuppc@localhost<\/code><\/pre>\n\n\n\n<p>Initiate localhost backup.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1901\" height=\"583\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backup-localhost.png\" alt=\"\" class=\"wp-image-10389\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backup-localhost.png?v=1631305826 1901w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backup-localhost-768x236.png?v=1631305826 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/backup-localhost-1536x471.png?v=1631305826 1536w\" sizes=\"(max-width: 1901px) 100vw, 1901px\" \/><\/figure>\n\n\n\n<p>Once the backup is running, you can see status under status menu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1911\" height=\"565\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/host-summary.png\" alt=\"\" class=\"wp-image-10390\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/host-summary.png?v=1631305862 1911w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/host-summary-768x227.png?v=1631305862 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/09\/host-summary-1536x454.png?v=1631305862 1536w\" sizes=\"(max-width: 1911px) 100vw, 1911px\" \/><\/figure>\n\n\n\n<p>You can now add more hosts to backup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"update-global-backup-pc-server-configurations\">Update Global BackupPC Server Configurations<\/h3>\n\n\n\n<p>You can update the general\/global configs of BackupPC by heading over to <strong>Edit Config<\/strong> under Server section on the left pane.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1810\" height=\"931\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-settings-debian.png\" alt=\"\" class=\"wp-image-17298\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-settings-debian.png?v=1686934690 1810w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-settings-debian-768x395.png?v=1686934690 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/backuppc-settings-debian-1536x790.png?v=1686934690 1536w\" sizes=\"(max-width: 1810px) 100vw, 1810px\" \/><\/figure>\n\n\n\n<p>That is basically it on our guide on how to installing BackupPC server on Debian 12.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"related-tutorials\">Related Tutorials<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/backup-windows-system-via-smb-using-backuppc\/\" target=\"_blank\">Backup Windows System via SMB Using BackupPC<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/backup-windows-system-with-backuppc-using-rsyncd\/\" target=\"_blank\" rel=\"noreferrer noopener\">Backup Windows System with BackupPC Using Rsyncd<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will learn how to install BackupPC on Debian 12.&nbsp;BackupPC&nbsp;is a free, high-performance enterprise-grade backup software suite with a web-based frontend that<\/p>\n","protected":false},"author":10,"featured_media":17300,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[39,907,121],"tags":[6905,89,6906,6904,6903],"class_list":["post-17278","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-storage","category-backuppc","category-howtos","tag-backup-server-using-backuppc","tag-backuppc","tag-backuppc-backup-server","tag-debian-12-backuppc","tag-install-backuppc-debian-12","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17278"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=17278"}],"version-history":[{"count":5,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17278\/revisions"}],"predecessor-version":[{"id":20774,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/17278\/revisions\/20774"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/17300"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=17278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=17278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=17278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}