funkwhale/docs/administrator/manage-script/database.md

33 wiersze
1.1 KiB
Markdown
Czysty Zwykły widok Historia

2022-07-01 09:02:29 +00:00
# Delete obsolete files from the database
Funkwhale keeps references to files imported using the in-place method. If you move or remove these, it invalidates the reference and Funkwhale can't serve the files.
Use the `check_inplace_files` command to check the database for invalid references. This command loops through all in-place imports and checks if the file is accessible. If the file isn't accessible, the command deletes the database object.
```{warning}
Running `check_inplace_files` with the `--no-dry-run` flag is irreversible. Make sure you [back up your data](../upgrade/backup.md).
2022-07-01 09:02:29 +00:00
```
To ensure you don't remove data by accident, this command runs in dry run mode by default. In dry run mode, the command lists the items it will delete. Run the command with the `--no-dry-run` flag to perform the pruning action.
2022-07-23 13:32:35 +00:00
::::{tab-set}
:::{tab-item} Debian
:sync: debian
2022-07-01 09:02:29 +00:00
2022-10-26 20:19:16 +00:00
```{code-block} sh
venv/bin/funkwhale-manage check_inplace_files
2022-07-01 09:02:29 +00:00
```
2022-07-23 13:32:35 +00:00
:::
2022-07-01 09:02:29 +00:00
2022-07-23 13:32:35 +00:00
:::{tab-item} Docker
:sync: docker
2022-07-01 09:02:29 +00:00
2022-10-26 20:19:16 +00:00
```{code-block} sh
sudo docker compose run --rm api funkwhale-manage check_inplace_files
2022-07-01 09:02:29 +00:00
```
2022-07-23 13:32:35 +00:00
:::
::::