···10101111## Updating
12121313-Currently, multi-scrobbler does not have any databases or dependencies that require additional interaction when updating.
1313+The majority of Multi-scrobbler updates can be completed without any manual intervention. This is **guaranteed** for [patch version updates](#versioning).
14141515-Any **breaking changes** will be related to [configuration](/configuration) that has been deprecated/changed, or tooling that usually only affects [Local Installations.](/installation#local-installation)
1515+Regardless, it is recommended to consult the [**Github Release Notes**](https://github.com/FoxxMD/multi-scrobbler/releases) before any upgrades. The release notes contain all changelogs as well as most **breaking changes**/notices.
16161717-These changes, and how to update configs accordingly, are detailed in [**Github Release Notes**](https://github.com/FoxxMD/multi-scrobbler/releases). It is recommended to check this page before upgrading [minor or major versions.](#versioning)
1717+The [**Upgrade Path** docs](/configuration/updating/upgrade-path) contain information for upgrading through **required versions** or in-depth migration guides. Check this section before upgrading any [minor versions](#versioning).
1818+1919+### Database
2020+2121+Multi-scrobbler depends on a SQLite database (`ms.db`) that is created on first run and stored in the [`CONFIG_DIR`](/installation/?dockerSetting=storage#recommended-settings).
2222+2323+If any database migrations are required for an update then your database is **automatically backed up** before migration occurs. The backup file is created in the same directory.
2424+2525+You can manually make a backup of this database by making a copy of `ms.db` and any similarly named files like `ms.db-journal`.
2626+2727+:::tip
2828+2929+If upgrading a [minor version](#versioning) you may want to make a backup for extra safety.
3030+3131+:::
3232+3333+### Configuration
3434+3535+[Minor versions](#versioning) may have **breaking changes** related to [configuration](/configuration). Consult the [**Github Release Notes**](https://github.com/FoxxMD/multi-scrobbler/releases) and [Upgrade Paths](/configuration/updating/upgrade-path) before upgrading.
3636+3737+3838+## Update Instructions
3939+4040+Assuming:
4141+4242+* upgrade(s) are only [patch versions](#versioning) and the [Release Notes](https://github.com/FoxxMD/multi-scrobbler/releases) do not contain any other guidance or
4343+* you have checked the release notes, upgrade paths docs, and completed all migration steps for the specific version upgrade
18441945<Tabs groupId="installType" queryString>
2046 <TabItem value="docker-compose" label="Docker Compose">
···11+---
22+sidebar_position: 1
33+title: From < 0.14.0
44+description: Upgrading to 0.14.0
55+---
66+77+import Tabs from '@theme/Tabs';
88+import TabItem from '@theme/TabItem';
99+import CodeBlock from '@theme/CodeBlock';
1010+import RequiredUpgrade from "@site/src/components/snippets/_upgrade-required.mdx"
1111+1212+<RequiredUpgrade before='< 0.14.0' current='0.14.0' old='0.13.2' />
1313+1414+## Source/Client IDs
1515+1616+MS `0.14.0` introduces a database for persisting Plays/Scrobbles, queues, and other data **associated with a Source/Client**.
1717+1818+To make this association atomic a Source/Client **ID** is now configurable. This ID is what MS will use to identify the Source/Client in your **config** with the Source/Client in the **database**.
1919+2020+This ID needs to be unique to the client or source type it is used on IE:
2121+2222+* two [Koito Clients](/configuration/clients/koito/) cannot both have the ID `myKoitoID`
2323+* it is recommended that the ID be *globally* unique among all sources/clients, but it's not required
2424+2525+### Configuring IDs
2626+2727+<Tabs groupId="configType" queryString>
2828+2929+<TabItem value="env" label="ENV">
3030+3131+For each Source/Client in your environmental variables, add a key with the suffix `_ID` and the ID value. EX
3232+3333+```yaml title="compose.yaml"
3434+services:
3535+ multi-scrobbler:
3636+ # ...
3737+ environment:
3838+ - KOTIO_TOKEN=...
3939+ # ...more koito config
4040+ // highlight-start
4141+ - KOITO_ID=myKoitoID
4242+ // highlight-end
4343+4444+ - JELLYFIN_URL=...
4545+ # ...more jellyin config
4646+ // highlight-start
4747+ - JELLYFIN_ID=myJellyfinID
4848+ // highlight-end
4949+```
5050+5151+</TabItem>
5252+<TabItem value="file" label="File">
5353+5454+Add an `id` to the top-level for each Source/Client configuration, next to `data`:
5555+5656+```json title="koito.json"
5757+[
5858+ {
5959+ "name": "koito-source",
6060+ "configureAs": "source",
6161+ // highlight-start
6262+ "id": "myKoitoID",
6363+ // highlight-end
6464+ "data": {
6565+ "token": "029b081ba-9156-4pe7-88e5-3be671f5ea2b",
6666+ "username": "admin",
6767+ "url": "http://192.168.0.100:4110"
6868+ }
6969+ }
7070+]
7171+```
7272+7373+</TabItem>
7474+<TabItem value="aio" label="AIO">
7575+7676+Add an `id` to the top-level for each Source/Client configuration, next to `data`:
7777+7878+```json title="koito.json"
7979+[
8080+ {
8181+ "name": "koito-source",
8282+ "configureAs": "source",
8383+ "type": "koito",
8484+ // highlight-start
8585+ "id": "myKoitoID",
8686+ // highlight-end
8787+ "data": {
8888+ "token": "029b081ba-9156-4pe7-88e5-3be671f5ea2b",
8989+ "username": "admin",
9090+ "url": "http://192.168.0.100:4110"
9191+ }
9292+ }
9393+]
9494+```
9595+9696+</TabItem>
9797+</Tabs>
9898+9999+:::note[Default ID]
100100+101101+If you do not add an ID then Multi-Scrobbler will automatically use the **name** of the Source/Client as the ID. The name is shown in the Dashboard.
102102+103103+If you decide to add an ID later you must use the name as the ID in order to keep Plays/Scobbles associated with the same config.
104104+105105+:::
106106+107107+## Cached Scrobble Migration
108108+109109+:::tip
110110+111111+Before upgrading, if your MS dashboard shows 0 queued/failed for all [Scrobble Clients](/configuration/clients) then you **skip this step** and can safely delete `ms-scrobble.cache` before the upgrade occurs.
112112+113113+:::
114114+115115+MS `0.14.0` introduces a database for persisting Plays/Scrobbles, queues, and other data. Prior to `0.14.0`, queued/failed scrobbles were stored in a cache **file** inside your [`CONFIG_DIR`](/installation/?dockerSetting=storage#recommended-settings) named `ms-scrobble.cache`.
116116+117117+On first run of `0.14.0`:
118118+119119+* MS will make a copy of `ms-scrobble.cache` named `ms-scrobble.cache.bak`
120120+ * You may make a manual copy of this file before upgrading, for additional safety
121121+* Scrobbles in the cache will automatically be migrated to the new database
122122+* The now "old" cache data will be cleared so that subsequent application starts don't duplicate migrations
123123+ * the empty `ms-scrobble.cache` file will remain
124124+125125+You can follow progress of this by looking for log lines starting with `Migrating cached scrobbles to database...`
126126+127127+If MS does not report/log any errors during this time and you see your scrobbles processed normally then it is safe to delete `ms-scrobble.cache` the next time MS is stopped/restarted.
128128+129129+## Cache Configuration
130130+131131+In `0.14.0` [Cache](/configuration/cache) has been simplified with much of the required configuration being removed.
132132+133133+:::tip
134134+135135+This only applies to users who have `cache` in their [AIO Config](configuration/?configType=aio#configuration-types) `config.json` or are using `CACHE_*` [ENV Config](configuration/?configType=env#configuration-types)
136136+137137+If you do not have any of the above [Cache](/configuration/cache) configuration defined then you can **skip this step.**
138138+139139+:::
140140+141141+#### Scrobble Caching Removed
142142+143143+[Scrobble caching has removed and replaced by the new database.](#cached-scrobble-migration)
144144+145145+* Remove any ENV Config starting with `CACHE_SCROBBLE`
146146+* Remove `cache.scrobble` from the AIO Config
147147+148148+#### Metadata Config Simplified
149149+150150+Metadata caching remains the same but the config has been simplified. If you were using [Valkey for caching](/configuration/#secondary-caching) update your config:
151151+152152+<Tabs groupId="configType" queryString>
153153+154154+<TabItem value="env" label="ENV">
155155+156156+* Remove `CACHE_METADATA`
157157+* Rename `CACHE_METADATA_CONN` to [`CACHE_VALKEY`](/configuration/#secondary-caching)
158158+159159+</TabItem>
160160+<TabItem value="aio" label="AIO">
161161+162162+Remove `cache.metadata` and add a new string key `valkey` to the `cache` object, containing your valkey connection string:
163163+164164+```diff
165165+ "cache": {
166166++ "valkey": "redis://valkey:6379"
167167+- "metadata": {
168168+- "provider": "valkey",
169169+- "connection": "redis://valkey:6379"
170170+- }
171171+ }
172172+```
173173+174174+</TabItem>
175175+</Tabs>
176176+177177+178178+#### Auth Config Simplified
179179+180180+Auth caching remains the same but the config has been simplified. The connection option for Auth is no longer configurable. You may specify provider as either `file` (default, uses `CONFIG_DIR`) or `valkey`. If you want to use Valkey for auth it will use the same config as Metadata.
181181+182182+<Tabs groupId="configType" queryString>
183183+184184+<TabItem value="env" label="ENV">
185185+186186+* Remove `CACHE_AUTH_CONN`
187187+* Add [`CACHE_VALKEY`](/configuration/#secondary-caching) (if using valkey)
188188+189189+</TabItem>
190190+<TabItem value="aio" label="AIO">
191191+192192+Remove the `connection` property from the `auth` object. If using `file` the entire `auth` object can be removed.
193193+194194+```diff
195195+ "cache": {
196196++ "valkey": "redis://valkey:6379",
197197+ "auth": {
198198+ "provider": "valkey",
199199+- "connection": "redis://valkey:6379"
200200+ }
201201+ }
202202+```
203203+204204+</TabItem>
205205+</Tabs>
+39
docsite/docs/updating/upgradePath/upgradePath.mdx
···11+---
22+sidebar_position: 1
33+title: Upgrade Path
44+description: Updating Multi-Scrobbler
55+---
66+77+import Tabs from '@theme/Tabs';
88+import TabItem from '@theme/TabItem';
99+import CodeBlock from '@theme/CodeBlock';
1010+1111+The majority of changes are detailed in [**Github Release Notes**](https://github.com/FoxxMD/multi-scrobbler/releases), including *most* breaking changes. You should consult the release notes for each version you will be updating through/to.
1212+1313+Upgrade paths for specific version, detailed here, are reserved for:
1414+1515+<Tabs groupId="upgradeType" queryString>
1616+1717+<TabItem value="required" label="Required Upgrades">
1818+1919+:::warning[Required Upgrade]
2020+2121+Versions you **must** upgrade to **before** upgrading to a newer version. Likely due to the codebase containing functionality to upgrade persistent data that cannot be migrating across multiple versions.
2222+2323+:::
2424+2525+</TabItem>
2626+2727+<TabItem value="depth" label="In Depth Upgrades">
2828+2929+:::note[Optional Upgrade]
3030+3131+(Breaking) Changes to configuration/data that require more detail or formatting than is feasible in Github release notes. These upgrades may be skipped.
3232+3333+:::
3434+3535+</TabItem>
3636+3737+</Tabs>
3838+3939+The type of upgrade is shown at the top of each page with the same colored callout shown above.
···11+:::warning[Required Upgrade]
22+33+You **MUST** upgrade to this version **before** upgrading Multi-Scrobbler to a newer version.
44+55+This version contains functionality to migrate your data from **{props.before}** that newer versions depend on.
66+77+<details>
88+99+<summary>Upgrade Process Example</summary>
1010+1111+* Upgrade Multi-Scrobbler {props.old} to {props.current}
1212+* **After** upgrading, you can optionally upgrade to > {props.current}
1313+1414+</details>
1515+:::