[Bug]: Newly initalized servers return invalid backupSchedule data in serverSettings #1748

Open
opened 2026-04-24 23:56:40 +02:00 by adam · 2 comments
Owner

Originally created by @nichwall on GitHub (Feb 20, 2024).

Describe the issue

A new server that has never had automatic backups enabled returns false by default for the backupSchedule field in the response for serverSettings, such as when logging in. Once backups have been enabled, the most recent cron expression is returned regardless of whether automatic backups are enabled.

https://github.com/advplyr/audiobookshelf/blob/24be1a0ec5f4d8199d43be779f5366d4406faff1/client/pages/config/backups.vue#L121

The default initial value is set, just doesn't seem to be used.
https://github.com/advplyr/audiobookshelf/blob/24be1a0ec5f4d8199d43be779f5366d4406faff1/client/pages/config/backups.vue#L146

First noticed on 2.7.2 when updating API docs since false fails the string validation.

Steps to reproduce the issue

  1. Set up a new server and inspect the response of /login without enabling automatic backups

Audiobookshelf version

2.7.2

How are you running audiobookshelf?

Docker

Originally created by @nichwall on GitHub (Feb 20, 2024). ### Describe the issue A new server that has never had automatic backups enabled returns `false` by default for the `backupSchedule` field in the response for `serverSettings`, such as when logging in. Once backups have been enabled, the most recent cron expression is returned regardless of whether automatic backups are enabled. https://github.com/advplyr/audiobookshelf/blob/24be1a0ec5f4d8199d43be779f5366d4406faff1/client/pages/config/backups.vue#L121 The default initial value is set, just doesn't seem to be used. https://github.com/advplyr/audiobookshelf/blob/24be1a0ec5f4d8199d43be779f5366d4406faff1/client/pages/config/backups.vue#L146 First noticed on 2.7.2 when updating API docs since `false` fails the string validation. ### Steps to reproduce the issue 1. Set up a new server and inspect the response of `/login` without enabling automatic backups ### Audiobookshelf version 2.7.2 ### How are you running audiobookshelf? Docker
adam added the bugwaiting labels 2026-04-24 23:56:40 +02:00
Author
Owner

@advplyr commented on GitHub (Dec 21, 2024):

Is this still an issue?

@advplyr commented on GitHub (Dec 21, 2024): Is this still an issue?
Author
Owner

@nichwall commented on GitHub (Dec 21, 2024):

I would need to double check. This was originally opened when I was working on the OpenAPI spec due to what appears to be inconsistent API behavior and I believe nothing has changed here.

I think the API should do one of the following:

  • Always return the cron (or a default cron instead of false before backups are enabled), with an additional field to report whether backups are enabled
  • Always return false or another value when backups are not enabled.

My understanding was that backups are enabled by default when setting up a server, but this makes me think they are not enabled by default. https://github.com/advplyr/audiobookshelf/issues/3731#issuecomment-2551832824

@nichwall commented on GitHub (Dec 21, 2024): I would need to double check. This was originally opened when I was working on the OpenAPI spec due to what appears to be inconsistent API behavior and I believe nothing has changed here. I think the API should do one of the following: - Always return the cron (or a default cron instead of `false` before backups are enabled), with an additional field to report whether backups are enabled - Always return `false` or another value when backups are not enabled. My understanding was that backups are enabled by default when setting up a server, but this makes me think they are not enabled by default. https://github.com/advplyr/audiobookshelf/issues/3731#issuecomment-2551832824
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1748