[Bug]: Dont seem to be able to run backups #689

Closed
opened 2026-04-24 23:17:05 +02:00 by adam · 11 comments
Owner

Originally created by @barelylit on GitHub (Oct 12, 2022).

Describe the issue

Click to run a backup, and it fails.

[2022-10-12 10:20:43] INFO: [BackupManager] Running Backup
[2022-10-12 10:22:30] ERROR: [BackupManager] Archiver is too large - aborting to prevent endless loop, Bytes Processed: 3000080641
[2022-10-12 10:22:30] ERROR: [BackupManager] Failed to remove backup [Error: EIO: i/o error, unlink '/metadata/backups/2022-10-12T1014.audiobookshelf'] {
errno: -5,
code: 'EIO',
syscall: 'unlink',
path: '/metadata/backups/2022-10-12T1014.audiobookshelf'
}
[2022-10-12 10:22:30] INFO: [BackupManager] 431216205 total bytes
[2022-10-12 10:22:30] ERROR: [BackupManager] Backup Failed Backup too large

Failed at 1gb max, so changed it to 3gb max, still the same. Surely it shouldnt be much more than that, i only have 400 items in library?

Steps to reproduce the issue

  1. Click backup
  2. Fails

Audiobookshelf version

v2.2.1

How are you running audiobookshelf?

Docker

Originally created by @barelylit on GitHub (Oct 12, 2022). ### Describe the issue Click to run a backup, and it fails. [2022-10-12 10:20:43] INFO: [BackupManager] Running Backup [2022-10-12 10:22:30] ERROR: [BackupManager] Archiver is too large - aborting to prevent endless loop, Bytes Processed: 3000080641 [2022-10-12 10:22:30] ERROR: [BackupManager] Failed to remove backup [Error: EIO: i/o error, unlink '/metadata/backups/2022-10-12T1014.audiobookshelf'] { errno: -5, code: 'EIO', syscall: 'unlink', path: '/metadata/backups/2022-10-12T1014.audiobookshelf' } [2022-10-12 10:22:30] INFO: [BackupManager] 431216205 total bytes [2022-10-12 10:22:30] ERROR: [BackupManager] Backup Failed Backup too large Failed at 1gb max, so changed it to 3gb max, still the same. Surely it shouldnt be much more than that, i only have 400 items in library? ### Steps to reproduce the issue 1. Click backup 2. Fails ### Audiobookshelf version v2.2.1 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:17:05 +02:00
adam closed this issue 2026-04-24 23:17:05 +02:00
Author
Owner

@advplyr commented on GitHub (Oct 21, 2022):

Are your /config and /metadata volumes mapped to separate folders?
They shouldn't be inside of each other. Also, check the size of the /config folder on your file system and also check the size of /metadata/items and /metadata/authors

@advplyr commented on GitHub (Oct 21, 2022): Are your `/config` and `/metadata` volumes mapped to separate folders? They shouldn't be inside of each other. Also, check the size of the `/config` folder on your file system and also check the size of `/metadata/items` and `/metadata/authors`
Author
Owner

@barelylit commented on GitHub (Oct 21, 2022):

image

@barelylit commented on GitHub (Oct 21, 2022): ![image](https://user-images.githubusercontent.com/101836977/197262620-cc4d788c-8701-419a-b807-990306437ec6.png)
Author
Owner

@barelylit commented on GitHub (Oct 21, 2022):

Yeah, mapped to different folders:

z:\docker\audiobookshelf\config
z:\docker\audiobookshelf\metadata

@barelylit commented on GitHub (Oct 21, 2022): Yeah, mapped to different folders: z:\docker\audiobookshelf\config z:\docker\audiobookshelf\metadata
Author
Owner

@advplyr commented on GitHub (Oct 21, 2022):

What is inside that /config/sessions/tmp folder that could be so large?

The tmp folders should all be empty, they are used temporarily when saving to the db.

The solution is to shut down your server and delete that tmp folder. It is safe to delete and will be recreated again when you start the server. Before you do that though you should see what is inside there.

@advplyr commented on GitHub (Oct 21, 2022): What is inside that `/config/sessions/tmp` folder that could be so large? The tmp folders should all be empty, they are used temporarily when saving to the db. The solution is to shut down your server and delete that tmp folder. It is safe to delete and will be recreated again when you start the server. Before you do that though you should see what is inside there.
Author
Owner

@barelylit commented on GitHub (Oct 22, 2022):

123,000 temp files

image

@barelylit commented on GitHub (Oct 22, 2022): 123,000 temp files ![image](https://user-images.githubusercontent.com/101836977/197326984-b6f75c2c-1b43-4cce-8497-681c86a4c2bc.png)
Author
Owner

@barelylit commented on GitHub (Oct 22, 2022):

Removed those files, started back up, tried to run a backup - 15 mins later, still no backup

2022-10-22 07:44:38 INFO [Server] Socket Connected boIZHtMc1DjD2rcoAAAB
2022-10-22 07:44:45 INFO [Watcher] "Joey" Ready
2022-10-22 07:44:56 INFO [Watcher] "Main" Ready
2022-10-22 07:46:25 INFO [BackupManager] Running Backup
2022-10-22 07:46:28 INFO [Server] Socket Connected bszPoWeG4ZcVqJiwAAAD
2022-10-22 08:00:10 INFO [Server] Socket bszPoWeG4ZcVqJiwAAAD disconnected from client "root" after 822204ms (Reason: transport close)
2022-10-22 08:00:11 INFO [Server] Socket Connected XUNkax6Wppvz0-joAAAF

@barelylit commented on GitHub (Oct 22, 2022): Removed those files, started back up, tried to run a backup - 15 mins later, still no backup 2022-10-22 07:44:38 INFO [Server] Socket Connected boIZHtMc1DjD2rcoAAAB 2022-10-22 07:44:45 INFO [Watcher] "Joey" Ready 2022-10-22 07:44:56 INFO [Watcher] "Main" Ready 2022-10-22 07:46:25 INFO [BackupManager] Running Backup 2022-10-22 07:46:28 INFO [Server] Socket Connected bszPoWeG4ZcVqJiwAAAD 2022-10-22 08:00:10 INFO [Server] Socket bszPoWeG4ZcVqJiwAAAD disconnected from client "root" after 822204ms (Reason: transport close) 2022-10-22 08:00:11 INFO [Server] Socket Connected XUNkax6Wppvz0-joAAAF
Author
Owner

@barelylit commented on GitHub (Oct 22, 2022):

Turned on Debug

2022-10-22 08:02:48 DEBUG [DB] Updated user: 1
2022-10-22 08:02:51 INFO [BackupManager] Running Backup
2022-10-22 08:02:51 DEBUG [BackupManager] Backing up Metadata Items "/metadata/items"
2022-10-22 08:02:51 DEBUG [BackupManager] Backing up Metadata Authors "/metadata/authors"
2022-10-22 08:03:31 ERROR [BackupManager] Archiver is too large - aborting to prevent endless loop, Bytes Processed: 3000003973
2022-10-22 08:03:31 DEBUG [BackupManager] Removing Backup "/metadata/backups/2022-10-22T0746.audiobookshelf"
2022-10-22 08:03:31 DEBUG Write Stream Error Backup too large
2022-10-22 08:03:31 INFO [BackupManager] 451112666 total bytes
2022-10-22 08:03:31 ERROR [BackupManager] Backup Failed Backup too large
2022-10-22 08:03:31 ERROR [BackupManager] Failed to remove backup Error: EIO: i/o error, unlink '/metadata/backups/2022-10-22T0746.audiobookshelf'

@barelylit commented on GitHub (Oct 22, 2022): Turned on Debug 2022-10-22 08:02:48 DEBUG [DB] Updated user: 1 2022-10-22 08:02:51 INFO [BackupManager] Running Backup 2022-10-22 08:02:51 DEBUG [BackupManager] Backing up Metadata Items "/metadata/items" 2022-10-22 08:02:51 DEBUG [BackupManager] Backing up Metadata Authors "/metadata/authors" 2022-10-22 08:03:31 ERROR [BackupManager] Archiver is too large - aborting to prevent endless loop, Bytes Processed: 3000003973 2022-10-22 08:03:31 DEBUG [BackupManager] Removing Backup "/metadata/backups/2022-10-22T0746.audiobookshelf" 2022-10-22 08:03:31 DEBUG Write Stream Error Backup too large 2022-10-22 08:03:31 INFO [BackupManager] 451112666 total bytes 2022-10-22 08:03:31 ERROR [BackupManager] Backup Failed Backup too large 2022-10-22 08:03:31 ERROR [BackupManager] Failed to remove backup Error: EIO: i/o error, unlink '/metadata/backups/2022-10-22T0746.audiobookshelf'
Author
Owner

@advplyr commented on GitHub (Oct 22, 2022):

For every folder inside /config/ delete the tmp folder. It seems like your file system is not allowing abs to delete those files so they are staying around.

@advplyr commented on GitHub (Oct 22, 2022): For every folder inside `/config/` delete the tmp folder. It seems like your file system is not allowing abs to delete those files so they are staying around.
Author
Owner

@barelylit commented on GitHub (Oct 22, 2022):

image

That sorted it. I have it set to do a backup every Monday at 1am, so ill just set a batch file to empty out those tmp dirs 1 hour prior.

@barelylit commented on GitHub (Oct 22, 2022): ![image](https://user-images.githubusercontent.com/101836977/197333328-c95d625d-9103-49f0-8769-741f9320401c.png) That sorted it. I have it set to do a backup every Monday at 1am, so ill just set a batch file to empty out those tmp dirs 1 hour prior.
Author
Owner

@advplyr commented on GitHub (Oct 22, 2022):

You are probably getting errors about failing to delete those tmp files. That is a separate issue though and might have to do with permissions or your file system.

@advplyr commented on GitHub (Oct 22, 2022): You are probably getting errors about failing to delete those tmp files. That is a separate issue though and might have to do with permissions or your file system.
Author
Owner

@barelylit commented on GitHub (Oct 22, 2022):

It quite probably is, im happy for this issue to be closed and consider its an issue with my system, i have a fairly unusual setup

@barelylit commented on GitHub (Oct 22, 2022): It quite probably is, im happy for this issue to be closed and consider its an issue with my system, i have a fairly unusual setup
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#689