START here

DirectAdmin reseller hosting backup automation

In this article, I’ll explain how to create automated backups of each DirectAdmin user account under one reseller hosting account.
A separate post explains cPanel reseller hosting backup automation.

Table Of Contents (T.O.C.):

  1. Introduction
  2. Requirements
  3. Creating an FTP storage destination directory
  4. Automating DirectAdmin backups
  5. DirectAdmin Backup retention
  6. Conclusion


1. Introduction

I already wrote about how often backups should be made (and how to save them). Since reseller hosting is used for hosting several websites, doing manual backups for each site is tedious and takes time – I prefer having the server do the job.

JetBackup did finally make DirectAdmin integration, but they have also altered the way the backups are saved, so I can’t use those files to check, edit and restore accounts on my own (without the help of a hosting provider with JetBackup installed on their server).

That’s why I was looking for an alternative solution. This solution requires storage that allows FTP connections. I’ve opted for a Hetzner Storage Box – reasonably priced, fast and reliable.

– T.O.C. –


2. Requirements

To make this work, you need a DirectAdmin reseller hosting account, of course. You also need the address of your FTP storage, and its login username and password.

For more details on FTP storage usernames and passwords, see my article about Hetzner Storage Box. Especially chapter 6, where I’ve explained how to create a user sub-account, which we will use for this example (we don’t want to give our hosting server access to the root directory on our storage, as a precaution in case the server gets hacked).

– T.O.C. –


3. Creating an FTP storage destination directory

Using an FTP client, we’ll create a directory called “hosting-backups” on our FTP storage (how to configure FileZilla FTP client).

On the FTP storage, we’ll create a user account that can only access the “hosting-backups” directory (and all its sub-directories, of course). For details see how to create a sub-account on a Hetzner Storage Box.

Write down your FTP storage address, username and password, along with the name of the directory you had created for the backups. In this example that is:

  • FTP storage address: u273500.your-storagebox.de
  • Username: u273500-sub1
  • Password: anything but “admin123” 🙂

– T.O.C. –


4. Automating DirectAdmin backups

Now comes the fun part. With screenshots. Woohoo! 🙂

Log in to your main DirectAdmin reseller hosting account, open the “Manage User Backups” menu and click on the “Schedule backup” button.

DirectAdmin menu for scheduling automated user account backups
DirectAdmin menu for scheduling automated user account backups
Picture 1

Now we get it done in three simple steps. 🙂


Step 1
Choosing which accounts to backup. You can backup all the accounts, choose which ones you wish to backup, or choose which ones you wish to exclude from the bakcups.

Backup all the users, or select particular accounts to include, or exclude from backups
Backup all the users, or select particular accounts to include, or exclude from backups
Picture 2


Step 2
Configuring the time when the backups will be created.

Pick "On Schedule" (1) and configure when (2 and 3)
Pick “On Schedule” (1) and configure when (2 and 3)
Picture 3


Step 3
Configuring the backup destination – where to.

Configuring DirectAdmin to send backups to our Hetzner Storage Box FTP storage
Configuring DirectAdmin to send backups to our Hetzner Storage Box FTP storage
Picture 4

I’ll explain point 5 in picture 4 in the next chapter – it’s important.

– T.O.C. –


5. DirectAdmin Backup retention

Every time DirectAdmin backs up a user, it creates a file in this format: “username.tar.zst”.

In our example, that could be “bikegremlin.tar.zst”. If I have more accounts, there would be more files, like “4rooms.tar.zst”, “sportswiser.tar.zst” and so on.

New backups will overwrite the old ones because filenames aren’t changed unless we configure that. How do we do that?

Under point (5) in picture 4, I set “Append” option to add “Week of Month” to the destination path. This results in backups run in the first week of September overwriting any backups created in the first week of August (or any time before that) – but not any backups run on 2nd or 3rd week of a month.

Effectively, I’ve configured backups to be kept for the last 5 weeks (one month). I’ve also configured them to be run once a week, but that’s not important for this chapter. Here’s what that looks like in our example:

DirectAdmin backup retention
Automating DirectAdmin backup retention
Picture 5

What if I wanted to keep backups for one year? I could set the “Append” to add the month of the year, instead of the week of a month. With one note:

With that setup, even if you run backups weekly or daily, every month will only contain the latest backup run in that month. Because the newest backup run in a month overwrites the backups previously created in that same month.

So, if you wish to keep backups for the last year, but also keep several more recent ones, you could configure two backup jobs:

  • One job run on say Tuesdays, that Appends “Week of Month” to the destination path (as we did in this example).
  • Another job that runs on say every 5th of a month and Appends “Month” to the destination path.
  • Alternative: instead of the weekly backups, you could configure daily backups that Append “Day of Week” to the destination path. That way you’ll have the last 7 daily backups, in addition to the last 12 monthly backups (if you configure the monthly backups as explained in the point above).
The available DirectAdmin destination path Append options, useful for organizing backup retention
The available DirectAdmin destination path Append options, useful for organizing backup retention
Picture 6

I like combining weekly with monthly backups, relying on a reliable hosting provider for daily backups, except for websites where losing even one hour of work could be a big problem.

– T.O.C. –


6. Conclusion

Even the best, most expensive hosting providers have had (and will have) their systems fail (why every website will be hacked). Backups are a way to minimize the damage when (not if) that happens.

Automating backups saves you time and hassle.

– T.O.C. –

2 thoughts on “DirectAdmin reseller hosting backup automation”

  1. Hello, I have checked your article it is very good. I have signed up for the Hetzner account and even I have submitted my local id but their verification failed. Can you guide me?

    • Hi Santosh,

      I’m just another customer – so don’t know how to help you with this problem.
      It would probably make sense to contact their support and see if you can sort it out.

Comments are closed.


Please use the BikeGremlin.net forum for any comments or questions.

If you've found any errors or lacking information in the article(s) - please let me know by commenting on the BikeGremlin forum.
You can comment anonymously (by registering with any name/nickname), but I think it is good to publicly document all the article additions (and especially corrections) - even if their author chooses to remain anonymous.

Skip to content