Forgejo: Automate upgrade tasks #44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The upgrade tasks i'm referring to are
forgejo dump
[1] andforgejo doctor check --all
[2].Currently i've run these manually on major upgrades only. We might want to do these automatically on any upgrade though.
At least the doctor command doesn't have noticeable downsides besides a bit of cpu usage and the need for a human to check the corresponding logs.
(AFAICT any errors lead to
exit(1)
while warnings lead toexit(0)
; so maybe checking the exit code is good enough?)The backup task is a bit more complicated as we need to ensure extra space and need to decide when to delete the backup archive.
We could exclude/skip various parts of the back up [3] but i'd rather have a complete backup if we choose to do this.
[1] https://forgejo.org/docs/latest/admin/upgrade/#backup
[2] https://forgejo.org/docs/latest/admin/upgrade/#verify-forgejo-works
[3] https://forgejo.org/docs/latest/admin/command-line/#dump
a small outline of a proper upgrade procedure could look like this:
podman exec
into forgejo containerforgejo manager flush-queues
as per upgrade-docsforgejo dump
podman exec
into container againforgejo doctor check --all --log-file doctor.log