{"id":1097,"date":"2016-05-22T08:53:25","date_gmt":"2016-05-22T08:53:25","guid":{"rendered":"http:\/\/www.plugged.in\/?p=1097"},"modified":"2019-03-15T15:03:00","modified_gmt":"2019-03-15T12:03:00","slug":"centos-7-backuppc-installation-guide","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/centos-7-backuppc-installation-guide\/","title":{"rendered":"Centos 7 &#8211; BackupPC Installation Guide"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>This is a complete guide to install BackupPC on your CentOS 7 server.<\/p>\n<p>#Install BackupPC and prerequsities<\/p>\n<pre>yum upgrade -y\nyum install epel-release\nyum install backuppc nfs-utils nfs-utils-lib bzip2\nsystemctl restart backuppc.service<\/pre>\n<p>#Set permissions<\/p>\n<pre>cd \/usr\/share\/BackupPC\/\nchown backuppc:apache sbin\/*\n\ncd \/usr\/share\/BackupPC\/sbin\nchmod u+s BackupPC_Admin\n\nusermod -s \/bin\/bash backuppc<\/pre>\n<p>#Set firewall rule for HTTP port.<\/p>\n<pre>firewall-cmd --zone=public --add-port=80\/tcp --permanent<\/pre>\n<pre>firewall-cmd --reload<\/pre>\n<p>#Edit BackupPC config<\/p>\n<pre>vi \/etc\/BackupPC\/config.pl<\/pre>\n<p>Edit<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">$Conf{CgiAdminUserGroup} = '';\n $Conf{CgiAdminUsers} = '';<\/pre>\n<p>TO<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">$Conf{CgiAdminUserGroup} = '';\n $Conf{CgiAdminUsers} = 'backuppc';<\/pre>\n<p>THEN<\/p>\n<p>Edit<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">$Conf{PingPath} = '';<\/pre>\n<p>TO<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">$Conf{PingPath} = '\/bin\/ping';<\/pre>\n<p>#Edit your apache configuration<\/p>\n<pre>vi \/etc\/httpd\/conf.d\/BackupPC.conf<\/pre>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">&lt;Directory \/usr\/share\/BackupPC\/&gt;\n # BackupPC requires valid authentication in order for the web interface to\n # function properly. One can view the web interface without authentication\n # though all functionality is disabled.\n #\n # htpasswd -c \/etc\/BackupPC\/apache.users yourusername\n #\nAuthType Basic\n AuthUserFile \/etc\/BackupPC\/apache.users\n AuthName \"BackupPC\"\n&lt;IfModule mod_authz_core.c&gt;\n # Apache 2.4\n &lt;RequireAll&gt;\n Require valid-user\n &lt;RequireAny&gt;\n Require local\n # --&gt; In order to access only this specific IP\n Require ip 192.168.16\n # --&gt; Uncomment for access everywhere\n # Require all granted\n &lt;\/RequireAny&gt;\n &lt;\/RequireAll&gt;\n &lt;\/IfModule&gt;\n &lt;IfModule !mod_authz_core.c&gt;\n AllowOverride All\n Order allow,deny\n Deny from all\n &lt;\/IfModule&gt;\n&lt;\/Directory&gt;\nAlias \/BackupPC\/images \/usr\/share\/BackupPC\/html\/\n ScriptAlias \/BackupPC \/usr\/share\/BackupPC\/sbin\/BackupPC_Admin\n ScriptAlias \/backuppc \/usr\/share\/BackupPC\/sbin\/BackupPC_Admin<\/pre>\n<p>#Create username and password for BackupPC GUI<\/p>\n<pre>htpasswd -c \/etc\/BackupPC\/apache.users backuppc<\/pre>\n<p>New password:<br \/>\nRe-type new password:<br \/>\nAdding password for user backuppc<\/p>\n<p>#Restart your services<\/p>\n<pre>systemctl restart backuppc.service\nsystemctl restart httpd.service<\/pre>\n<p>#Then add your ssh key to your remote server.<\/p>\n<pre>su - backuppc<\/pre>\n<pre>ssh-keygen -t rsa<\/pre>\n<p>Generating public\/private rsa key pair.<br \/>\nEnter file in which to save the key (\/var\/lib\/BackupPC\/.ssh\/id_rsa):<br \/>\nCreated directory &#8216;\/var\/lib\/BackupPC\/.ssh&#8217;.<br \/>\nEnter passphrase (empty for no passphrase):<br \/>\nEnter same passphrase again:<br \/>\nYour identification has been saved in \/var\/lib\/BackupPC\/.ssh\/id_rsa.<br \/>\nYour public key has been saved in \/var\/lib\/BackupPC\/.ssh\/id_rsa.pub.<\/p>\n<pre>ssh-copy-id root@your-remote-ip<\/pre>\n<p>#Test it.<\/p>\n<pre>ssh root@your-remote-ip<\/pre>\n<p>#Then go<\/p>\n<p>http:\/\/your-ip\/BackupPC<\/p>\n<p>#Enter your username and password that you created before #htpasswd -c \/etc\/BackupPC\/apache.users backuppc<\/p>\n<p>#Go &#8220;Edit Hosts&#8221;<\/p>\n<p>#Click Add<\/p>\n<p>#Then write an hostname or IP of your remote server<\/p>\n<p>#Then click SAVE<\/p>\n<p>#Refresh your page and select your host.<\/p>\n<p>!!! DO NOT FORGET INSTALL RSYNC TO YOUR REMOTE SERVER !!!<\/p>\n<p>#Click &#8220;Edit Config&#8221; for your selected host<\/p>\n<p>#Select Xfer<\/p>\n<p>#Add &#8220;*&#8221; value for &#8220;BackupFilesOnly&#8221; Box<\/p>\n<p>#Write down your path name that you want to create backup in RsyncShareName Box<\/p>\n<p>#Then Click Save.!<\/p>\n<p>#Click Start FULL BACKUP<\/p>\n<p>You are ready to go!<\/p>\n<h2>Windows SMB Backup<\/h2>\n<p>You can also take backup of your Windows clients using BackupPC<\/p>\n<p>The basic steps are<\/p>\n<ul>\n<li>Create a backuppc user in your domain\/client with backup operator privileges<\/li>\n<li>Create a share on client server and give read and list folder permissions to backuppc user<\/li>\n<li>Create inbound firewall rule for BackupPC server<\/li>\n<li>Test your configuration by typing from BackupPC Server\n<ul>\n<li>smbclient -U &#8220;Domain\\backuppc&#8221; \/\/CLIENTIP\/ShareName<\/li>\n<li>You will see smb prompt, try to list the files by typing &#8220;dir&#8221;<\/li>\n<\/ul>\n<\/li>\n<li>Add the client to backuppc and edit the credentials:\n<ul>\n<li>change Xfer method to SMB<\/li>\n<li>enter username as DOMAIN\\user<\/li>\n<li>enter password<\/li>\n<li>change share name from C$ to Share Name given<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; This is a complete guide to install BackupPC on your CentOS 7 server. #Install BackupPC and prerequsities yum upgrade -y yum install epel-release yum install backuppc nfs-utils nfs-utils-lib bzip2 systemctl restart backuppc.service #Set permissions cd \/usr\/share\/BackupPC\/ chown backuppc:apache sbin\/* cd \/usr\/share\/BackupPC\/sbin chmod u+s BackupPC_Admin usermod -s \/bin\/bash backuppc #Set firewall rule for HTTP port. [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[370],"tags":[],"yst_prominent_words":[826,820,816,827,823,822,821,671,813,617,819,828,825,619,817,337,824,669,829,818],"class_list":["post-1097","post","type-post","status-publish","format-standard","hentry","category-linux"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Fehmi Can Tokay","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/fehmi-can-tokay\/"},"uagb_comment_info":0,"uagb_excerpt":"&nbsp; This is a complete guide to install BackupPC on your CentOS 7 server. #Install BackupPC and prerequsities yum upgrade -y yum install epel-release yum install backuppc nfs-utils nfs-utils-lib bzip2 systemctl restart backuppc.service #Set permissions cd \/usr\/share\/BackupPC\/ chown backuppc:apache sbin\/* cd \/usr\/share\/BackupPC\/sbin chmod u+s BackupPC_Admin usermod -s \/bin\/bash backuppc #Set firewall rule for HTTP port.&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/1097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=1097"}],"version-history":[{"count":2,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/1097\/revisions"}],"predecessor-version":[{"id":4382,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/1097\/revisions\/4382"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=1097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=1097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=1097"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=1097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}