How to automate Hetzner Server Snapshots

SimpleBackups founder

Laurent Lemaire

Co-founder, SimpleBackups

February 14, 2021

Hetzner is one of the leading cloud providers. The following guide will help you, step by step, automate your Hetzner server snapshots backups. The steps are very easy and will only involve minimal effort.

Afterwards, you will be able to take snapshots, automatically on your own terms, whether you need to take them daily, weekly, every couple of hours or on-demand using our API. You will also have the option to choose the number of snapshots to keep on your provider to save snapshot storage cost.

Table of Contents

Now, let's get started!

Prerequisites

Step 1: Create a SimpleBackups Account

Create or login to your SimpleBackups account, then head to the snapshot creation section.

Step 2: Add Hetzner to SimpleBackups

In this step, we will generate a unique API Token on Hetzner that will allow us to automate Hetzner snapshots from SimpleBackups dashboard.

Step 2a: Obtain Hetzner API credentials

  1. Go to https://console.hetzner.cloud/projects/ and choose your project,
  2. Click Security
  3. Click API Tokens
  4. Then click Generate API Token

Choose the Read & Write permission, enter a name for your token, then click Generate API Token

Your token will be shown once. Make sure you copy it and immediately add it to SimpleBackups.

Afterwards, create a new provider on SimpleBackups with your Hetzner API Token by going to the snapshot creation section and click Connect a new provider as shown.

Select Hetzner from the Provider dropdown list, enter a name for your Hetzner account, then paste the Token we obtained in the previous step and click save provider.

Step 3: Create a Hetzner snapshot backup job

In this step, and after connecting our Hetzner account, we will simply create the snapshot backup job and select the needed server.

Step 3a: Choose your Hetzner account

From the list, choose the Hetzner account you need to take its snapshots. You may add as many Hetzner accounts as you need under your SimpleBackups account.

Step 3b: Choose Hetzner server resource

You can choose a server under the Resource Type. The Resource dropdown will be populated by all the Hetzner resources accessible under your Hetzner account / project.

Step 3c: Set the retention you need

The Retention is a number of snapshots we will keep, anything more than this number will be pruned/rotated automatically for you.

Step 3d: Save the snapshot backup job

Finally, give your snapshot backup job a friendly name, then click Create Snapshot.

Congratulations, you now have an automated Hetzner snapshot backup.

Run it once manually (using the "Run" snapshot button from the snapshots list) and you'll trigger your first snapshot backup!



Back to blog

Stop worrying about your backups.
Focus on building amazing things!

Free 7-day trial. No credit card required.

Have a question? Need help getting started?
Get in touch via chat or at [email protected]

Customer support with experts
Security & compliance
Service that you'll love using