|
| 1 | +--- |
| 2 | +title: Backups |
| 3 | +description: Understand which data you should back up. |
| 4 | +sidebar_position: 4 |
| 5 | +--- |
| 6 | + |
| 7 | +# Which data does Jellyseerr save and where? |
| 8 | + |
| 9 | +## Settings |
| 10 | + |
| 11 | +All configurations from the **Settings** panel in the Jellyseerr web UI are saved, including integrations with Radarr, Sonarr, Jellyfin, Plex, and notification settings. |
| 12 | +These settings are stored in the `settings.json` file located in the Jellyseerr data folder. |
| 13 | + |
| 14 | +## User Data |
| 15 | + |
| 16 | +Apart from the settings, all other data—including user accounts, media requests, blacklist etc. are stored in the database (either SQLite or PostgreSQL). |
| 17 | + |
| 18 | +# Backup |
| 19 | + |
| 20 | +### SQLite |
| 21 | + |
| 22 | +If your backup system uses filesystem snapshots (such as Kubernetes with Volsync), you can directly back up the Jellyseerr data folder. |
| 23 | +Otherwise, you need to stop the Jellyseerr application and back up the `config` folder. |
| 24 | + |
| 25 | +For advanced users, it's possible to back up the database without stopping the application by using the [SQLite CLI](https://www.sqlite.org/download.html). Run the following command to create a backup: |
| 26 | + |
| 27 | +```bash |
| 28 | +sqlite3 db/db.sqlite3 ".backup '/tmp/jellyseerr_db.sqlite3.bak'" |
| 29 | +``` |
| 30 | + |
| 31 | +Then, copy the `/tmp/jellyseerr_dump.sqlite3.bak` file to your desired backup location. |
| 32 | + |
| 33 | +### PostgreSQL |
| 34 | + |
| 35 | +You can back up the `config` folder and dump the PostgreSQL database without stopping the Jellyseerr application. |
| 36 | + |
| 37 | +Install [postgresql-client](https://www.postgresql.org/download/) and run the following command to create a backup (just replace the placeholders): |
| 38 | + |
| 39 | +:::info |
| 40 | +Depending on how your PostgreSQL instance is configured, you may need to add these options to the command below. |
| 41 | + |
| 42 | + -h, --host=HOSTNAME database server host or socket directory |
| 43 | + |
| 44 | + -p, --port=PORT database server port number |
| 45 | +::: |
| 46 | + |
| 47 | +```bash |
| 48 | +pg_dump -U <database_user> -d <database_name> -f /tmp/jellyseerr_db.sql |
| 49 | +``` |
| 50 | + |
| 51 | +# Restore |
| 52 | + |
| 53 | +### SQLite |
| 54 | + |
| 55 | +After restoring your `db/db.sqlite3` file and, optionally, the `settings.json` file, the `config` folder structure should look like this: |
| 56 | + |
| 57 | +``` |
| 58 | +. |
| 59 | +├── cache <-- Optional |
| 60 | +├── db |
| 61 | +│ └── db.sqlite3 |
| 62 | +├── logs <-- Optional |
| 63 | +└── settings.json <-- Optional (required if you want to avoid reconfiguring Jellyseerr) |
| 64 | +``` |
| 65 | + |
| 66 | +Once the files are restored, start the Jellyseerr application. |
| 67 | + |
| 68 | +### PostgreSQL |
| 69 | + |
| 70 | +Install the [PostgreSQL client](https://www.postgresql.org/download/) and restore the PostgreSQL database using the following command (replace the placeholders accordingly): |
| 71 | + |
| 72 | +:::info |
| 73 | +Depending on how your PostgreSQL instance is configured, you may need to add these options to the command below. |
| 74 | + |
| 75 | + -h, --host=HOSTNAME database server host or socket directory |
| 76 | + |
| 77 | + -p, --port=PORT database server port number |
| 78 | +::: |
| 79 | + |
| 80 | +```bash |
| 81 | +pg_restore -U <database_user> -d <database_name> /tmp/jellyseerr_db.sql |
| 82 | +``` |
| 83 | + |
| 84 | +Optionally, restore the `settings.json` file. The `config` folder structure should look like this: |
| 85 | + |
| 86 | +``` |
| 87 | +. |
| 88 | +├── cache <-- Optional |
| 89 | +├── logs <-- Optional |
| 90 | +└── settings.json <-- Optional (required if you want to avoid reconfiguring Jellyseerr) |
| 91 | +``` |
| 92 | + |
| 93 | +Once the database and files are restored, start the Jellyseerr application. |
0 commit comments