Add Gitea 1.21.0 upgrade and directory info commands

This commit is contained in:
James Skemp 2023-11-18 07:46:33 -06:00
parent 3433021f09
commit a266911723
2 changed files with 29 additions and 0 deletions

View File

@ -214,4 +214,13 @@ REPO_INDEXER_EXCLUDE =
```bash
# View Gitea disk usage.
sudo du -sh /var/lib/gitea
# Show by child directory size.
sudo du -h /var/lib/gitea --max-depth=1
# Show largest directories first.
sudo du -h /var/lib/gitea --max-depth=1 | sort -hr
# Sort by directory name.
sudo du -h /var/lib/gitea --max-depth=1 | sort -k2
# Largest directories.
sudo du --separate-dirs -h /var/lib/gitea | sort -hr | head
sudo du --separate-dirs -h /var/lib/gitea | sort -hr | head -n 2
```

View File

@ -389,3 +389,23 @@ Updates came pretty fast, so I ran all three of these one after the other.
- then `q`
- Should be active (running).
12. After some period of time, delete the backup file.
## Updating 1.20.5 to 1.21.0
1. `sudo systemctl stop gitea`
2. `sudo su - git`
3. `gitea dump -c /etc/gitea/app.ini -w /var/lib/gitea -t /tmp`
4. `ls -l --block-size=M`
- `rm <old-backup-file>`
- `chmod a=r <new-backup-file>`
5. `exit`
6. `VERSION=1.21.0 && sudo wget -O gitea https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64`
7. `sudo systemctl status gitea`
- then `q`
- Should be inactive/dead.
8. `sudo mv gitea /usr/local/bin/gitea`
9. `sudo chmod +x /usr/local/bin/gitea`
10. `sudo systemctl restart gitea`
11. `sudo systemctl status gitea`
- then `q`
- Should be active (running).
12. After some period of time, delete the backup file.