services-garbaye/podman-seafile/README.md

53 lines
2.8 KiB
Markdown
Raw Normal View History

2022-11-08 21:30:58 +00:00
# Seafile
2022-01-18 21:11:04 +00:00
## Première installation
### soucis d'URL
À la première connexion en admin, changer les URL (https) dans l'interface d'administration.
2021-05-26 20:11:53 +00:00
Administrateur systeme
SERVICE_URL
2022-01-18 21:11:04 +00:00
## MAJ seafile
Modifier la version cible dans `vars.sh` (ici pour l'exemple : `8.0.8`)
```
2021-09-18 09:38:09 +00:00
cd /opt/services-garbaye/podman-seafile
export GARBAYE_SEAFILE_MYSQL_ROOT_PASSWORD=XXXXXXXXXXXXXXXX
2022-01-18 21:11:04 +00:00
./40_stop.sh
./70_disable.sh
./80_destroy.sh
./10_install.sh
./20_enable.sh
./30_start.sh
```
2022-11-08 21:30:58 +00:00
## Restauration
À partir d'une copie des home utilisateur (volumes podman compris) dans `/backup` :
* En tant qu'utilisateur `podman-seafile` :
```
podman volume create podman-seafile_seafile-data
podman volume create podman-seafile_seafile-db
```
* En tant que `root` :
```
# La restauration par "mv" nécessite une correction du contexte SELinux. Privilégier "rsync" si possible.
mv /backup/home/podman-seafile/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/* ~podman-seafile/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/
mv /backup/home/podman-seafile/.local/share/containers/storage/volumes/podman-seafile_seafile-db/_data/* ~podman-seafile/.local/share/containers/storage/volumes/podman-seafile_seafile-db/_data/
# le volume seafile-data est déjà root:root (ce qu'on veut). Pas besoin de chown.
chown -R podman-seafile:podman-users ~podman-seafile/.local/share/containers/storage/volumes/podman-seafile_seafile-db/_data
```
* En tant qu'utilisateur `podman-seafile` :
```
podman unshare chown -R 999:999 ~/.local/share/containers/storage/volumes/podman-seafile_seafile-db/_data
chown -R podman-seafile:podman-users /home/podman-seafile/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/logs/var-log
podman unshare chown -R 0:43 ~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/logs/var-log/btmp*
podman unshare chown -R 0:43 ~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/logs/var-log/wtmp*
podman unshare chown -R 0:43 ~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/logs/var-log/lastlog
podman unshare chown -R 0:4 ~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/logs/var-log/apt/term.log*
podman unshare chown 0:4 ~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/logs/var-log/nginx
podman unshare chown 33:4 ~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/logs/var-log/nginx/*
podman unshare restorecon -R ~/.local/share/containers/storage/volumes/podman-seafile_seafile-db/_data
podman unshare restorecon -R ~/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data
```
* Exporter les variables d'environnement et procéder à l'installation normale (10_install.sh)