Huge file size of Audiobookshelf automatic backup file #51

Closed
opened 2026-04-24 22:57:11 +02:00 by adam · 15 comments
Owner

Originally created by @scorpio862 on GitHub (Oct 10, 2021).

I tried new Backup feature yesterday and I setup AudioBookshelf server to create auto backups every day.
When I woke up this morning I noticed that my Cache drive on Unraid is 100% full and something just used almost 500GB of space.

It was new automatic backup file of Audiobooshelf. It took 486GB of space and it would probably take more if there was more available on the disk.

image

Originally created by @scorpio862 on GitHub (Oct 10, 2021). I tried new Backup feature yesterday and I setup AudioBookshelf server to create auto backups every day. When I woke up this morning I noticed that my Cache drive on Unraid is 100% full and something just used almost 500GB of space. It was new automatic backup file of Audiobooshelf. It took 486GB of space and it would probably take more if there was more available on the disk. ![image](https://user-images.githubusercontent.com/50056988/136690579-cf824669-425d-4cdf-9b08-e86c69d20e1b.png)
adam closed this issue 2026-04-24 22:57:11 +02:00
Author
Owner

@advplyr commented on GitHub (Oct 10, 2021):

Wow, no clue how that is possible. Did you delete it yet? It is just a zip file, change the extension to .zip and open it up, I'm curious what is in there.

@advplyr commented on GitHub (Oct 10, 2021): Wow, no clue how that is possible. Did you delete it yet? It is just a zip file, change the extension to `.zip` and open it up, I'm curious what is in there.
Author
Owner

@advplyr commented on GitHub (Oct 10, 2021):

It is zipping the /metadata/books and the entire /config directories. Can you check the size of these directories? Maybe you are storing other things in there?

@advplyr commented on GitHub (Oct 10, 2021): It is zipping the `/metadata/books` and the entire `/config` directories. Can you check the size of these directories? Maybe you are storing other things in there?
Author
Owner

@scorpio862 commented on GitHub (Oct 10, 2021):

Yesterday, I created a backup manually and it was only 276MB.
The size of my /config folder (without Backups) is at the moment 670MB.
I don't have anything else in the /config folder, only what AudioBookshelf server creates.

I didn't delete the file. After reneming to .zip file, when I try to open it I get the error message "Unexpected end of archive".
All my docker containers crashed when my Cache drive run out of space so I'm guessing that the archive was never finished building.

@scorpio862 commented on GitHub (Oct 10, 2021): Yesterday, I created a backup manually and it was only 276MB. The size of my /config folder (without Backups) is at the moment 670MB. I don't have anything else in the /config folder, only what AudioBookshelf server creates. I didn't delete the file. After reneming to .zip file, when I try to open it I get the error message "Unexpected end of archive". All my docker containers crashed when my Cache drive run out of space so I'm guessing that the archive was never finished building.
Author
Owner

@scorpio862 commented on GitHub (Oct 10, 2021):

I just noticed you added Backup folder to be backed up as well :) maybe this is the problem

@scorpio862 commented on GitHub (Oct 10, 2021): I just noticed you added Backup folder to be backed up as well :) maybe this is the problem
Author
Owner

@scorpio862 commented on GitHub (Oct 10, 2021):

Manual backup from yesterday contains itself :)
When I changed the yesterday's manual backup (named 2021-10-09T1747.audiobookshelf) to zip file I noticed that this archive contains a backup folder with 2021-10-09T1747.audiobookshelf file inside.

So maybe this night the backup process got stuck in the loop. I was tryging to archive the backup folder wich was groving all the time so the file size got bigger and bigger.

@scorpio862 commented on GitHub (Oct 10, 2021): Manual backup from yesterday contains itself :) When I changed the yesterday's manual backup (named 2021-10-09T1747.audiobookshelf) to zip file I noticed that this archive contains a backup folder with 2021-10-09T1747.audiobookshelf file inside. So maybe this night the backup process got stuck in the loop. I was tryging to archive the backup folder wich was groving all the time so the file size got bigger and bigger.
Author
Owner

@advplyr commented on GitHub (Oct 10, 2021):

Two folders get zipped, /config and /metadata/books

Maybe you pointed the /metadata and the /config to the same folder?

var metadataBooksPath = Path.join(this.MetadataPath, 'books')
var zipResult = await this.zipBackup(this.ConfigPath, metadataBooksPath)
@advplyr commented on GitHub (Oct 10, 2021): Two folders get zipped, /config and /metadata/books Maybe you pointed the /metadata and the /config to the same folder? ```js var metadataBooksPath = Path.join(this.MetadataPath, 'books') var zipResult = await this.zipBackup(this.ConfigPath, metadataBooksPath) ```
Author
Owner

@scorpio862 commented on GitHub (Oct 10, 2021):

But the folder backups is inside of /config
/config/metadata/backups

The backups should not be backued up

@scorpio862 commented on GitHub (Oct 10, 2021): But the folder backups is inside of /config /config/metadata/backups The backups should not be backued up
Author
Owner

@scorpio862 commented on GitHub (Oct 10, 2021):

You are right. I have metadatata folder mounted inside of config folder

@scorpio862 commented on GitHub (Oct 10, 2021): You are right. I have metadatata folder mounted inside of config folder
Author
Owner

@advplyr commented on GitHub (Oct 10, 2021):

I didn't think about that possibility. I will write something to check for this, but you should change your paths to be separate folders.

@advplyr commented on GitHub (Oct 10, 2021): I didn't think about that possibility. I will write something to check for this, but you should change your paths to be separate folders.
Author
Owner

@scorpio862 commented on GitHub (Oct 10, 2021):

I changed the folder structure, thanks. Now when I create backups, thay have 500KB :)

@scorpio862 commented on GitHub (Oct 10, 2021): I changed the folder structure, thanks. Now when I create backups, thay have 500KB :)
Author
Owner

@advplyr commented on GitHub (Oct 10, 2021):

I added an extra safety step to prevent this from happening to others. If the backup gets bigger than 1GB it will abort. In release v1.4.4

@advplyr commented on GitHub (Oct 10, 2021): I added an extra safety step to prevent this from happening to others. If the backup gets bigger than 1GB it will abort. In release [v1.4.4](https://github.com/advplyr/audiobookshelf/releases/tag/v1.4.4)
Author
Owner

@scorpio862 commented on GitHub (Oct 13, 2021):

The default configuratin on Unraid needs changing as it mounts /metadata folder in the /config folder.

image

@scorpio862 commented on GitHub (Oct 13, 2021): The default configuratin on Unraid needs changing as it mounts /metadata folder in the /config folder. ![image](https://user-images.githubusercontent.com/50056988/137177563-23c78dba-9742-4d2e-b496-da3079ef5b13.png)
Author
Owner

@advplyr commented on GitHub (Oct 13, 2021):

I wonder if this is happening to others as well. It's not the default for me and it is not the default in the unraid template.

@advplyr commented on GitHub (Oct 13, 2021): I wonder if this is happening to others as well. It's not the default for me and it is not the default in the unraid template.
Author
Owner

@scorpio862 commented on GitHub (Oct 13, 2021):

I just tested this on 3 unraid servers at work, where Audiobookshelf was never installed and everywhere /metadata gets mounted to /config by default.

@scorpio862 commented on GitHub (Oct 13, 2021): I just tested this on 3 unraid servers at work, where Audiobookshelf was never installed and everywhere /metadata gets mounted to /config by default.
Author
Owner

@advplyr commented on GitHub (Oct 14, 2021):

I got clarification from Squid of the community app store.

Any path mapping that has the container path set of /config has the host path automatically changed to whatever the user has set in Settings - Docker - Appdata Path with the initial name of the container appended to it.

This will present an issue for basically everyone using the defaults, so this may require the first major release. Thanks for testing that.

@advplyr commented on GitHub (Oct 14, 2021): I got clarification from Squid of the community app store. > Any path mapping that has the container path set of /config has the host path automatically changed to whatever the user has set in Settings - Docker - Appdata Path with the initial name of the container appended to it. This will present an issue for basically everyone using the defaults, so this may require the first major release. Thanks for testing that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#51