Skip to content

Commit

Permalink
Nextcloud with Let's Encrypt Using Docker Compose
Browse files Browse the repository at this point in the history
  • Loading branch information
heyvaldemar authored Sep 22, 2024
1 parent 3be3412 commit 550d9ba
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,29 @@ To make the `nextcloud-restore-application-data.sh` script executable, run the f

By utilizing this script, you can efficiently restore application data from an existing backup while ensuring proper coordination with the running service.

# Fixing Database Index Issues

Your Nextcloud database might be missing some indexes. This situation can occur because adding indexes to large tables can take considerable time, so they are not added automatically. Running `occ db:add-missing-indices` manually allows these indexes to be added while the instance continues running. Adding these indexes can significantly speed up queries on tables like `filecache` and `systemtag_object_mapping`, which might be missing indexes such as `fs_storage_path_prefix` and `systag_by_objectid`.

List all running containers to find the one running Nextcloud:

`docker ps`

Run the command below, replacing `nextcloud-container-name` with your container's name. Adjust `33` to the correct user ID if different:

`docker exec -u 33 -it nextcloud-container-name php occ db:add-missing-indices`

## Verify Changes

Confirm the indices were added by checking the status:

`docker exec -u 33 -it nextcloud-container-name php occ status`

## Tips

- Operations on large databases can take time; consider scheduling during low-usage periods.
- Always backup your database before making changes.

# Author

I’m Vladimir Mikhalev, the [Docker Captain](https://www.docker.com/captains/vladimir-mikhalev/), but my friends can call me Valdemar.
Expand Down

0 comments on commit 550d9ba

Please sign in to comment.