Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tutorial: How to Configure cPanel Backups with Hetzner Storage Box #1034

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions tutorials/cpanel-backup-with-hetzner/01.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
SPDX-License-Identifier: MIT
path: "/tutorials/cpanel-backup-with-hetzner"
slug: "cpanel-backup-with-hetzner"
date: "2023-01-01"
title: "How to Configure cPanel Backups with Hetzner Storage Box"
short_description: "Learn how to configure cPanel backups to a Hetzner Storage Box for secure and reliable offsite data storage."
tags: ["Backup", "cPanel", "Hetzner", "Storage"]
author: "Stephen Ndegwa"
author_link: "https://github.com/stephenndegwa"
author_img: "https://avatars.githubusercontent.com/u/105418748"
author_description: "System administrator with expertise in Linux and high-availability RAID configurations."
language: "en"
available_languages: ["en"]
header_img: "header-raid"
cta: "product"
---

## Introduction
This tutorial will guide you through configuring cPanel backups to a Hetzner Storage Box. Hetzner Storage Boxes are efficient and secure solutions for offsite backups, allowing you to store data away from your primary server. By the end of this tutorial, your cPanel server will automatically upload backups to the Hetzner Storage Box, ensuring reliable data protection.

### Prerequisites
- A cPanel/WHM server.
- Access to a Hetzner Storage Box with valid credentials.
- SSH access to your cPanel server.
- Basic knowledge of Linux commands.

Example placeholders used:
- **Username:** `holu`
- **Hostname:** `<your_host>`
- **Domain:** `<example.com>`
- **IP Address:** `<10.0.0.1>`

---

## Steps

### Step 1: Prepare Hetzner Storage Box
1. Log in to the Hetzner Robot Interface.
2. Navigate to the **Storage Boxes** section and select your Storage Box.
3. Note the **FTP/SSH/Samba credentials** provided.
4. Ensure that **SSH** is enabled for the Storage Box in its settings.

### Step 2: Configure cPanel Backup System
1. Log in to WHM on your cPanel server.
2. Navigate to **Backup Configuration** (Home > Backup > Backup Configuration).
3. Enable **Backups** by checking the "Enable Backups" option.
4. Choose the backup type (e.g., Compressed, Uncompressed, or Incremental).
5. Set the backup schedule and retention policy according to your requirements.
6. Click **Save Configuration**.

### Step 3: Set Up Remote Destination
1. In WHM, navigate to **Backup Configuration** > **Additional Destinations**.
2. Click **Create New Destination** and select **Custom Destination**.
3. Fill in the required fields:
- **Destination Type:** `SFTP` or `rsync`.
- **Name:** `HetznerStorageBox` (or a name of your choice).
- **Backup Directory:** `/backup` (or another directory on the Storage Box).
- **Remote Host:** `<storage_box_hostname>` (e.g., `u123456.your-storagebox.de`).
- **Port:** `23` (default for SSH/SFTP or rsync).
- **Remote Username:** `<storage_box_username>`.
- **Remote Password:** `<storage_box_password>`.
4. Click **Save and Validate Destination** to ensure the connection works.

### Step 4: Test Backup Configuration
1. In WHM, navigate to **Backup Configuration** > **Additional Destinations**.
2. Select the Hetzner Storage Box destination and click **Transfer Backups to Destination**.
3. Verify that backups are successfully uploaded to the Storage Box.

### Step 5: Automate Backups
1. Confirm that the backup schedule is active in the **Backup Configuration** section.
2. Monitor backups to ensure that daily/weekly backups are automatically transferred to the Hetzner Storage Box.

---

## Conclusion
By following this tutorial, you have successfully configured cPanel to use a Hetzner Storage Box for offsite backups. This setup enhances data security and provides a reliable recovery option in case of server failures.

### License: MIT

<!--
Contributor's Certificate of Origin
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have
the right to submit it under the license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my
knowledge, is covered under an appropriate license and I have the
right under that license to submit that work with modifications,
whether created in whole or in part by me, under the same license
(unless I am permitted to submit under a different license), as
indicated in the file; or
(c) The contribution was provided directly to me by some other person
who certified (a), (b) or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution are
public and that a record of the contribution (including all personal
information I submit with it, including my sign-off) is maintained
indefinitely and may be redistributed consistent with this project
or the license(s) involved.
Signed-off-by: Stephen Ndegwa - [email protected]
-->
Loading