![]() ![]()
|
I am currently setting up a tape backup.
Looking at the user's home directory I see there are lots of files in ~/.local/share/akonadi/db_data/. Considering that it is a live database I suppose it would be very incorrect to simply copy the files and I should rather make a database dump. On the other hand being logged in as root in mysql and running 'show databases;' does not show a database for akonadi at all which means I can't even find a way to dump the database to an .sql file. So what is the proper way to do this? |
![]() Administrator ![]()
|
You need to use the my.cnf that's in ~./local/share/akonadi and connect to the socket Akonadi uses. Unless configured differently, Akonadi runs its own instance of mysql / mariadb, running as the user in the session.
"Violence is the last refuge of the incompetent."
![]() Plasma FAQ maintainer - Plasma programming with Python |
![]() ![]()
|
Thanks. In the meantime I learned how to make Akonadi use the central mariadb mysql db. So now I can dump it as a regular db.
After doing that: which files/dirs in ~/.local/share/akonadi are safe to remove? |
![]() Administrator ![]()
|
lost+found there can be ignored. The rest is pretty much essential IMO.
"Violence is the last refuge of the incompetent."
![]() Plasma FAQ maintainer - Plasma programming with Python |
![]() Registered Member ![]()
|
Sorry to barge in on this.
Is there are ready-made process to freeze & flush the akonadi databases of all the users at backup time and keep them frozen till backup has been performed? To keep interruption to a minimum, one would probably want to freeze & flush all user database, snapshot the home partition at LVM level, unfreeze the databases and then proceed with backing up the snapshot, file per file (no database dumps involved as the database backing files would be consistent). I suppose someone must have done that already? Possibly via systemd black magic. I have also noticed that akonadiserver/mysql process may merrily chug along even if the owning user in question has logged off, which may be a problem,? Best regards, -- David |
![]() KDE Developer ![]()
|
I can't help with the backup, I'm not really sure if there is even a way to do it like this, at least there is no mechanism to inhibit Akonadi so that you can snapshot both the database and ~/.local/share/akonadi.
To be honest I doubt the need for actually backing up Akonadi data dir. Those are just locally cached data from remote (or other local) sources, so in case of failure users won't actually lose any data as they are permanently stored elsewhere (IMAP server, CalDAV server, local maildir, ...). There will be the extra annoyance of setting up all resources and synchronizing all the data again, but that might in the end turn out to be less hassle than implementing a proper backup strategy for Akonadi ![]()
Daniel Vrátil | www.dvratil.cz | dvratil@kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde) |
![]() ![]()
|
I have set it up to use external mysql DB and I dump and backup all mysql DB's to files before running backup. That's the best setup imho.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]