mirror of
https://github.com/YunoHost-Apps/mastodon_ynh.git
synced 2024-09-03 19:46:02 +02:00
Update documentation cc @panomaki
This commit is contained in:
parent
282ae0cf48
commit
976c4d7bdc
2 changed files with 57 additions and 13 deletions
35
doc/ADMIN.md
35
doc/ADMIN.md
|
@ -1,13 +1,36 @@
|
|||
## Update
|
||||
|
||||
### Using *screen* highly recommended
|
||||
|
||||
`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug `
|
||||
|
||||
## Administrate with tooctl
|
||||
|
||||
`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)`
|
||||
|
||||
## Update
|
||||
|
||||
**`screen` (or `tmux`) can be used to make sure your session is not interrupted in case of connection problems.**
|
||||
See [tutorial](https://www.howtogeek.com/662422/how-to-use-linuxs-screen-command/) for more background information.
|
||||
|
||||
```
|
||||
$ screen
|
||||
$ sudo yunohost app upgrade mastodon
|
||||
```
|
||||
|
||||
## Backups
|
||||
|
||||
First of all: Mastodon uses a local cache to save media (such as posted images, videos etc.). This cache can grow huge.
|
||||
You could consider cleaning up your local cache first as otherwise your backup will be very big and you might run out of disk space:
|
||||
|
||||
To check your space usage, on a command line run:
|
||||
|
||||
`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media usage`
|
||||
|
||||
If your cache is too big to backup, you can run the following command to clean up Attachments (the first line). Substitute X by the number of days you want to keep, e.g. 1 day. All older images will be deleted but will be refetched from the original server if necessary.
|
||||
|
||||
First dry-run to see how much space is freed up (without actually removing):
|
||||
|
||||
`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X --dry-run`
|
||||
|
||||
If all looks good commit the cleanup:
|
||||
|
||||
`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X `
|
||||
|
||||
## Known Bugs
|
||||
|
||||
- Log-out from YunoHost's portal doesn't log out from Mastodon. See https://github.com/YunoHost/issues/issues/501
|
||||
|
|
|
@ -1,12 +1,33 @@
|
|||
## Mise à jour
|
||||
|
||||
### Utilisation de *screen* fortement recommandée
|
||||
|
||||
`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug `
|
||||
|
||||
## Administration avec tooctl
|
||||
|
||||
`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)`
|
||||
`$ cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help`
|
||||
|
||||
## Mise à jour
|
||||
|
||||
**`screen` (ou `tmux`) peut être utilisé pour vous assurer que votre session n'est pas interrompue en cas de problème de connection.**
|
||||
Consultez ce [tutoriel](https://www.howtogeek.com/662422/how-to-use-linuxs-screen-command/) pour plus de détails.
|
||||
|
||||
```
|
||||
$ screen
|
||||
$ sudo yunohost app upgrade mastodon
|
||||
```
|
||||
|
||||
## Sauvegardes
|
||||
|
||||
Tout d'abord : Mastodon utilise un cache local pour sauvegarder les médias (comme les images, vidéos, etc). Ce cache peut devenir énorme.
|
||||
Vous devriez réfléchir à vider votre cache local avant de faire une sauvegarde, qui pourrait être énorme et vous pourriez manquer d'espace de stockage.
|
||||
|
||||
Pour vérifier l'utilisation du stockage, en ligne de commande utilisez :
|
||||
|
||||
`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media usage`
|
||||
|
||||
Si le cache est trop gros pour être sauvegardé, vous pouvez lancer la commande suivante pour en supprimer les médias attachés. Changez `X` par le nombre de cache à conserver, par ex. 1 jour. Tous les médias plus anciens seront supprimés, mais ils pourront être rechargé du serveur d'origine si nécessaire.
|
||||
|
||||
En premier faite un essai à blanc pour voir combien de place sera libérée (sans rien supprimer):
|
||||
`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X --dry-run`
|
||||
|
||||
Si cela semble bon, effectuez le nettoyage :
|
||||
`$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X `
|
||||
|
||||
## Bugs connus
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue