KNOWNHOST WIKI

User Tools

Site Tools


control-panels:cpanel-whm:backup-configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
control-panels:cpanel-whm:backup-configuration [2017/07/07 15:17]
mscherf revisions
control-panels:cpanel-whm:backup-configuration [2017/11/09 20:22] (current)
Daniel P.
Line 7: Line 7:
 In order to configure automatic backups in a cPanel server, first, log into WHM. The url should look like ''​%%https://<​ipaddress>:​2087%%''​ or ''​%%https://<​hostname>:​2087%%'',​ where ''​%%<​ipaddress>​%%''​ is replaced by the IP address of your server, and ''​%%<​hostname>​%%''​ is the hostname of your server. The first of these will give a warning about the certificate which can be safely ignored: In order to configure automatic backups in a cPanel server, first, log into WHM. The url should look like ''​%%https://<​ipaddress>:​2087%%''​ or ''​%%https://<​hostname>:​2087%%'',​ where ''​%%<​ipaddress>​%%''​ is replaced by the IP address of your server, and ''​%%<​hostname>​%%''​ is the hostname of your server. The first of these will give a warning about the certificate which can be safely ignored:
  
-  * {{:​control-panels:​cpanel-whm:​ip-url-warning.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​ip-url-warning.png?​direct&300|}}
  
-  * {{:​control-panels:​cpanel-whm:​ip-url-login.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​ip-url-login.png?​direct&300|}}
  
 The hostname version of the login url will only work if the server'​s hostname resolves correctly to the server, but will usually not give a warning about the certificate:​ The hostname version of the login url will only work if the server'​s hostname resolves correctly to the server, but will usually not give a warning about the certificate:​
  
-  * {{:​control-panels:​cpanel-whm:​hostname-url.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​hostname-url.png?​direct&300|}}
  
 Once logged in, go to Home »Backup »Backup Configuration:​ Once logged in, go to Home »Backup »Backup Configuration:​
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration.png?​direct&300|}}
  
 On this page, various backup settings can be chosen. More detail about these options will be covered later in this article. On this page, various backup settings can be chosen. More detail about these options will be covered later in this article.
Line 27: Line 27:
 To order one of these Addons, first [[my-knownhost:​howto-login#​billing_portalakamy_knownhost|log into your My Knownhost billing portal]]. From your dashboard, click the "​Manage"​ button next to your Dedicated Server: To order one of these Addons, first [[my-knownhost:​howto-login#​billing_portalakamy_knownhost|log into your My Knownhost billing portal]]. From your dashboard, click the "​Manage"​ button next to your Dedicated Server:
  
-  * {{:​control-panels:​cpanel-whm:​manage-dedi.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​manage-dedi.png?​direct&300|}}
  
 From here, go to Addons: From here, go to Addons:
  
-  * {{:​control-panels:​cpanel-whm:​dedi-addons.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​dedi-addons.png?​direct&300|}}
  
 and click "Add Addon":​ and click "Add Addon":​
  
-  * {{:​control-panels:​cpanel-whm:​dedi-add-addon.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​dedi-add-addon.png?​direct&300|}}
  
 Then in the dropdown box, choose the desired addon. Currently, you can choose sizes of 100GB, 250GB, 500GB, 750GB, or 1000GB, for renewal periods of 1 month, 3 months, 6 months, or 1 year. Prices range from $10 for 1 month of 100 GB to $1020 for 1 year of 1000 GB.((Or average rates ranging from 8.5 cents/​month/​GB to 10 cents/​month/​GB.)) Then in the dropdown box, choose the desired addon. Currently, you can choose sizes of 100GB, 250GB, 500GB, 750GB, or 1000GB, for renewal periods of 1 month, 3 months, 6 months, or 1 year. Prices range from $10 for 1 month of 100 GB to $1020 for 1 year of 1000 GB.((Or average rates ranging from 8.5 cents/​month/​GB to 10 cents/​month/​GB.))
  
-  * {{:​control-panels:​cpanel-whm:​dedi-backup-addon-small.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​dedi-backup-addon-small.png?​direct&300|}}
  
-  * {{:​control-panels:​cpanel-whm:​dedi-backup-addon-big.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​dedi-backup-addon-big.png?​direct&300|}}
  
 Once you have selected the desired backup space size and renewal term, click "​Create":​ Once you have selected the desired backup space size and renewal term, click "​Create":​
  
-  * {{:​control-panels:​cpanel-whm:​dedi-backup-addon-create.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​dedi-backup-addon-create.png?​direct&300|}}
  
 Then, review and confirm the invoice: Then, review and confirm the invoice:
  
-  * {{:​control-panels:​cpanel-whm:​dedi-backup-addon-confirm.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​dedi-backup-addon-confirm.png?​direct&300|}}
  
 Once you have finished purchasing the Addon, you can then configure backups to be stored there. Once you have finished purchasing the Addon, you can then configure backups to be stored there.
Line 57: Line 57:
 To use it, you need to first get the needed information from your My Knownhost customer portal. Once you are logged in and at your Dashboard, click on the row for the Dedicated Server to expand its details, then click "​Manage"​ next to the backup space addon: To use it, you need to first get the needed information from your My Knownhost customer portal. Once you are logged in and at your Dashboard, click on the row for the Dedicated Server to expand its details, then click "​Manage"​ next to the backup space addon:
  
-  * {{:​control-panels:​cpanel-whm:​dedi-expand.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​dedi-expand.png?​direct&300|}}
  
 Then, in the "​Statistics"​ section, you can see the current Disk Usage and Bandwidth Usage of your new backup space addon. You can also see the Domain, which you will need later, and the IP Address, which may occasionally be useful for troubleshooting purposes: Then, in the "​Statistics"​ section, you can see the current Disk Usage and Bandwidth Usage of your new backup space addon. You can also see the Domain, which you will need later, and the IP Address, which may occasionally be useful for troubleshooting purposes:
  
-  * {{:​control-panels:​cpanel-whm:​backup-addon-statistics.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-addon-statistics.png?​direct&300|}}
  
 If you ever need to reset the password of the backup space, you can do so in the Actions section:​((Since the initial password is sent via email, it is strongly recommended to choose a new password as soon as possible. Remember to record the new password in a safe and secure place so that you and only you will have access to it. You can learn more about choosing secure passwords [[security:​misc:​how-can-i-generate-a-secure-random-password|here]].)) If you ever need to reset the password of the backup space, you can do so in the Actions section:​((Since the initial password is sent via email, it is strongly recommended to choose a new password as soon as possible. Remember to record the new password in a safe and secure place so that you and only you will have access to it. You can learn more about choosing secure passwords [[security:​misc:​how-can-i-generate-a-secure-random-password|here]].))
  
-  * {{:​control-panels:​cpanel-whm:​backup-addon-actions.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-addon-actions.png?​direct&300|}}
  
 For actually configuring the backups, you will need some of the information from the Welcome Email from when you ordered the backup space package: For actually configuring the backups, you will need some of the information from the Welcome Email from when you ordered the backup space package:
  
-  * {{:​control-panels:​cpanel-whm:​backup-addon-welcome.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-addon-welcome.png?​direct&300|}}
  
 You will need to make note of the five things in the section "Login Details"​. This includes the "​Username",​ "​Password",​ "​SFTP/​SSH Port", "​Server Name", and "​Backup Path". You will need to make note of the five things in the section "Login Details"​. This includes the "​Username",​ "​Password",​ "​SFTP/​SSH Port", "​Server Name", and "​Backup Path".
Line 75: Line 75:
 First, make sure the backup space is whitelisted in your server'​s firewall. If your server uses ConfigServer Security&​Firewall,​((this is installed by default on new servers)) start by going to that page in WHM, going to the "Login Failure Daemon"​ section, and clicking the "lfd Dynamic DNS" button: First, make sure the backup space is whitelisted in your server'​s firewall. If your server uses ConfigServer Security&​Firewall,​((this is installed by default on new servers)) start by going to that page in WHM, going to the "Login Failure Daemon"​ section, and clicking the "lfd Dynamic DNS" button:
  
-  * {{:​control-panels:​cpanel-whm:​lfd-dynamic-dns-button.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​lfd-dynamic-dns-button.png?​direct&300|}}
  
 This opens an editing box for the domain-based whitelist. As described in the comments of this file, this file is a list of domains for the firewall to let through. So, we add the domain (i.e., "​Server Name") to this list, and then click the "​Change"​ button: This opens an editing box for the domain-based whitelist. As described in the comments of this file, this file is a list of domains for the firewall to let through. So, we add the domain (i.e., "​Server Name") to this list, and then click the "​Change"​ button:
  
-  * {{:​control-panels:​cpanel-whm:​lfd-dynamic-dns-edit.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​lfd-dynamic-dns-edit.png?​direct&300|}}
  
 Once the changes are saved, be sure to restart lfd so that the changes take effect: Once the changes are saved, be sure to restart lfd so that the changes take effect:
  
-  * {{:​control-panels:​cpanel-whm:​lfd-changes-saved-restart.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​lfd-changes-saved-restart.png?​direct&300|}}
  
 Now that the domain is configured to be whitelisted,​ we need to make sure that the lookups themselves are enabled. Go back to the main "​ConfigServer Security&​Firewall"​ page, go to the "​ConfigServer Firewall"​ section, and click the "​Firewall Configuration"​ button: Now that the domain is configured to be whitelisted,​ we need to make sure that the lookups themselves are enabled. Go back to the main "​ConfigServer Security&​Firewall"​ page, go to the "​ConfigServer Firewall"​ section, and click the "​Firewall Configuration"​ button:
  
-  * {{:​control-panels:​cpanel-whm:​csf-firewall-config-button.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​csf-firewall-config-button.png?​direct&300|}}
  
 In the dropdown box, choose the "​Global Lists/​DYNDNS/​Blocklists"​ section: In the dropdown box, choose the "​Global Lists/​DYNDNS/​Blocklists"​ section:
  
-  * {{:​control-panels:​cpanel-whm:​choose-dyndns-section.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​choose-dyndns-section.png?​direct&300|}}
  
 Scroll down to the setting labeled "​DYNDNS",​ and choose a number greater than zero.((but no larger than 86400)) This setting tells the firewall how often (in seconds) to look up the IP addresses of the whitelisted domains, so that if their IP addresses change, the firewall will update its rules accordingly. Domains whose IP addresses have changed will be unable to access the server in between the time their IPs change and when the firewall does its next lookup. For this reason, setting the interval too long can result in a higher likelihood of those locations being unable to access the server at times, but setting the interval too short can raise server load due to the lookup processes, especially if there are a lot of domains to look up. For most servers, but not all of them, an interval of ten minutes (600 seconds) should work fine.((If there are a lot of domains being whitelisted,​ the interval should be set longer, whereas if there is a specific need to detect changes particularly quickly, the interval should be set shorter.)) Scroll down to the setting labeled "​DYNDNS",​ and choose a number greater than zero.((but no larger than 86400)) This setting tells the firewall how often (in seconds) to look up the IP addresses of the whitelisted domains, so that if their IP addresses change, the firewall will update its rules accordingly. Domains whose IP addresses have changed will be unable to access the server in between the time their IPs change and when the firewall does its next lookup. For this reason, setting the interval too long can result in a higher likelihood of those locations being unable to access the server at times, but setting the interval too short can raise server load due to the lookup processes, especially if there are a lot of domains to look up. For most servers, but not all of them, an interval of ten minutes (600 seconds) should work fine.((If there are a lot of domains being whitelisted,​ the interval should be set longer, whereas if there is a specific need to detect changes particularly quickly, the interval should be set shorter.))
  
-  * {{:​control-panels:​cpanel-whm:​type-dyndns-value.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​type-dyndns-value.png?​direct&300|}}
  
 Scroll down to the bottom and click "​Change":​ Scroll down to the bottom and click "​Change":​
  
-  * {{:​control-panels:​cpanel-whm:​dyndns-lookup-change-button.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​dyndns-lookup-change-button.png?​direct&300|}}
  
 And, as before, restart csf and lfd, so that the saved changes will take effect: And, as before, restart csf and lfd, so that the saved changes will take effect:
  
-  * {{:​control-panels:​cpanel-whm:​changes-saved-restart-csf-lfd.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​changes-saved-restart-csf-lfd.png?​direct&300|}}
  
 Now that the backup space is whitelisted in the server'​s firewall, the automatic backups can be set to use this as a remote Additional Destination. To do so, you will need to go back to the "​Backup Configuration"​ page of WHM as shown above. Scroll all the way down to the section "​Additional Destinations"​ and in the "​Destination Type" dropdown box choose SFTP. Then click "​Create New Destination"​. Now that the backup space is whitelisted in the server'​s firewall, the automatic backups can be set to use this as a remote Additional Destination. To do so, you will need to go back to the "​Backup Configuration"​ page of WHM as shown above. Scroll all the way down to the section "​Additional Destinations"​ and in the "​Destination Type" dropdown box choose SFTP. Then click "​Create New Destination"​.
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-create-destination.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-create-destination.png?​direct&300|}}
  
 Then, fill in the requested details, and click "Save and Validate Destination":​ Then, fill in the requested details, and click "Save and Validate Destination":​
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-sftp-details.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-sftp-details.png?​direct&300|}}
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-sftp-details-more.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-sftp-details-more.png?​direct&300|}}
  
 If it worked, you will see this success message: If it worked, you will see this success message:
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-sftp-success.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-sftp-success.png?​direct&300|}}
  
 Once backups have run, you can see the usage recorded in the Statistics page: Once backups have run, you can see the usage recorded in the Statistics page:
  
-  * {{:​control-panels:​cpanel-whm:​backup-space-statistics.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-space-statistics.png?​direct&300|}}
  
 ===== Recommendations ===== ===== Recommendations =====
Line 192: Line 192:
 We set automatic backups in general to "​Enabled",​ choose "​Compressed"​ backups (to save space), and enable "​Minimum Free Disk Space Check" and set it to 17000 MB: We set automatic backups in general to "​Enabled",​ choose "​Compressed"​ backups (to save space), and enable "​Minimum Free Disk Space Check" and set it to 17000 MB:
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-part1.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-part1.png?​direct&300|}}
  
 The default timeouts are usually okay, but can be adjusted later if needed. Since we decided to keep six of each type of backup, we choose that number. In this case, we choose to Strictly Enforce retention, to make sure the backups do not take more space than expected:​((You can read more about Retention Behavior [[https://​documentation.cpanel.net/​display/​ALD/​Backup+Configuration#​BackupConfiguration-Retentionbehavior|here]].)) The default timeouts are usually okay, but can be adjusted later if needed. Since we decided to keep six of each type of backup, we choose that number. In this case, we choose to Strictly Enforce retention, to make sure the backups do not take more space than expected:​((You can read more about Retention Behavior [[https://​documentation.cpanel.net/​display/​ALD/​Backup+Configuration#​BackupConfiguration-Retentionbehavior|here]].))
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-part2.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-part2.png?​direct&300|}}
  
 We want to backup the accounts,​((that is, after all, the main reason for setting any of this up in the first place)) and we will want to go to the Select Users page to double-check all desired users have backups enabled. In our case, we want to disable backups for Suspended Accounts,​((since they are unlikely to have many changes)) enable backups of Access Logs,((in case that data is later useful)) and enable backups of Bandwidth Data.((in case that data is later needed)) Since this server is not part of a DNS Cluster, the "Use Local DNS" setting should not make any difference, and in this case we do want to enable backups of the System Files: We want to backup the accounts,​((that is, after all, the main reason for setting any of this up in the first place)) and we will want to go to the Select Users page to double-check all desired users have backups enabled. In our case, we want to disable backups for Suspended Accounts,​((since they are unlikely to have many changes)) enable backups of Access Logs,((in case that data is later useful)) and enable backups of Bandwidth Data.((in case that data is later needed)) Since this server is not part of a DNS Cluster, the "Use Local DNS" setting should not make any difference, and in this case we do want to enable backups of the System Files:
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-part3.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-part3.png?​direct&300|}}
  
 Although backups are usually already enabled for newly-created users, accounts that are migrated into the server will start out with the same setting((i.e.,​ enabled or disabled)) as they had in the old server. It is useful to double-check that all accounts you want backups of have backups enabled. This page does not have a "​Save"​ button; the enabled/​disabled settings of each account are saved as soon as the slider is clicked. Although backups are usually already enabled for newly-created users, accounts that are migrated into the server will start out with the same setting((i.e.,​ enabled or disabled)) as they had in the old server. It is useful to double-check that all accounts you want backups of have backups enabled. This page does not have a "​Save"​ button; the enabled/​disabled settings of each account are saved as soon as the slider is clicked.
  
-  * {{:​control-panels:​cpanel-whm:​backup-user-selection.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-user-selection.png?​direct&300|}}
  
 For the databases, it is useful to enable backups both per account and for the entire directory, for that little bit of extra redundancy. In most cases the default backup directory ''​%%/​backup%%''​ works fine. In our example, we are not retaining backups in the default backup directory, so that we are not limited to the amount of disk space in this server for storing backups. Since our default backup directory is not on a separate partition we do not need to mount it. For the databases, it is useful to enable backups both per account and for the entire directory, for that little bit of extra redundancy. In most cases the default backup directory ''​%%/​backup%%''​ works fine. In our example, we are not retaining backups in the default backup directory, so that we are not limited to the amount of disk space in this server for storing backups. Since our default backup directory is not on a separate partition we do not need to mount it.
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-part4.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-part4.png?​direct&300|}}
  
 Once we have finished choosing the backup settings, we click "Save Configuration":​ Once we have finished choosing the backup settings, we click "Save Configuration":​
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-part5.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-part5.png?​direct&300|}}
  
 After this, another success message should appear: After this, another success message should appear:
  
-  * {{:​control-panels:​cpanel-whm:​backup-configuration-save-success.png?​300|}}+  * {{:​control-panels:​cpanel-whm:​backup-configuration-save-success.png?​direct&300|}}
  
 Now, next time backups are configured to run, they should get uploaded to the Additional Destination,​ in this case the External Backup Space Addon. If we want to generate a backup set right now, regardless of whether it is time for backups or whether there is already an up to date backup, we can use this command: Now, next time backups are configured to run, they should get uploaded to the Additional Destination,​ in this case the External Backup Space Addon. If we want to generate a backup set right now, regardless of whether it is time for backups or whether there is already an up to date backup, we can use this command:
control-panels/cpanel-whm/backup-configuration.txt · Last modified: 2017/11/09 20:22 by Daniel P.