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
3aae9d theophile 2025-10-07 14:33:16
cleanup
10
**Large Media** is backed up seperatly when necessary:
1d634d admin 2025-09-03 14:28:17
added initial page
11
12
- jellyfin
13
- navidrome
14
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
15
:::warning
16
# Stop containers before making backups.
17
This is safer for data.
18
:::
19
3aae9d theophile 2025-10-07 14:33:16
cleanup
20
---
24f926 theophile 2025-10-07 14:28:22
test nested pages
21
aff08e theophile 2025-10-07 14:51:59
tested backup and restore
22
### Otterwiki ✅
1d634d admin 2025-09-03 14:28:17
added initial page
23
4ae2a9 admin 2025-09-03 18:11:23
change dokuwiki section to otterwiki
24
OtterWiki being a flatfile wiki, we can back it up by simply copying the
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
25
`/mnt/data/otterwiki` folder and restoring it.
1d634d admin 2025-09-03 14:28:17
added initial page
26
3aae9d theophile 2025-10-07 14:33:16
cleanup
27
---
28
aff08e theophile 2025-10-07 14:51:59
tested backup and restore
29
### Forgejo ✅
094334 theophile 2025-09-28 20:49:23
initial forgejo backup documentation
30
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
31
**Backup**
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
32
33
[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
34
35
```bash
8c9c43 theophile 2025-10-07 15:53:50
cleanup
36
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
37
docker compose exec -u git forgejo forgejo dump --file /tmp/forgejo-dump.zip
8c9c43 theophile 2025-10-07 15:53:50
cleanup
38
094334 theophile 2025-09-28 20:49:23
initial forgejo backup documentation
39
```
8c9c43 theophile 2025-10-07 15:53:50
cleanup
40
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
41
Then copy out the file and rename it at the same time:
42
43
```bash
44
docker compose cp forgejo:/tmp/forgejo-dump.zip /mnt/data/backups/forgejo/forgejo-backup-$(date +%Y%m%d-%H%M%S).zip
45
```
46
47
Pour finir, on supprime l'archive du dossier /tmp dans le container:
48
49
```bash
50
docker compose exec forgejo rm /tmp/forgejo-dump.zip
51
```
52
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
53
**Restore**
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
54
e299e7 theophile 2025-10-07 14:27:18
forgejo restore
55
Move all relevant files to their location in the mounted volumes:
56
57
```bash
58
59
docker compose up
60
# Arreter un peu après. C'est pour générer la structure de dossiers.
61
unzip forgejo-dump-1610949662.zip
62
cd forgejo-dump-1610949662
63
mv app.ini $FORGEJO_DATA_DIR/gitea/conf/app.ini
64
mv data/* $FORGEJO_DATA_DIR/gitea/data/
65
mv log/* $FORGEJO_DATA_DIR/gitea/log/
66
mv repos/* $FORGEJO_DATA_DIR/git/repositories/
67
chown -R docker:docker $FORGEJO_DATA_DIR/
68
69
# Je garde les commandes ci-dessous comme archives. La db se trouve déjà dans data/.
70
# De fait, on peut s'arrêter là, et on a pas besoin du dump, car sqlite3 est en format single file.
71
72
# sqlite3
73
# sqlite3 $DATABASE_PATH <gitea-db.sql
74
75
# Commandes pour d'autres types de DB:
76
# mysql
77
# mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE <gitea-db.sql
78
# postgres
79
# psql -U $USER -d $DATABASE < gitea-db.sql
80
81
```
e5fe93 theophile 2025-10-07 13:37:58
forgejo backup commands updates
82
3aae9d theophile 2025-10-07 14:33:16
cleanup
83
---
094334 theophile 2025-09-28 20:49:23
initial forgejo backup documentation
84
1d634d admin 2025-09-03 14:28:17
added initial page
85
### Jellyfin
86
87
[Backup and Restore → jellyfin.org](https://jellyfin.org/docs/general/administration/backup-and-restore)
88
89
Stop the container completly, then copy the config folder (maybe nothing else ?)
90
`/mnt/data/jellyfin/config`
91
3aae9d theophile 2025-10-07 14:33:16
cleanup
92
---
93
1d634d admin 2025-09-03 14:28:17
added initial page
94
### Kavita
95
96
[Backups → wiki.kavitareader.com](https://wiki.kavitareader.com/guides/admin-settings/tasks/#kavita-backup)
97
98
Backups are already generated, in `/mnt/data/kavita/config/backups`.
99
3aae9d theophile 2025-10-07 14:33:16
cleanup
100
---
101
1d634d admin 2025-09-03 14:28:17
added initial page
102
### Navidrome
103
104
[Automated Backup → navidrome.org](https://www.navidrome.org/docs/usage/backup/)
105
106
Backup can be automated via config file or env variables. Location is
107
`/mnt/data/navidrome/backup`.
108
3aae9d theophile 2025-10-07 14:33:16
cleanup
109
---
110
6518e9 theophile 2025-10-07 16:10:26
miniflux check ✅
111
### Miniflux ✅
1d634d admin 2025-09-03 14:28:17
added initial page
112
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
113
**Backups**
114
1d634d admin 2025-09-03 14:28:17
added initial page
115
[FAQ → miniflux.app](https://miniflux.app/faq.html#backup)
116
117
[postgresql dump restore → postgresql.org](https://www.postgresql.org/docs/current/backup-dump.html)
118
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
119
Miniflux stores all it's data in a PostgreSQL db.
120
121
We can dump it with:
122
123
```bash
124
docker compose exec -T db pg_dump -U miniflux miniflux > miniflux_backup.sql
125
```
126
127
**Restore**
128
129
Start the db service:
1d634d admin 2025-09-03 14:28:17
added initial page
130
131
```bash
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
132
docker compose up -d db
1d634d admin 2025-09-03 14:28:17
added initial page
133
```
134
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
135
Then run the dump restoration command:
136
137
```bash
138
cat ./miniflux_backup.sql | podman-compose exec -T db psql -U miniflux miniflux
139
```
140
141
Then start the miniflux service:
142
143
```bash
144
docker compose up -d miniflux
145
```
1d634d admin 2025-09-03 14:28:17
added initial page
146
3aae9d theophile 2025-10-07 14:33:16
cleanup
147
---
148
5d7331 theophile 2025-10-07 18:01:31
readeck warning and instructions
149
### Readeck ⚠️
1d634d admin 2025-09-03 14:28:17
added initial page
150
151
[Backups → readeck.org](https://readeck.org/en/docs/backups)
152
153
```bash
5d7331 theophile 2025-10-07 18:01:31
readeck warning and instructions
154
# docker exec -i readeck sh -c 'readeck export "/readeck/readeck_backup_$(date +%Y%m%dT%H%M%S).zip"'
155
docker compose exec app readeck export -config config.toml export.zip
1d634d admin 2025-09-03 14:28:17
added initial page
156
```
157
158
to import, do the same and specifying the config file.
159
160
Needs to be recuring via cron job or script. Could also be built by script that
161
does the overall backup, since backup is quick.
162
5d7331 theophile 2025-10-07 18:01:31
readeck warning and instructions
163
:::info
164
The export tool with docker compose exec currently does not work.
165
:::
166
3aae9d theophile 2025-10-07 14:33:16
cleanup
167
---
168
1d634d admin 2025-09-03 14:28:17
added initial page
169
### Caddy
170
171
It is sufficient to backup the `/mnt/data/caddy`. The most important folders
172
inside are:
173
174
- `./Caddyfile`
175
- `./html/`
176
177
To restore, the both should be in the same folder, for the Caddyfile contains
178
the paths to the different root folders for the websites hosted.
179
3aae9d theophile 2025-10-07 14:33:16
cleanup
180
---
181
5f0d87 theophile 2025-10-04 11:59:42
openwebui backup instructions
182
### OpenWebUI
183
184
We do not backup the `ollama` models. We only handle the `openwebui` data.
185
186
187
- [Backing Up Your Instance - openwebUI docs](https://docs.openwebui.com/tutorials/maintenance/backups/#scripting-a-backup-job)
188
189
190
**Dir structure**:
191
```
192
├── audit.log
193
├── cache/
194
├── uploads/
195
├── vector_db/
196
└── webui.db
197
```
198
1d65de theophile 2025-10-04 12:00:32
format improvement to openwebui section
199
1. Cold backup approach - Stops the container before backup for data integrity
200
2. Copies the entire `/webui` folder including:
201
- webui.db (main database with chats, users, settings)
202
- uploads/ (uploaded files)
203
- cache/ (cached data)
204
- vector_db/ (RAG/Knowledge embeddings)
5f0d87 theophile 2025-10-04 11:59:42
openwebui backup instructions
205
3aae9d theophile 2025-10-07 14:33:16
cleanup
206
---
5f0d87 theophile 2025-10-04 11:59:42
openwebui backup instructions
207
1d634d admin 2025-09-03 14:28:17
added initial page
208
## Missing or broken installs
209
210
- archivebox
211
- bookstack
212
- etherpad
213
- synapse