VERSION=1.19.1
cd /usr/local/bin/
wget https://github.com/go-gitea/gitea/releases/download/v$VERSION/gitea-$VERSION-linux-amd64 -O newgitea
chmod +x newgitea
mv newgitea gitea
killall gitea # use `;` if used as a single line
sudo -u gitea GITEA_WORK_DIR=/var/lib/gitea/ nohup /usr/local/bin/gitea web -c /etc/gitea/app.ini &
Don't forget to compress /var/lib/gitea/. /etc/gitea/ could be backed up as well.
Use:
```
/var/backups
```
<details>
<summary>When running my update Bash script:</summary>
```sh
VERSION=1.19.1
cd /usr/local/bin/
wget https://github.com/go-gitea/gitea/releases/download/v$VERSION/gitea-$VERSION-linux-amd64 -O newgitea
chmod +x newgitea
mv newgitea gitea
killall gitea # use `;` if used as a single line
sudo -u gitea GITEA_WORK_DIR=/var/lib/gitea/ nohup /usr/local/bin/gitea web -c /etc/gitea/app.ini &
```
</details>
Don't forget to compress `/var/lib/gitea/`.
`/etc/gitea/` could be backed up as well.
Note that backing up is especially important when update contains breaking change.
Could investigate rsnapshot possibility. Otherwise the Bash script:
VERSION=1.19.1
cd /usr/local/bin/
wget https://github.com/go-gitea/gitea/releases/download/v$VERSION/gitea-$VERSION-linux-amd64 -O newgitea
chmod +x newgitea
mv newgitea gitea
killall gitea # use `;` if used as a single line
zip -r /var/backups/gitea-$VERSION.zip /etc/gitea/ /var/lib/gitea/ /var/lib/mysql/gitea/
sudo -u gitea GITEA_WORK_DIR=/var/lib/gitea/ nohup /usr/local/bin/gitea web -c /etc/gitea/app.ini &
does the job.
Note that backing up is especially important when update contains breaking change.
<details>
<summary>Could investigate rsnapshot possibility. Otherwise the Bash script:</summary>
```sh
VERSION=1.19.1
cd /usr/local/bin/
wget https://github.com/go-gitea/gitea/releases/download/v$VERSION/gitea-$VERSION-linux-amd64 -O newgitea
chmod +x newgitea
mv newgitea gitea
killall gitea # use `;` if used as a single line
zip -r /var/backups/gitea-$VERSION.zip /etc/gitea/ /var/lib/gitea/ /var/lib/mysql/gitea/
sudo -u gitea GITEA_WORK_DIR=/var/lib/gitea/ nohup /usr/local/bin/gitea web -c /etc/gitea/app.ini &
```
</details>
does the job.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Use:
When running my update Bash script:
Don't forget to compress
/var/lib/gitea/./etc/gitea/could be backed up as well.Note that backing up is especially important when update contains breaking change.
Could investigate rsnapshot possibility. Otherwise the Bash script:
does the job.
By the way should make sure that
giteaisn't running anymore after thekillallcall. How to makekillallwaitgiteato stop running?Use rsnapshot to reduce the size of backups.
Related to Benjamin-Loison/gitea/issues/119.