diff --git a/README.md b/README.md index 6c98246..84b475d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,27 @@ +### Preparation +You *can* connect directly to the Invidious database. + +Only the following tables are used and must be kept: +- `playlist_videos` +- `playlists` +- `session_ids` +- `users` + +You can delete the other ones. + +For example, if you're exporting the database: +```bash +pg_dump -U kemal -t playlist_videos -t playlists -t session_ids -t users invidious -Fc -Z3 > invidious.sql +``` +This saves 90% of storage compared to running pg_dump without args, in my case 432M -> 25M + +Then: +```bash +cat invidious.sql | pg_restore -U kemal -d invidious +``` + ### Environment variables -- `QUART_SECRET_KEY` -- `DATABASE_URL` -- `ALTERNATIVE_INSTANCE_URL`, defaults to `https://redirect.invidious.io` +See the [.env.example](.env.example) file ### Health check -A `/health` endpoint is provided that returns `OK` \ No newline at end of file +A `/health` endpoint is provided that always returns `OK` \ No newline at end of file