

Sudo parted -s -a optimal - /dev/vdc mkpart primary 0% 100% sudo parted -s -a optimal - /dev/vdc mklabel gpt Let’s start by creating a partition on it.

I’ll create a partition on this block device and mount it under the /data directory. I have a secondary disk in my server that will be used to store repository data – /dev/vdc of 100GB. Sudo firewall-cmd -reload Step 2: Create Repository directories sudo firewall-cmd -add-service=http -permanent Nov 01 00:28:39 centos8.novalocal systemd: Started The nginx HTTP and reverse proxy server. Nov 01 00:28:39 centos8.novalocal systemd: rvice: Failed to parse PID from file /run/nginx.pid: Invalid argument Nov 01 00:28:39 centos8.novalocal nginx: nginx: configuration file /etc/nginx/nf test is successful Nov 01 00:28:39 centos8.novalocal nginx: nginx: the configuration file /etc/nginx/nf syntax is ok Nov 01 00:28:39 centos8.novalocal systemd: Starting The nginx HTTP and reverse proxy server. ├─7380 nginx: master process /usr/sbin/nginx Process: 7375 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS) Process: 7376 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS) Process: 7378 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS) Loaded: loaded (/usr/lib/systemd/system/rvice enabled vendor preset: disabled)Īctive: active (running) since Fri 00:28:39 EAT 4s ago rvice - The nginx HTTP and reverse proxy server.sudo systemctl enable -now nginxĬonfirm that the service is running.
Grsync centos how to#
The man page offers full details, but I found a lot of good info on rsync examples by Googling around the web.For CentOS 7 & CentOS 6, check: How To Create Local CentOS 7 6 & EPEL Repository Sync Mirrors Step 1: Install Nginx Web ServerĪs Nginx is used as a web server of choice, install it in your CentOS 7 system.ĬentOS 8 sudo dnf -y install 7: sudo yum -y install epel-releaseĪfter installation, start and enable the service. Rsync is very powerful, but also very complex, and I am far from an expert on using it. But for me, it means that my backup is always perfectly synchronized with the source, which is what I want. Not everyone wants to do this, so you should consider the consequences of that option. The -delete option means that if I delete a file in the source between backups, then it will be deleted in the destination also on my next backup. I simply copy the commands from a text file (a BASH script would work nicely too) and paste into a terminal after making sure that I have the correct flash drive inserted (the destination: /media/stan/DBB0-4F8C/). Rsync -delete -avhs "/home/stan/Documents/ALL_eStatements" "/media/stan/DBB0-4F8C/" Rsync -delete -avhs "/home/stan/Documents/HomeBank" "/media/stan/DBB0-4F8C/" & Rsync -delete -avhs "/home/stan/Documents/MyKeePass" "/media/stan/DBB0-4F8C/" & so it would likely be slower on an external hard drive, or even worse over a network connection.įor my own personal rsync backup solution, I join several rsync commands together (concatenate) with & similar to this:

I did this backup on the same hard drive and it took about 7-8 minutes. I ran it again with sudo and then it copied every file, but that makes root the owner of the backed up directory. Also, the command as given above neglected to copy 8 files (yes, only 8 out of over 330,000) due to permission problems. it was over 330,000 files and about 6 GB. I ran a test of the above command on my own /usr directory. I'm not quite sure that /usr is a useful backup for you, but that is your decision. If you put the trailing / it will only copy the loose files inside (and create quite a mess in your destination).

That will copy the directory itself and all the contents. Especially note that there is no trailing / on the source.
