DirectAdmin has one backup format and three places to use it. An administrator backs up every account from Admin Backup/Transfer, a reseller backs up their own users, and a user backs up their own site. All three produce the same per-user tar.gz, which any DirectAdmin server can restore. This post sets up the admin schedule, shows what a restore looks like, and covers the 1.709 change that catches people who relied on the old system backup.
What a DirectAdmin backup contains
Each user is a single file, user.admin.bob.tar.gz for a user bob created by admin, containing the user's panel configuration, domains with their document roots, email accounts and mailboxes, databases as SQL dumps, DNS zones, SSL certificates, cron jobs and FTP accounts. Restoring it on another server recreates the account with all of that in place, which is why it is the standard way to move users between DirectAdmin servers.
Admin Backup/Transfer
Open Admin Level → Server Manager → Admin Backup/Transfer and click Create Backup. The wizard has four steps.
Who. All users, selected users, or all users of selected resellers. Everyone is what a nightly schedule wants; selected users is for a one-off before a risky change.
When. Now, or on a cron schedule using the five standard fields. 0 2 * * * runs at 02:00 every day. Pick a time when the server is idle, because compressing every account takes a while and competes with traffic.
Where. A local path, which defaults to /home/admin/admin_backups, or an FTP or SFTP destination with host, user, password, port and remote path. Remote is the point: a backup on the same disk as the data protects against a deleted file, not a dead disk. SFTP is preferable to FTP because credentials and data travel encrypted.
What. All data, or a selection of the parts listed above. Leave it on everything unless disk space forces a choice.
Save the schedule and it appears in the list on the same page. A Message System notice arrives when each run finishes, with any errors. Read those messages; the user whose backup fails every night is the one who will need restoring.
The panel does not rotate old backups: each user's file is overwritten on every run, so you have exactly one copy. If you want yesterday and last week too, that is what the post-backup script below is for.
Restore, on this server or another
On the same page, Restore Backup lists the files in the backup path. Tick the users, choose how to handle IPs, and go.
The IP choice is the one to think about. Restoring on the same server, keep the user's original IP. Restoring on a different server, choose the new server's shared IP or the specific IP you want the user on, because the backup contains the old address. DNS zones are rewritten to the chosen IP as part of the restore.
To move a user from server A to server B: back up on A, copy the file to /home/admin/admin_backups/ on B, restore on B with B's IP, change the domain's DNS to B, and only then remove the user from A. Let's Encrypt certificates come across in the backup but want renewing under the new server's ACME account; run the request once from the domain's SSL page.
Restoring over an existing user replaces the account's data with the backup's, which is what you want after an accident and not what you want if the backup is a week old and the user has been working since. Restore to a test user first when in doubt.
Reseller and user level
A reseller has Reseller Level → Account Manager → Manage User Backups, which is Admin Backup/Transfer restricted to their own users, with the same options. The files land in /home/<reseller>/user_backups/.
A user has Account Manager → Backup/Restore at User Level. Create Backup picks what to include and produces the same tar.gz under /home/<user>/backups/, downloadable from the same page or by FTP. It is what to tell a customer to run before they upgrade something. Restore on the same page picks a file from that directory and lets them choose which parts to put back.
The 1.709 system backup change
Before 1.709, sysbk backed up system files and could be configured to include user data. In 1.709 it is replaced by a bundled DirectAdmin script that backs up only global system files, plus the da_roundcube database. User home directories and user databases are not in it. If your disaster plan was "sysbk covers everything", it now covers server configuration only, and the Admin Backup/Transfer schedule above is where user data must come from. You need both: the system backup gets a rebuilt server to the same configuration, the user backups put the accounts on it.
Offsite with rclone
The panel has no S3 or Backblaze destination, but it runs /usr/local/directadmin/scripts/custom/user_backup_post.sh after each user's file is written, with the path in the file variable. Install rclone, configure a remote called offsite, and:
#!/bin/bash
# /usr/local/directadmin/scripts/custom/user_backup_post.sh
day=$(date +%A)
rclone copy "$file" "offsite:da-backups/$day/" --quiet
exit 0Make it executable and owned by root. The $day directory gives seven rotating copies for free, and the same hook is where you would encrypt the file with rclone crypt or gpg before it leaves.
Test a restore
A backup that has never been restored is a hope, not a plan. Once a quarter, restore one user's file to a spare VPS or a renamed test account, log in as that user and open the site with a hosts-file entry. If the site loads and the mailboxes list their messages, the backups work.
On a VPSPioneer managed VPS with DirectAdmin, we configure the Admin Backup/Transfer schedule to an offsite destination as part of the setup and check that the nightly messages are clean.