<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dedicated server Archives - CNERIS</title>
	<atom:link href="https://cneris.com/en/tag/dedicated-server/feed/" rel="self" type="application/rss+xml" />
	<link>https://cneris.com/en/tag/dedicated-server/</link>
	<description></description>
	<lastBuildDate>Fri, 23 Aug 2024 20:59:51 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>How to Create a Script to Automate Backups on a Dedicated Server with Multiple Vhosts</title>
		<link>https://cneris.com/en/how-to-create-a-script-to-automate-backups-on-a-dedicated-server-with-multiple-vhosts/</link>
					<comments>https://cneris.com/en/how-to-create-a-script-to-automate-backups-on-a-dedicated-server-with-multiple-vhosts/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 23 Aug 2024 20:58:57 +0000</pubDate>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[automate backups]]></category>
		<category><![CDATA[dedicated server]]></category>
		<category><![CDATA[script to automate]]></category>
		<guid isPermaLink="false">https://cneris.com/?p=2003</guid>

					<description><![CDATA[<p>Automating backups on a dedicated server hosting multiple websites via vhosts is essential to ensure data security and availability. In this article, you'll learn how to create a Bash script to automate the backup process for different websites hosted on a server with vhosts. I'll include code examples so you can implement it easily. Step [...]</p>
<p>The post <a href="https://cneris.com/en/how-to-create-a-script-to-automate-backups-on-a-dedicated-server-with-multiple-vhosts/">How to Create a Script to Automate Backups on a Dedicated Server with Multiple Vhosts</a> appeared first on <a href="https://cneris.com/en">CNERIS</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Automating backups on a dedicated server hosting multiple websites via vhosts is essential to ensure data security and availability. In this article, you&#8217;ll learn how to create a Bash script to automate the backup process for different websites hosted on a server with vhosts. I&#8217;ll include code examples so you can implement it easily.</p>
<p><strong>Step 1: Setting Up the Environment</strong></p>
<p>Before you start writing the script, make sure your server has SSH access configured and that you have root or sudo privileges. Additionally, you&#8217;ll need a directory where the backups will be stored.</p>
<p><strong>Step 2: Creating the Backup Script</strong></p>
<p>Below is an example of a Bash script that automates backups of the vhosts. This script will compress the files of each website and store them in a backup directory.</p>
<div class="dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium">
<div class="flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash"><span class="hljs-meta">#!/bin/bash</span><br />
</code></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash"><span class="hljs-comment"># Directory where backups will be stored</span><br />
backup_dir=<span class="hljs-string">"/var/backups"</span><br />
</code></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash"><span class="hljs-comment"># Current date</span><br />
<span class="hljs-built_in">date</span>=$(<span class="hljs-built_in">date</span> +<span class="hljs-string">'%Y-%m-%d'</span>)<br />
</code></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash"><code class="!whitespace-pre hljs language-bash"><span class="hljs-comment"># Vhosts directory</span><br />
vhosts_dir=<span class="hljs-string">"/etc/apache2/sites-available"</span></code></code><span class="hljs-comment"># Create backup directory if it doesn&#8217;t exist</span><br />
<span class="hljs-built_in">mkdir</span> -p <span class="hljs-string">&#8220;<span class="hljs-variable">$backup_dir</span>/<span class="hljs-variable">$date</span>&#8220;</span></p>
</div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash"><span class="hljs-comment"># Loop through each vhost and perform the backup</span><br />
</code></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash"><span class="hljs-keyword">for</span> vhost <span class="hljs-keyword">in</span> $(<span class="hljs-built_in">ls</span> <span class="hljs-string">"<span class="hljs-variable">$vhosts_dir</span>"</span>); </code><code class="!whitespace-pre hljs language-bash"><span class="hljs-keyword">do</span><br />
</code></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash">    site_name=$(<span class="hljs-built_in">basename</span> <span class="hljs-string">"<span class="hljs-variable">$vhost</span>"</span> .conf)<br />
</code></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash">    tar -czf <span class="hljs-string">"<span class="hljs-variable">$backup_dir</span>/<span class="hljs-variable">$date</span>/<span class="hljs-variable">$site_name</span>.tar.gz"</span> <span class="hljs-string">"/var/www/<span class="hljs-variable">$site_name</span>"</span><br />
</code></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash"><span class="hljs-keyword">done</span><br />
</code></div>
</div>
<p><strong>Step 3: Scheduling the Script</strong></p>
<p>To have the script run automatically, you can schedule it using cron. To edit the cron, run the following command:</p>
<div class="dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium">
<div class="flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-bash">$ crontab -e<br />
</code></div>
</div>
<p>Add the following line to have the script run daily at 2 AM:</p>
<div class="dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium">
<div class="flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md"></div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs language-javascript"><span class="hljs-number">0</span> <span class="hljs-number">2</span> * * * <span class="hljs-regexp">/path/</span>to/script/backup_script.<span class="hljs-property">sh</span><br />
</code></div>
</div>
<p><strong>Conclusion:</strong></p>
<p>Automating backups of your vhosts is an excellent way to ensure your data is protected without the need for manual intervention. This script provides a simple and effective solution for maintaining regular backups of your websites.</p>
<p>The post <a href="https://cneris.com/en/how-to-create-a-script-to-automate-backups-on-a-dedicated-server-with-multiple-vhosts/">How to Create a Script to Automate Backups on a Dedicated Server with Multiple Vhosts</a> appeared first on <a href="https://cneris.com/en">CNERIS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cneris.com/en/how-to-create-a-script-to-automate-backups-on-a-dedicated-server-with-multiple-vhosts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What does Relay Access Denied mean?</title>
		<link>https://cneris.com/en/what-does-relay-access-denied-mean/</link>
					<comments>https://cneris.com/en/what-does-relay-access-denied-mean/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 02 Jul 2024 20:18:09 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Dedicated servers]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[configuration wrong]]></category>
		<category><![CDATA[dedicated server]]></category>
		<category><![CDATA[relay access denied]]></category>
		<guid isPermaLink="false">https://cneris.com/?p=1704</guid>

					<description><![CDATA[<p>"Relay access denied" is an email error that occurs when an email server refuses to relay a message. This generally happens for one of two reasons: Unauthorized Relay: The sender is trying to use the email server to send an email to an address that is not handled by that server, without proper authentication. Email [...]</p>
<p>The post <a href="https://cneris.com/en/what-does-relay-access-denied-mean/">What does Relay Access Denied mean?</a> appeared first on <a href="https://cneris.com/en">CNERIS</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&#8220;Relay access denied&#8221; is an email error that occurs when an email server refuses to relay a message. This generally happens for one of two reasons:</p>
<ol>
<li><strong>Unauthorized Relay</strong>: The sender is trying to use the email server to send an email to an address that is not handled by that server, without proper authentication. Email servers typically allow relaying only for authenticated users to prevent unauthorized users from using the server to send spam.</li>
<li><strong>Misconfiguration</strong>: The email server or the email client is misconfigured. This could mean that the email client is not properly authenticated, or the server is not correctly set up to allow relaying for certain domains or addresses.</li>
</ol>
<h3>Common Causes and Solutions</h3>
<ol>
<li><strong>Incorrect SMTP Settings</strong>:
<ul>
<li><strong>Cause</strong>: The email client is using incorrect SMTP (Simple Mail Transfer Protocol) settings.</li>
<li><strong>Solution</strong>: Ensure the SMTP server, port, and encryption settings are correct. These can typically be found in your email service provider&#8217;s documentation.</li>
</ul>
</li>
<li><strong>Authentication Required</strong>:
<ul>
<li><strong>Cause</strong>: The server requires authentication before relaying emails.</li>
<li><strong>Solution</strong>: Make sure that the email client is configured to use SMTP authentication, including a valid username and password.</li>
</ul>
</li>
<li><strong>Blocked IP Address</strong>:
<ul>
<li><strong>Cause</strong>: The server is blocking the IP address of the sender, often as a spam prevention measure.</li>
<li><strong>Solution</strong>: Check with the email service provider to see if the IP address is blocked and request it to be whitelisted if necessary.</li>
</ul>
</li>
<li><strong>Email Forwarding Issues</strong>:
<ul>
<li><strong>Cause</strong>: Email forwarding settings might be incorrect or not permitted.</li>
<li><strong>Solution</strong>: Check the email forwarding settings and make sure they are configured correctly.</li>
</ul>
</li>
<li><strong>DNS Configuration</strong>:
<ul>
<li><strong>Cause</strong>: DNS settings, such as MX (Mail Exchange) records, might be incorrect.</li>
<li><strong>Solution</strong>: Verify that DNS settings are correct, particularly the MX records for the domain.</li>
</ul>
</li>
</ol>
<h3>Example of an Error Message</h3>
<p>An example of a &#8220;relay access denied&#8221; error message might look like this:</p>
<div class="dark bg-gray-950 rounded-md border-[0.5px] border-token-border-medium">
<div class="flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md">
<div class="flex items-center"></div>
</div>
<div class="overflow-y-auto p-4" dir="ltr"><code class="!whitespace-pre hljs">550 5.7.1 Relaying denied<br />
</code></div>
</div>
<h3>Steps to Diagnose and Resolve</h3>
<ol>
<li><strong>Check SMTP Settings</strong>: Verify the SMTP server, port, and encryption settings in your email client.</li>
<li><strong>Enable SMTP Authentication</strong>: Ensure that the email client is set to use SMTP authentication with the correct username and password.</li>
<li><strong>Contact Email Provider</strong>: If the issue persists, contact your email service provider for support. They can help determine if your IP address is blocked or if there are any server-side issues.</li>
<li><strong>Review Email Server Configuration</strong>: If you manage your own email server, review the server configuration to ensure it allows relaying for authenticated users and is properly set up to handle outgoing mail.</li>
</ol>
<p>By addressing these areas, you can typically resolve a &#8220;relay access denied&#8221; error and ensure that your emails are successfully sent.</p>
<p>The post <a href="https://cneris.com/en/what-does-relay-access-denied-mean/">What does Relay Access Denied mean?</a> appeared first on <a href="https://cneris.com/en">CNERIS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cneris.com/en/what-does-relay-access-denied-mean/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
