Blame
|
1 | # Backup & Restore |
||||||
| 2 | ||||||||
| 3 | Cette page est dédier à la sauvegarde et restoration des services sur le serveur. |
|||||||
|
4 | |||||||
| 5 | ## Services |
|||||||
|
6 | > [!NOTE] |
||||||
|
7 | > As of _25/08/08_ → **20 GiB** approximatly. It should not grow very fast, since it is |
||||||
|
8 | > mostly configuration files and a text wiki. |
||||||
|
9 | |||||||
| 10 | Media is backed up seperatly where necessary: |
|||||||
| 11 | ||||||||
| 12 | - jellyfin |
|||||||
| 13 | - navidrome |
|||||||
| 14 | ||||||||
|
15 | ### Otterwiki |
||||||
|
16 | |||||||
|
17 | OtterWiki being a flatfile wiki, we can back it up by simply copying the |
||||||
| 18 | `/mnt/data/otterwiki` folder. |
|||||||
|
19 | |||||||
|
20 | ### Forgejo |
||||||
| 21 | ||||||||
|
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 |
|||||||
|
25 | |||||||
| 26 | ```bash |
|||||||
|
27 | docker compose exec -u git forgejo forgejo dump --file /tmp/forgejo-dump.zip |
||||||
|
28 | ``` |
||||||
|
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 | ||||||||
| 43 | Move all relevant files to their location in the mounted volumes. |
|||||||
| 44 | ||||||||
| 45 | ||||||||
|
46 | |||||||
|
47 | ### Jellyfin |
||||||
| 48 | ||||||||
| 49 | [Backup and Restore → jellyfin.org](https://jellyfin.org/docs/general/administration/backup-and-restore) |
|||||||
| 50 | ||||||||
| 51 | Stop the container completly, then copy the config folder (maybe nothing else ?) |
|||||||
| 52 | → `/mnt/data/jellyfin/config` |
|||||||
| 53 | ||||||||
| 54 | ### Kavita |
|||||||
| 55 | ||||||||
| 56 | [Backups → wiki.kavitareader.com](https://wiki.kavitareader.com/guides/admin-settings/tasks/#kavita-backup) |
|||||||
| 57 | ||||||||
| 58 | Backups are already generated, in `/mnt/data/kavita/config/backups`. |
|||||||
| 59 | ||||||||
| 60 | ### Navidrome |
|||||||
| 61 | ||||||||
| 62 | [Automated Backup → navidrome.org](https://www.navidrome.org/docs/usage/backup/) |
|||||||
| 63 | ||||||||
| 64 | Backup can be automated via config file or env variables. Location is |
|||||||
| 65 | `/mnt/data/navidrome/backup`. |
|||||||
| 66 | ||||||||
| 67 | ### Miniflux |
|||||||
| 68 | ||||||||
| 69 | [FAQ → miniflux.app](https://miniflux.app/faq.html#backup) |
|||||||
| 70 | ||||||||
| 71 | [postgresql dump restore → postgresql.org](https://www.postgresql.org/docs/current/backup-dump.html) |
|||||||
| 72 | ||||||||
| 73 | Miniflux stores all it's data in the postgresql db. We can dump it: |
|||||||
| 74 | ||||||||
| 75 | ```bash |
|||||||
| 76 | sudo bash -c "docker compose exec db pg_dump -U miniflux miniflux" > miniflux_backup.sql |
|||||||
| 77 | ``` |
|||||||
| 78 | ||||||||
| 79 | And use the file to restore it later. |
|||||||
| 80 | ||||||||
| 81 | ### Readeck |
|||||||
| 82 | ||||||||
| 83 | [Backups → readeck.org](https://readeck.org/en/docs/backups) |
|||||||
| 84 | ||||||||
| 85 | ```bash |
|||||||
| 86 | docker exec -i readeck sh -c 'readeck export "/readeck/readeck_backup_$(date +%Y%m%dT%H%M%S).zip"' |
|||||||
| 87 | ``` |
|||||||
| 88 | ||||||||
| 89 | to import, do the same and specifying the config file. |
|||||||
| 90 | ||||||||
| 91 | Needs to be recuring via cron job or script. Could also be built by script that |
|||||||
| 92 | does the overall backup, since backup is quick. |
|||||||
| 93 | ||||||||
| 94 | ### Caddy |
|||||||
| 95 | ||||||||
| 96 | It is sufficient to backup the `/mnt/data/caddy`. The most important folders |
|||||||
| 97 | inside are: |
|||||||
| 98 | ||||||||
| 99 | - `./Caddyfile` |
|||||||
| 100 | - `./html/` |
|||||||
| 101 | ||||||||
| 102 | To restore, the both should be in the same folder, for the Caddyfile contains |
|||||||
| 103 | the paths to the different root folders for the websites hosted. |
|||||||
| 104 | ||||||||
|
105 | ### OpenWebUI |
||||||
| 106 | ||||||||
| 107 | We do not backup the `ollama` models. We only handle the `openwebui` data. |
|||||||
| 108 | ||||||||
| 109 | ||||||||
| 110 | - [Backing Up Your Instance - openwebUI docs](https://docs.openwebui.com/tutorials/maintenance/backups/#scripting-a-backup-job) |
|||||||
| 111 | ||||||||
| 112 | ||||||||
| 113 | **Dir structure**: |
|||||||
| 114 | ``` |
|||||||
| 115 | ├── audit.log |
|||||||
| 116 | ├── cache/ |
|||||||
| 117 | ├── uploads/ |
|||||||
| 118 | ├── vector_db/ |
|||||||
| 119 | └── webui.db |
|||||||
| 120 | ``` |
|||||||
| 121 | ||||||||
|
122 | 1. Cold backup approach - Stops the container before backup for data integrity |
||||||
| 123 | 2. Copies the entire `/webui` folder including: |
|||||||
| 124 | - webui.db (main database with chats, users, settings) |
|||||||
| 125 | - uploads/ (uploaded files) |
|||||||
| 126 | - cache/ (cached data) |
|||||||
| 127 | - vector_db/ (RAG/Knowledge embeddings) |
|||||||
|
128 | |||||||
| 129 | ||||||||
|
130 | ## Missing or broken installs |
||||||
| 131 | ||||||||
| 132 | - archivebox |
|||||||
| 133 | - bookstack |
|||||||
| 134 | - etherpad |
|||||||
| 135 | - synapse |
|||||||