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
9d5404 theophile 2025-10-10 16:01:27
navidrome instructions
106
#### Backup
107
1d634d admin 2025-09-03 14:28:17
added initial page
108
Backup can be automated via config file or env variables. Location is
109
`/mnt/data/navidrome/backup`.
110
9d5404 theophile 2025-10-10 16:01:27
navidrome instructions
111
Alternatively, we can also directly start a backup from inside the container:
112
113
```bash
114
sudo docker compose run <service_name> backup create
115
# service_name is usually `navidrome`
116
```
117
118
We can also prune old backups with:
119
120
```bash
121
sudo docker compose run <service_name> backup prune
122
# service_name is usually `navidrome`
123
```
124
#### Restore
125
126
When you restore a backup, the existing data in the database is wiped and the data in the backup gets copied into the database.
127
128
Note: YOU MUST BE SURE TO RUN THIS COMMAND WHILE THE NAVIDROME APP IS NOT RUNNING/LIVE.
129
130
Restore a backup by running the navidrome backup restore command.
131
:::warning
132
Attention
133
Restoring a backup should ONLY be done when the service is NOT running. You’ve been warned.
134
:::
135
3aae9d theophile 2025-10-07 14:33:16
cleanup
136
---
137
6518e9 theophile 2025-10-07 16:10:26
miniflux check ✅
138
### Miniflux ✅
1d634d admin 2025-09-03 14:28:17
added initial page
139
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
140
**Backups**
141
1d634d admin 2025-09-03 14:28:17
added initial page
142
[FAQ → miniflux.app](https://miniflux.app/faq.html#backup)
143
144
[postgresql dump restore → postgresql.org](https://www.postgresql.org/docs/current/backup-dump.html)
145
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
146
Miniflux stores all it's data in a PostgreSQL db.
147
148
We can dump it with:
149
150
```bash
151
docker compose exec -T db pg_dump -U miniflux miniflux > miniflux_backup.sql
152
```
153
154
**Restore**
155
156
Start the db service:
1d634d admin 2025-09-03 14:28:17
added initial page
157
158
```bash
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
159
docker compose up -d db
1d634d admin 2025-09-03 14:28:17
added initial page
160
```
161
64543b theophile 2025-10-07 15:53:14
miniflux backup and restore
162
Then run the dump restoration command:
163
164
```bash
165
cat ./miniflux_backup.sql | podman-compose exec -T db psql -U miniflux miniflux
166
```
167
168
Then start the miniflux service:
169
170
```bash
171
docker compose up -d miniflux
172
```
1d634d admin 2025-09-03 14:28:17
added initial page
173
3aae9d theophile 2025-10-07 14:33:16
cleanup
174
---
175
5d7331 theophile 2025-10-07 18:01:31
readeck warning and instructions
176
### Readeck ⚠️
1d634d admin 2025-09-03 14:28:17
added initial page
177
178
[Backups → readeck.org](https://readeck.org/en/docs/backups)
179
180
```bash
5d7331 theophile 2025-10-07 18:01:31
readeck warning and instructions
181
# docker exec -i readeck sh -c 'readeck export "/readeck/readeck_backup_$(date +%Y%m%dT%H%M%S).zip"'
182
docker compose exec app readeck export -config config.toml export.zip
1d634d admin 2025-09-03 14:28:17
added initial page
183
```
184
185
to import, do the same and specifying the config file.
186
187
Needs to be recuring via cron job or script. Could also be built by script that
188
does the overall backup, since backup is quick.
189
5d7331 theophile 2025-10-07 18:01:31
readeck warning and instructions
190
:::info
191
The export tool with docker compose exec currently does not work.
192
:::
193
3aae9d theophile 2025-10-07 14:33:16
cleanup
194
---
195
1d634d admin 2025-09-03 14:28:17
added initial page
196
### Caddy
197
198
It is sufficient to backup the `/mnt/data/caddy`. The most important folders
199
inside are:
200
201
- `./Caddyfile`
202
- `./html/`
203
204
To restore, the both should be in the same folder, for the Caddyfile contains
205
the paths to the different root folders for the websites hosted.
206
3aae9d theophile 2025-10-07 14:33:16
cleanup
207
---
208
5f0d87 theophile 2025-10-04 11:59:42
openwebui backup instructions
209
### OpenWebUI
210
211
We do not backup the `ollama` models. We only handle the `openwebui` data.
212
213
214
- [Backing Up Your Instance - openwebUI docs](https://docs.openwebui.com/tutorials/maintenance/backups/#scripting-a-backup-job)
215
216
217
**Dir structure**:
218
```
219
├── audit.log
220
├── cache/
221
├── uploads/
222
├── vector_db/
223
└── webui.db
224
```
225
1d65de theophile 2025-10-04 12:00:32
format improvement to openwebui section
226
1. Cold backup approach - Stops the container before backup for data integrity
227
2. Copies the entire `/webui` folder including:
228
- webui.db (main database with chats, users, settings)
229
- uploads/ (uploaded files)
230
- cache/ (cached data)
231
- vector_db/ (RAG/Knowledge embeddings)
5f0d87 theophile 2025-10-04 11:59:42
openwebui backup instructions
232
3aae9d theophile 2025-10-07 14:33:16
cleanup
233
---
5f0d87 theophile 2025-10-04 11:59:42
openwebui backup instructions
234
9d5404 theophile 2025-10-10 16:01:27
navidrome instructions
235
### Medama
236
237
n.a.
238
239
---
240
1d634d admin 2025-09-03 14:28:17
added initial page
241
## Missing or broken installs
242
243
- archivebox
244
- bookstack
245
- etherpad
246
- synapse