Browse Source

Fixed headings.

dev
Franco Masotti 4 months ago
parent
commit
f122b903e2
Signed by: frnmst GPG Key ID: 24116ED85666780A
  1. 36
      _posts/2021-09-13-problems-and-solutions-with-gitea-1-15.md

36
_posts/2021-09-13-problems-and-solutions-with-gitea-1-15.md

@ -17,15 +17,15 @@ to something more scalable: [MariaDB](https://mariadb.org/).
- [Revert](#revert)
- [PostgreSQL](#postgresql)
- [Steps](#steps)
- [1. setup the database](#1-setup-the-database)
- [2. recover the repositories](#2-recover-the-repositories)
- [3. Adminer](#3-adminer)
- [Apache configuration](#apache-configuration)
- [4. set the packages on hold](#4-set-the-packages-on-hold)
- [5. restore issues and comments](#5-restore-issues-and-comments)
- [6. restore mirrors from bare repositories](#6-restore-mirrors-from-bare-repositories)
- [7. restore users](#7-restore-users)
- [8. Database backups](#8-database-backups)
- [1. setup the database](#1-setup-the-database)
- [2. recover the repositories](#2-recover-the-repositories)
- [3. Adminer](#3-adminer)
- [Apache configuration](#apache-configuration)
- [4. set the packages on hold](#4-set-the-packages-on-hold)
- [5. restore issues and comments](#5-restore-issues-and-comments)
- [6. restore mirrors from bare repositories](#6-restore-mirrors-from-bare-repositories)
- [7. restore users](#7-restore-users)
- [8. Database backups](#8-database-backups)
- [Extras](#extras)
- [Torification](#torification)
- [HTTP2](#http2)
@ -160,7 +160,7 @@ to the migration of this new database to Gitea 1.15.0.
These steps work on Debian GNU/Linux 10 which is now *oldstable*.
#### 1. setup the database
##### 1. setup the database
1. install PostgreSQL 13 from the [official website](https://www.postgresql.org/download/linux/debian/)
2. Follow the [database preparations instructions](https://docs.gitea.io/en-us/database-prep/#postgresql)
@ -173,12 +173,12 @@ These steps work on Debian GNU/Linux 10 which is now *oldstable*.
LOG_SQL = false
```
#### 2. recover the repositories
##### 2. recover the repositories
Create the users and push or "adopt" the repositories through the `admin/repos` URL. You will see
the `Unadopted Repository` button there.
#### 3. Adminer
##### 3. Adminer
[Adminer](https://www.adminer.org/) is similar to phpMyAdmin. You can install it with:
@ -188,7 +188,7 @@ apt-get install adminer/buster-backports
The backports version seem to be fully compatible with PostgreSQL 13.
##### Apache configuration
###### Apache configuration
1. if you use [PHP-FPM](https://www.php.net/manual/en/install.fpm.php)
you can use this snippet in a `VirtualHost` directive:
@ -218,7 +218,7 @@ The backports version seem to be fully compatible with PostgreSQL 13.
4. connect to `http://my.host/dbadmin`
#### 4. set the packages on hold
##### 4. set the packages on hold
Set these packages on hold so when you update the system they don't get
updated by accident.
@ -238,7 +238,7 @@ postgresql-client-common
postgresql-common
```
#### 5. restore issues and comments
##### 5. restore issues and comments
1. open the original database with adminer
1. get the repository id. Use the `repository` table to get it. Let's say it's `38`
@ -261,7 +261,7 @@ postgresql-common
{% include image.html file="adminer_gitea_comment_table_2.png" alt="Gitea comment table for issue 2 on Adminer" caption="Gitea comment table for issue 2 on Adminer" %}
#### 6. restore mirrors from bare repositories
##### 6. restore mirrors from bare repositories
1. once you have the repositories go into the `repositories` table
2. select the to-be mirrors repositories and set the `is_mirror` variable to `true`
@ -271,12 +271,12 @@ postgresql-common
{% include image.html file="adminer_gitea_mirror_table.png" alt="An example row of the mirror table" caption="An example row of the mirror table" %}
#### 7. restore users
##### 7. restore users
To restore users simply create new users using Gitea's admin interface and then copy-paste the data
in the rows.
#### 8. Database backups
##### 8. Database backups
I now use 15 minute separated backups using borgmatic. See also
[https://docs.franco.net.eu.org/automated-tasks/scripts.html#borgmatic-hooks-py](https://docs.franco.net.eu.org/automated-tasks/scripts.html#borgmatic-hooks-py)

Loading…
Cancel
Save