Le Blog Utux

HTTP 200 GET /

Backups in Azure with Duplicati

Rédigé par uTux Aucun commentaire

I need to backup my NAS to a remote and secured location, and because I am a Azure AZ-103 associate, I have decided to use an Azure storage account. I will use Duplicati, a free backup software written in C# with the following features:

  • Native AES-256 encryption.
  • Wide variety of storage backends: Azure, S3, GCS, FTP, SSH, Onedrive...
  • Works well on Windows, Linux, FreeBSD.
  • Works on a headless server with a WebUI.

Storage account offers 3 tier with different pricing: hot, cool, archive. If you choose a hot tier, access is less charged, but storage is more expensive. This is the opposite for cool and archive, storage is cheap but access is expensive. Archive is the most interesting tier for backups but it has many constraints, such as the need to pick every object inside the container and move them to the tier. So I will use cool.

Create a Resource group and a Storage account

First you need to create a Resource group. Go to the Resource groups blade then click +Add. Take a look at Ready: Recommended naming and tagging conventions if you don't know how to name it. Select a region (does not really matters now).

Create a resourcegroup

Now you need to create a Storage account. Go to the Storage accounts blade then click +Add.

  • Subscription: your subscription.
  • Resource group: the one you just created
  • Storage account name: must be unique accross Azure and as many limitations, so I recommend using a very short name + short random id.
  • Location: Select the location of your choice (choose a close one with an interesting pricing, see Azure Calculator)
  • Account kind: StorageV2
  • Replication: LRS
  • Access tier: cool
Create storage account

Now open you new Storage account and go to the Containers blade then click +Container. This time the name is private and does not need to be unique. Make sure the Public level access is set to Private (no anonymous access).

Create container

Go to the Access keys blade and retrieve the value of key1 or key2. These key are private and should not be shared with anyone because they basically give full access to the storage account and the data inside.

Retreive access key

Configure Duplicati

Go into the Web UI then + Add backup > Configure a new backup.

Enter a name, a description and a very strong encryption passphrase (if you forget this passphrase, you wan't be able to decrypt your backups).

duplicati step 1

Select "Azure blob" for Storage type and set your credentials.

duplicati step 2

Click Test connection to make sure Duplicati can reach your Azure container.

duplicati step 2 test

Select the files you want to backup.

duplicati step 3

Schedule your backups. For me, monthly is enough.

duplicati step 4

Duplicati will not copy your files one by one but use "volumes". To select the size of each block, read this documentation. Smaller means more transactions but better de duplication. Bigger means less transactions but less optimized de duplication. If you have the bandwith, go for higher chunks. 1 Gbyte seems to be a good value for me. More is not good, takes too much resources.

You can also set a retention, for me it's 6 months.

duplicati step 5

Et voila, just run your backup now!

Pricing considerations

It is not easy to estimate monthly charges. It depends not only on used storage, but also on write and read operations. Here is how much I pay:

  • Region: North Europe
  • Chunks: 1 GB
  • Monthly backups
  • Used Storage: 488 GiB
  • Monthly cost: < €5
Fil RSS des articles de ce mot clé