Backup file error

Pens

Verified User
Joined
Jan 1, 2024
Messages
42
I'm looking to move everything to a new server and as a start have tried to make a backup of the old server.

I create a backup using the Admin Backup/Transfer, Site Backup, with everything ticked
I creates a backup, in this case, 'backup-Oct-20-2025-2.tar.zst',
I've downloaded it but when I try to extract it I get

A folder Backup is created which looks as it contains everything except the {domain}/email/data/imap folder is empty.

Am I missing something that needs the imap data backed up?

Screenshot from 2025-10-20 21-36-22.png
 
I creates a backup, in this case, 'backup-Oct-20-2025-2.tar.zst',
That is not an admin backup/tranfer, that is a user backup. This can only be made at user level and you should restore that at user level.
When using admin backup/transfer then a backup is made called something like user.admin.accountname.tar.zst for example.

Still odd, as both the admin backup/transfer backups and the userlevel backups should contain the imap folders when everything works in good order.
Question is if the backup succeeded as it gives an error, which is something a bit better clue and more to the point than "imap folder is empty". Because the latter is most likely caused by the error.

First decide if you want to use admin backup/transfer or user backup. If you have multiple accounts I would suggest to use the admin backup/transfer method.
Since you have an issue, first make the backup then check the backup after it's made, for example look into the archive with Midnight Commander.
Also check your system message is they report the backup is made correctly.

Be aware to have enough free space to create the backups too.
 
Hi Richard

Thanks,

I am doing it from admin and the backup contains all the domains but it is putting the backup file in /home/admin/backups not /home/admin/admin_backups.

I do get the email "A new message or response with subject:
Your backups are now ready
has arrived for you to view.
Follow this link to view it:"

It is possible I'm running out of disk space but shouldn't DirectAdmin put up an error to say so?
Regards

Nick
 
but it is putting the backup file in /home/admin/backups not /home/admin/admin_backups
Oke 2 things, you can define the destination forum yourself. So it might be set to /home/admin/backups but then you best change that to /home/admin/admin_backups again.
However, this does not change the fact that the filename you were showing is a user backup and not an admin backup/transfer backup.

You should check this first.

but shouldn't DirectAdmin put up an error to say so?
Normally yes. But it can happen. However, if you're running out of disk space, you might want to free some space first to be sure and then use the remote backup option, than backups are transferred instantly to the remote server. It should get into the remote servers /home/admin/admin_backup folder.

Another option is to for example not backup all accounts at once, but for example the first 5 accounts then the next and so on.

And a 3rd option is to only tick account and website stuff and backup and restore mail stuff seperately via rsync for example.

Other option, backup and restore admin first and the biggest account. After restore, remove that account but keep the backup on the remote server. This way you have some free space again and you can work further.
 
Oke 2 things, you can define the destination forum yourself. So it might be set to /home/admin/backups but then you best change that to /home/admin/admin_backups again.
OK, do you know where I change that?
Another option is to for example not backup all accounts at once, but for example the first 5 accounts then the next and so on.
I've just backed up one domain and again no imap (or public_html), same extract error.
The backup-options.list shows
autoresponder
database
database_data
database_data_aware
dns
domain
email
email_data
email_data_aware
emailsettings
forwarder
ftp
ftpsettings
list
subdomain
trash
trash_aware
vacation
And a 3rd option is to only tick account and website stuff and backup and restore mail stuff seperately via rsync for example.
I hate rsync :-(
Other option, backup and restore admin first and the biggest account. After restore, remove that account but keep the backup on the remote server. This way you have some free space again and you can work further.
I haven't set up the new server yet.

I have 17Gb spare and the home/admin directory is 8.1Gb the home/admin/imap directory is 763Mb

Thanks again

Nick
 
OK, do you know where I change that?
Yes on the admin/backup transfer page where you can put if you want ftp or local backup you can also put the destination.
Again a usefull option which can not be find easily in Evo. One of the reasons I really dislike the Evo skin. I couldn't find it that quickly otherwise I would have provide you with a screenshot.

Just change to Enhanced skin, use admin/backup transfer there and change the path. :)
You can change back to Evo afterwards.

I've just backed up one domain and again no imap (or public_html), same extract error.
1.) Was it a correct admin backup/transfer backup filename like I have shown before?
2.) Did you test with MC after creating the backup if it was fine?

I hate rsync :-(
It's fairly easy, I can you provide with a line I always use. I just note these things in a notepad file and save them for when I need them.
But the backups should be fine first anyway.

I have 17Gb spare and the home/admin directory is 8.1Gb the home/admin/imap directory is 763Mb
Hmmz.. 17 GB spare with 8.1 GB content is not that much, might be even too little.
Can't you remove some files or transfer them with FTP to another location like your pc or something like that?

Or otherwise, download the backup to your pc and extract there. Easy enough with winrar or 7zip. Then check if there also is an error.
If not, then the extraction takes too many space on your server and backup is fine.
 
One of the reasons I really dislike the Evo skin. I couldn't find it that quickly otherwise I would have provide you with a screenshot.
Thanks, changed to the old skin and found it.
1.) Was it a correct admin backup/transfer backup filename like I have shown before?
Yes
2.) Did you test with MC after creating the backup if it was fine?
No, just downloaded it, untared it and had a look
It's fairly easy, I can you provide with a line I always use. I just note these things in a notepad file and save them for when I need them.
But the backups should be fine first anyway.
Thanks
Hmmz.. 17 GB spare with 8.1 GB content is not that much, might be even too little.
Can't you remove some files or transfer them with FTP to another location like your pc or something like that?
That's the next step.
Or otherwise, download the backup to your pc and extract there. Easy enough with winrar or 7zip. Then check if there also is an error.
If not, then the extraction takes too many space on your server and backup is fine.
That's what I have been doing.

I have done a backup/transfer from the old skin with the same result.

I have also done a system backup which has downloaded everything including all the imap and public_html directories and files but guess it's a matter of uploading them to the new server directory at a time.

Screenshot from 2025-10-21 15-09-43.png


Nick
 
I have done a backup/transfer from the old skin with the same result.
Oke then you might need to do the next step, move and remove some files first and then create a single backup and see if that is ok then or still have errors.
If yes, we need to investigate further. Maybe @zEitEr also has some idea's about the cause of the errors otherwise.
 
I've tried a admin backup/transfer with just the email settings, again nothing in the imap folders
Nick
Screenshot from 2025-10-21 15-26-50.png
 
I don't like the old skin, I run my servers with the Evo skin. So much easier on the eye I find, but I guess its down to personal preference.

Regards your backup, the imap folders should be populated if you select everything. If I run through how I do i it, maybe compare and see if you've missed anything?

There are 2 admin backup setups in the admin panel btw, one for all the users, accounts etc, and the other backup is for the server itself and you can configure that to transfer things across like apps and settings.

On mine it looks like this


1761059551244.png


Step 1

1761059587400.png


Step 2

1761059625931.png


Step 3
1761059704277.png

(Can also have it sent direct over FTP)

1761059744399.png


And What (Can always slecet All Data like I do)

1761059785892.png


When done, they are all in the /home/<admin_dir>/admin_backups

1761059868522.png


And your emails should all be in the xxxx.tar /imap/domain_name/email_acct/Maildir/

1761060019244.png


Archives are ready to go across to storage or a new server.
 
Directadmin also has a System Backup feature that is quite handy. This will back up any files you select from anywhere on the server, and all the important stuff like HTTPS Data, DNS Data and MySQL along with the custom bits. Very handy for copying across system settings for apps, such as CSF, blocklists etc. Might be worth your time taking a look if it may save you a few hours setting up new server in the image of your retiring one.
 
So much easier on the eye I find, but I guess its down to personal preference.
Right, because as you could read, changing the backup folder in Evo is not very clear. In Enhanced you see it at once. In Evo you have to push buttons again to find things. Less clear overview.
That's the reason I advised to (temporarily) change to Enhanced where this is much clearer for this specific case. But yes it's question of taste and maybe used to work with.
I'm doing a lot of things much faster in Evo because they are all in 1 page and don't need to changes pages or tabs or buttons to get there like in Evo skin. But well, that's me. You needed 4 screenshots. I only would have needed 2. :)
The admin backups did not get into the correct folder before.

I've tried a admin backup/transfer with just the email settings, again nothing in the imap folders
In that case. Did you check the folders @DrWizzle pointed to for content?
Where the folders just empty or did you again have an extract error?
If you check via SSH, do the folders have the correct owner and permissions?
 
Directadmin also has a System Backup feature that is quite handy. This will back up any files you select from anywhere on the server, and all the important stuff like HTTPS Data, DNS Data and MySQL along with the custom bits. Very handy for copying across system settings for apps, such as CSF, blocklists etc. Might be worth your time taking a look if it may save you a few hours setting up new server in the image of your retiring one.
Thanks for you help.

I have done a System backup which worked, it seemed a messier way of transferring to a new machine than the 'Admin backup/Transfer.

Nick
 
Hello,

Make sure skip_imap_in_backups=0 option is set in DirectAdmin config
Thanks, there's not a skip_imap line in the directadmin.conf file.

the entries starting with s are:

secure_access_group=access
servername=server.{name}.com
session_minutes=60
ssl=1
system_skin=evolution
system_user_to_virtual_passwd=1

That files doesn't exist

Thanks for your help
 
I don't like the old skin, I run my servers with the Evo skin. So much easier on the eye I find, but I guess its down to personal preference.

Regards your backup, the imap folders should be populated if you select everything. If I run through how I do i it, maybe compare and see if you've missed anything?

There are 2 admin backup setups in the admin panel btw, one for all the users, accounts etc, and the other backup is for the server itself and you can configure that to transfer things across like apps and settings.

On mine it looks like this


View attachment 9371

Step 1

View attachment 9372

Step 2

View attachment 9373

Step 3
View attachment 9374
(Can also have it sent direct over FTP)

View attachment 9375

And What (Can always slecet All Data like I do)

View attachment 9376

When done, they are all in the /home/<admin_dir>/admin_backups

View attachment 9377

And your emails should all be in the xxxx.tar /imap/domain_name/email_acct/Maildir/

View attachment 9378

Archives are ready to go across to storage or a new server.

Thank you, I followed that and still now imap data.

imap.png


I'm awaiting for a temporary serial number from DirectAdmin, so it's a bit academic for now.

Regards

Nick
 
Are you able to manually tar the imap folders for the users? Maybe create a script and get them all compressed at once. Here's a temp workaround if you're able

Create a directory
Bash:
# mkdir /home/[my-admin]/imap_backups/
# cd /home/[my-admin]/imap_backups/
# chown [my-admin]:[my-admin] /home/[my-admin]/imap_backups/
# nano imap-backup.sh

(I've used /home/[my-admin]/imap_backups/ as an example but you could create the script anywhere) This also helps if you want to download from the file manager as the imap compressed folders will be in your admin tree.

Then insert this script. It will search each user directory, and backup every single users imap folder separately to the folder in which the script resides.

Bash:
find /home/ -type d -name "imap" | while read -r dir; do
    parent="$(dirname "$dir")"
    base="$(basename "$parent")"
    tar --zstd -cvf "${base}_imap.tar.zst" -C "$parent" imap
done
chown -R [myadmin]:[myadmin] .

Make it executable and run it.
Bash:
# chmod 700 imap-backup.sh
# ./imap-backup.sh

1761073323112.png


1761073526450.png


Then you can download them and transfer them to your new server, where you can unzip them in the correct user directory.

Maybe this will work?
 
Last edited:
Back
Top