No description
Find a file
Kendall Garner 55730514ea
feat(server): provide native backup/restore mechanism (#3194)
* [enhancement]: Provide native backup/restore mechanism

- db.go: add Backup/Restore functions that utilize Sqlite's built-in online backup mechanism
- support automatic backup with schedule, limit number of files
- provide commands to manually backup/restore Navidrome

Notes:
`Step(-1)` results in a read-only lock being held for the entire duration of the backup.
This will block out any other write operation (and may hold additional locks.
An alternate implementation that doesn't block but instead retries is available at https://www.sqlite.org/backup.html#:~:text=of%20a%20Running-,database,-%2F*%0A**%20Perform%20an%20online (easily adaptable to go), but has the potential problem of continually getting restarted by background writes.

Additionally, the restore should still only be called when Navidrome is offline, as the restore process does not run migrations that are missing.

* remove empty line

* add more granular backup schedule

* do not remove files when bypass is set

* move prune

* refactor: small nitpicks

* change commands and flags

* tests, return path from backup

* refactor: small nitpicks

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2024-10-01 19:58:54 -04:00
.devcontainer Update dev container to use Go 1.23 and customizations object (#3228) 2024-09-01 22:22:32 -04:00
.github feat: Windows MSI installer and service support (#3125) 2024-10-01 19:40:53 -04:00
cmd feat(server): provide native backup/restore mechanism (#3194) 2024-10-01 19:58:54 -04:00
conf feat(server): provide native backup/restore mechanism (#3194) 2024-10-01 19:58:54 -04:00
consts Optimize SQLite3 access. Mainly separate read access from write access. 2024-05-21 17:19:41 -04:00
contrib Fix typo in comment (#2974) 2024-04-26 17:59:39 -04:00
core fix(server): preserve m3u file order on import (#3314) 2024-09-27 16:05:12 -04:00
db feat(server): provide native backup/restore mechanism (#3194) 2024-10-01 19:58:54 -04:00
git Remove tools.go 2023-11-27 14:06:00 -05:00
log Fix lint errors 2024-08-21 12:15:25 -04:00
model fix(scanner): improve M3U playlist import times (#2706) 2024-09-18 20:12:12 -04:00
persistence refactor(server): replace RangeByChunks with Go 1.23 iterators (#3292) 2024-09-22 11:47:10 -04:00
resources fix(ui): update Hungarian translation (#3346) 2024-10-01 14:13:15 -04:00
scanner fix(scanner): make activity panel update rate configurable 2024-09-30 12:06:23 -04:00
scheduler Simplify Singleton usage by leveraging Go 1.18's generics 2022-07-27 12:15:05 -04:00
server feat(ui): show user's lastAccess (#3342) 2024-09-30 20:46:10 -04:00
tests feat(ui): show user's lastAccess (#3342) 2024-09-30 20:46:10 -04:00
ui fix(test): vitest was hanging due to vite-plugin-eslint plugin 2024-10-01 17:12:54 -04:00
utils refactor(server): replace RangeByChunks with Go 1.23 iterators (#3292) 2024-09-22 11:47:10 -04:00
wix feat: Windows MSI installer and service support (#3125) 2024-10-01 19:40:53 -04:00
.dockerignore Remove dependency of go-bindata (#818) 2021-03-12 11:06:51 -05:00
.git-blame-ignore-revs Move project to Navidrome GitHub organization 2021-02-06 21:47:19 -05:00
.gitignore Replace beego/orm with dbx (#2693) 2023-12-09 13:52:17 -05:00
.golangci.yml Remove potential integer overflow conversion uint64 -> int64 2024-08-22 19:28:22 -04:00
.goreleaser.yml build(ci): change GitHub release notes (#3300) 2024-09-21 17:00:13 -04:00
.nvmrc Upgrade to Go 1.22 and Node v20 (#2861) 2024-02-16 20:29:16 -05:00
CODE_OF_CONDUCT.md Use Contributor Covenant v2.0 2020-07-21 14:40:21 -04:00
CONTRIBUTING.md build(ci): change GitHub release notes (#3300) 2024-09-21 17:00:13 -04:00
go.mod feat: Windows MSI installer and service support (#3125) 2024-10-01 19:40:53 -04:00
go.sum feat: Windows MSI installer and service support (#3125) 2024-10-01 19:40:53 -04:00
LICENSE Change license to GPLv3 2020-01-22 14:48:38 -05:00
main.go Fix lint 2023-03-15 13:10:14 -04:00
Makefile build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
Procfile.dev Remove some tools from dependencies, reducing the modules dependencies 2023-03-30 15:33:47 -04:00
README.md chore: add poeditor logo to readme (#3329) 2024-09-30 13:25:03 -04:00
reflex.conf Fix migration package name mismatch 2024-05-08 19:54:48 -04:00

Navidrome logo

Navidrome Music Server  Tweet

Last Release Build Downloads Docker Pulls Dev Chat Subreddit Contributor Covenant

Navidrome is an open source web-based music collection server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device. It's like your personal Spotify!

Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in order to get a stable set of binaries.

Check out our Live Demo!

Any feedback is welcome! If you need/want a new feature, find a bug or think of any way to improve Navidrome, please file a GitHub issue or join the discussion in our Subreddit. If you want to contribute to the project in any other way (ui/backend dev, translations, themes), please join the chat in our Discord server.

Installation

See instructions on the project's website

Cloud Hosting

PikaPods has partnered with us to offer you an officially supported, cloud-hosted solution. A share of the revenue helps fund the development of Navidrome at no additional cost for you.

PikaPods

Features

  • Handles very large music collections
  • Streams virtually any audio format available
  • Reads and uses all your beautifully curated metadata
  • Great support for compilations (Various Artists albums) and box sets (multi-disc albums)
  • Multi-user, each user has their own play counts, playlists, favourites, etc...
  • Very low resource usage
  • Multi-platform, runs on macOS, Linux and Windows. Docker images are also provided
  • Ready to use binaries for all major platforms, including Raspberry Pi
  • Automatically monitors your library for changes, importing new files and reloading new metadata
  • Themeable, modern and responsive Web interface based on Material UI
  • Compatible with all Subsonic/Madsonic/Airsonic clients
  • Transcoding on the fly. Can be set per user/player. Opus encoding is supported
  • Translated to various languages

Translations

Navidrome uses POEditor for translations, and we are always looking for more contributors

Documentation

All documentation can be found in the project's website: https://www.navidrome.org/docs. Here are some useful direct links:

Screenshots