Backup & Restore

Cette page est dédier à la sauvegarde et restoration des services sur le serveur.

Services

Note

As of 25/08/0820 GiB approximatly. It should not grow very fast, since it is mostly configuration files and a text wiki.

Large Media is backed up seperatly when necessary:

  • jellyfin
  • navidrome

Otterwiki ✅

OtterWiki being a flatfile wiki, we can back it up by simply copying the /mnt/data/otterwiki folder and restoring it.


Forgejo ✅

Backup

Based on the documentation and this analysis of gitea backups, we can run

docker compose exec -u git forgejo forgejo dump --file /tmp/forgejo-dump.zip

Then copy out the file and rename it at the same time:

docker compose cp forgejo:/tmp/forgejo-dump.zip /mnt/data/backups/forgejo/forgejo-backup-$(date +%Y%m%d-%H%M%S).zip

Pour finir, on supprime l'archive du dossier /tmp dans le container:

docker compose exec forgejo rm /tmp/forgejo-dump.zip

Restore

Move all relevant files to their location in the mounted volumes:

docker compose up 
# Arreter un peu après. C'est pour générer la structure de dossiers.
unzip forgejo-dump-1610949662.zip
cd forgejo-dump-1610949662
mv app.ini $FORGEJO_DATA_DIR/gitea/conf/app.ini
mv data/* $FORGEJO_DATA_DIR/gitea/data/
mv log/* $FORGEJO_DATA_DIR/gitea/log/
mv repos/* $FORGEJO_DATA_DIR/git/repositories/
chown -R docker:docker $FORGEJO_DATA_DIR/

# Je garde les commandes ci-dessous comme archives. La db se trouve déjà dans data/. 
# De fait, on peut s'arrêter là, et on a pas besoin du dump, car sqlite3 est en format single file.

# sqlite3
# sqlite3 $DATABASE_PATH <gitea-db.sql

# Commandes pour d'autres types de DB:
# mysql
# mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE <gitea-db.sql
# postgres
# psql -U $USER -d $DATABASE < gitea-db.sql

Jellyfin

Backup and Restore → jellyfin.org

Backup

  1. Stop the container completly
  2. Copy the config folder → /mnt/data/jellyfin/config

Alternatively,

To take a new Backup, enter the Jellyfin Dashboard, open the Backups tab and click on the Create Backup button. The popup will now ask you to select what data you want to backup.

  • Database. Always enabled. Will contain all data from the jellyfin.db or used database provider.
  • Metadata. The contents of the metadata folder and depending on your selected options may contain metadata images.
  • Subtitles. All extracted subtitles including downloaded ones.
  • Trickplay. All trickplay data that is stored not alongside media.

The Backup system will check for at least 4GB of free space in the backup folder where backups a written to. However this can easily not be enough if you also backup Subtitles and Trickplay so ensure you have enough free space there. The Backup folder is located within your Jellyfin data directory which is located in

Restore

To restore from a Backup you can either use the webUI by navigating to the same view as for the step above and clicking on the restore button in the list of backups, or you can start jellyfin with the --restore-archive PATH_TO_BACKUP_ZIP argument. Note that when you start a restore from the webUI, you server will immediately restart for this process to take place and will be unavailable for that time.


Kavita

Backups → wiki.kavitareader.com

Backups are already generated, in /mnt/data/kavita/config/backups.


Automated Backup → navidrome.org

Backup

Backup can be automated via config file or env variables. Location is /mnt/data/navidrome/backup.

Alternatively, we can also directly start a backup from inside the container:

sudo docker compose run <service_name> backup create
# service_name is usually `navidrome`

We can also prune old backups with:

sudo docker compose run <service_name> backup prune
# service_name is usually `navidrome`

Restore

When you restore a backup, the existing data in the database is wiped and the data in the backup gets copied into the database.

Note: YOU MUST BE SURE TO RUN THIS COMMAND WHILE THE NAVIDROME APP IS NOT RUNNING/LIVE.

Restore a backup by running the navidrome backup restore command. :::warning Attention Restoring a backup should ONLY be done when the service is NOT running. You’ve been warned. :::


Miniflux ✅

Backups

FAQ → miniflux.app

postgresql dump restore → postgresql.org

Miniflux stores all it's data in a PostgreSQL db.

We can dump it with:

docker compose exec -T db pg_dump -U miniflux miniflux > miniflux_backup.sql

Restore

Start the db service:

docker compose up -d db

Then run the dump restoration command:

cat ./miniflux_backup.sql | podman-compose exec -T db psql -U miniflux miniflux

Then start the miniflux service:

docker compose up -d miniflux

Readeck ✅

Backups → readeck.org

Backup

docker compose exec app readeck export -config /readeck/config.toml /readeck/readeck_backup_"$(date +%Y%m%dT%H%M%S)".zip

Restore

To import:

docker compose exec app readeck import -config /readeck/config.toml /readeck/readeck_backup_"$(date +%Y%m%dT%H%M%S)".zip

Caddy ✅

It is sufficient to backup the /mnt/data/caddy. The most important folders inside are:

  • ./Caddyfile
  • ./html/

To restore, the both should be in the same folder, for the Caddyfile contains the paths to the different root folders for the websites hosted.


OpenWebUI

We do not backup the ollama models. We only handle the openwebui data.

Dir structure:

├── audit.log
├── cache/
├── uploads/
├── vector_db/
└── webui.db
  1. Cold backup approach - Stops the container before backup for data integrity
  2. Copies the entire /webui folder including:
    • webui.db (main database with chats, users, settings)
    • uploads/ (uploaded files)
    • cache/ (cached data)
    • vector_db/ (RAG/Knowledge embeddings)

Medama

n.a.


Paperless-ngx

n.a.


Missing or broken installs

  • archivebox
  • bookstack
  • etherpad
  • synapse
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9