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