Blame

e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
1
# Backup & Restore
2
3
Cette page est dédier à la sauvegarde et restoration des services sur le serveur.
1d634d admin 2025-09-03 14:28:17
added initial page
4
5
## Services
8da001 admin 2025-09-03 14:29:02
added tip styling
6
> [!NOTE]
69cfe3 admin 2025-09-03 14:29:18
more styling
7
> As of _25/08/08_ → **20 GiB** approximatly. It should not grow very fast, since it is
8da001 admin 2025-09-03 14:29:02
added tip styling
8
> mostly configuration files and a text wiki.
1d634d admin 2025-09-03 14:28:17
added initial page
9
10
Media is backed up seperatly where necessary:
11
12
- jellyfin
13
- navidrome
14
24f926 theophile 2025-10-07 14:28:22
test nested pages
15
[[Otterwiki]]
16
4ae2a9 admin 2025-09-03 18:11:23
change dokuwiki section to otterwiki
17
### Otterwiki
1d634d admin 2025-09-03 14:28:17
added initial page
18
4ae2a9 admin 2025-09-03 18:11:23
change dokuwiki section to otterwiki
19
OtterWiki being a flatfile wiki, we can back it up by simply copying the
20
`/mnt/data/otterwiki` folder.
1d634d admin 2025-09-03 14:28:17
added initial page
21
094334 theophile 2025-09-28 20:49:23
initial forgejo backup documentation
22
### Forgejo
23
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
24
#### Backup
25
26
[Based on the documentation](https://forgejo.org/docs/latest/admin/upgrade/#backup) and [this analysis of gitea backups](https://codeberg.org/forgejo/forgejo/src/tag/v1.21.3-0/docs/content/administration/backup-and-restore.en-us.md), we can run
094334 theophile 2025-09-28 20:49:23
initial forgejo backup documentation
27
28
```bash
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
29
docker compose exec -u git forgejo forgejo dump --file /tmp/forgejo-dump.zip
094334 theophile 2025-09-28 20:49:23
initial forgejo backup documentation
30
```
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
31
Then copy out the file and rename it at the same time:
32
33
```bash
34
docker compose cp forgejo:/tmp/forgejo-dump.zip /mnt/data/backups/forgejo/forgejo-backup-$(date +%Y%m%d-%H%M%S).zip
35
```
36
37
Pour finir, on supprime l'archive du dossier /tmp dans le container:
38
39
```bash
40
docker compose exec forgejo rm /tmp/forgejo-dump.zip
41
```
42
43
#### Restore
44
e299e7 theophile 2025-10-07 14:27:18
forgejo restore
45
Move all relevant files to their location in the mounted volumes:
46
47
```bash
48
49
docker compose up
50
# Arreter un peu après. C'est pour générer la structure de dossiers.
51
unzip forgejo-dump-1610949662.zip
52
cd forgejo-dump-1610949662
53
mv app.ini $FORGEJO_DATA_DIR/gitea/conf/app.ini
54
mv data/* $FORGEJO_DATA_DIR/gitea/data/
55
mv log/* $FORGEJO_DATA_DIR/gitea/log/
56
mv repos/* $FORGEJO_DATA_DIR/git/repositories/
57
chown -R docker:docker $FORGEJO_DATA_DIR/
58
59
# Je garde les commandes ci-dessous comme archives. La db se trouve déjà dans data/.
60
# De fait, on peut s'arrêter là, et on a pas besoin du dump, car sqlite3 est en format single file.
61
62
# sqlite3
63
# sqlite3 $DATABASE_PATH <gitea-db.sql
64
65
# Commandes pour d'autres types de DB:
66
# mysql
67
# mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE <gitea-db.sql
68
# postgres
69
# psql -U $USER -d $DATABASE < gitea-db.sql
70
71
```
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
72
73
094334 theophile 2025-09-28 20:49:23
initial forgejo backup documentation
74
1d634d admin 2025-09-03 14:28:17
added initial page
75
### Jellyfin
76
77
[Backup and Restore → jellyfin.org](https://jellyfin.org/docs/general/administration/backup-and-restore)
78
79
Stop the container completly, then copy the config folder (maybe nothing else ?)
80
`/mnt/data/jellyfin/config`
81
82
### Kavita
83
84
[Backups → wiki.kavitareader.com](https://wiki.kavitareader.com/guides/admin-settings/tasks/#kavita-backup)
85
86
Backups are already generated, in `/mnt/data/kavita/config/backups`.
87
88
### Navidrome
89
90
[Automated Backup → navidrome.org](https://www.navidrome.org/docs/usage/backup/)
91
92
Backup can be automated via config file or env variables. Location is
93
`/mnt/data/navidrome/backup`.
94
95
### Miniflux
96
97
[FAQ → miniflux.app](https://miniflux.app/faq.html#backup)
98
99
[postgresql dump restore → postgresql.org](https://www.postgresql.org/docs/current/backup-dump.html)
100
101
Miniflux stores all it's data in the postgresql db. We can dump it:
102
103
```bash
104
sudo bash -c "docker compose exec db pg_dump -U miniflux miniflux" > miniflux_backup.sql
105
```
106
107
And use the file to restore it later.
108
109
### Readeck
110
111
[Backups → readeck.org](https://readeck.org/en/docs/backups)
112
113
```bash
114
docker exec -i readeck sh -c 'readeck export "/readeck/readeck_backup_$(date +%Y%m%dT%H%M%S).zip"'
115
```
116
117
to import, do the same and specifying the config file.
118
119
Needs to be recuring via cron job or script. Could also be built by script that
120
does the overall backup, since backup is quick.
121
122
### Caddy
123
124
It is sufficient to backup the `/mnt/data/caddy`. The most important folders
125
inside are:
126
127
- `./Caddyfile`
128
- `./html/`
129
130
To restore, the both should be in the same folder, for the Caddyfile contains
131
the paths to the different root folders for the websites hosted.
132
5f0d87 theophile 2025-10-04 11:59:42
openwebui backup instructions
133
### OpenWebUI
134
135
We do not backup the `ollama` models. We only handle the `openwebui` data.
136
137
138
- [Backing Up Your Instance - openwebUI docs](https://docs.openwebui.com/tutorials/maintenance/backups/#scripting-a-backup-job)
139
140
141
**Dir structure**:
142
```
143
├── audit.log
144
├── cache/
145
├── uploads/
146
├── vector_db/
147
└── webui.db
148
```
149
1d65de theophile 2025-10-04 12:00:32
format improvement to openwebui section
150
1. Cold backup approach - Stops the container before backup for data integrity
151
2. Copies the entire `/webui` folder including:
152
- webui.db (main database with chats, users, settings)
153
- uploads/ (uploaded files)
154
- cache/ (cached data)
155
- vector_db/ (RAG/Knowledge embeddings)
5f0d87 theophile 2025-10-04 11:59:42
openwebui backup instructions
156
157
1d634d admin 2025-09-03 14:28:17
added initial page
158
## Missing or broken installs
159
160
- archivebox
161
- bookstack
162
- etherpad
163
- synapse