Add Nextcloud data directory migration workflow
Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
23
README.md
23
README.md
@ -31,6 +31,29 @@ cp .env.example .env
|
||||
```bash
|
||||
./scripts/test.sh
|
||||
```
|
||||
## Move Nextcloud data directory to external storage
|
||||
Use the migration helper to move existing data to a host path and switch the app to a bind mount.
|
||||
Default target:
|
||||
- `/media/rbhat/DATA/nextcloud/NextCloudData`
|
||||
Run migration:
|
||||
```bash
|
||||
./scripts/migrate-data-directory.sh /media/rbhat/DATA/nextcloud/NextCloudData
|
||||
```
|
||||
What the script does:
|
||||
- enables maintenance mode
|
||||
- copies current `/var/www/html/data` content to target directory
|
||||
- applies owner/group and permissions for Nextcloud (`www-data`)
|
||||
- updates `docker-compose.yml` app volume with `...:/var/www/html/data`
|
||||
- recreates `app` and `web` services
|
||||
- disables maintenance mode and verifies mount
|
||||
Rollback (if needed):
|
||||
1. Remove the `:/var/www/html/data` bind mount line from `app` volumes in `docker-compose.yml`.
|
||||
2. `docker compose up -d app web`
|
||||
3. Confirm status:
|
||||
```bash
|
||||
docker exec --user www-data nextcloud-app php occ status
|
||||
```
|
||||
|
||||
## Production TLS (Let's Encrypt + Cloudflare DNS-01)
|
||||
1. Export credentials in shell:
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user