Lost all Baikal data when updating Raspbian
Baikal version: 0.10.1
Expected behaviour: The Baikal database should not be affected by a Debian (Raspbian) system update.
Current behaviour: Everything seems to be lost, Baikal is greeting me with initial setup upon 'docker-compose up -d'
Steps to reproduce:
- sudo apt update
- sudo apt upgrade
- sudo reboot
- docker-compose up -d
The docker-compose.yml file:
version: '3'
services:
baikal:
image: ckulka/baikal:latest
container_name: baikal
ports:
- "82:80"
volumes:
- baikal-data:/var/www/html/Specific
environment:
BAIKAL_DAV_REALM: "MyBaikalServer"
volumes:
baikal-data:
There is neither /var/www/baikal folder nor /var/www/html/Specific any more...
I have the calendar and contacts data still on my mobile phone and set the DAVx5 option to "manual sync only" to prevent further loss, but I would need advice on
- how to restore the data
- how to prevent that happening again
Hi. From my perspective, the only thing we can do it's a backup for these 2 folders /var/www/baikal /var/www/html/Specifi. And that's all for now....
Thanks for your answer. In the meantime I have resorted to using my Synology NAS' calendar tool as the base CALDAV source. Works, so I doubt I will reconsider Baikal. 🤷🏽♂️
Does Synology NAS app has more pros in comparation to Baikal ?
The backup is built in, so to say, by the RAID functionality. It has its own HTML based calendar and tasks app (a contacts app as well, but I do not like that too much).
Just my two cents: This seems like a Docker "issue" and not at all related to this project. If you're using SQLite (default), which is stored in /Specific/db/db.sqlite, then there's no way to restore this after loss. I have no idea why the volume got wiped, based on the OP. The only advice I can give is to not use docker volumes for non-volatile data.
My config looks like this:
volumes:
- ./data/config:/var/www/baikal/config
- ./data:/var/www/baikal/Specific
Since I'm using MySQL as my storage backend, there's no real need for the Specific folder to be backed up. I run a cronjob for daily backups of my docker projects, with their respective data. Consecutively, I run MySQL backups. You can of course also run backups on docker volumes, but they're a bit more tricky to setup.
volumes: - ./data/config:/var/www/baikal/config - ./data:/var/www/baikal/Specific
So I can't backup these folders and then restore?