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