Vikunja seems to have erased all users and data


I installed Vikunja a few weeks ago on a self hosted docker instance and everything was working great. Last night I went to login and was denied upon further inspection (querying the SQL database) I discovered all my users and seemingly all data had been erased. Is it possible to recover this? Is there anyway to prevent it in the future? If possible I would really like to recover it because I had some pretty in depth trip plans done in Vikunja.

I’m afraid the only way to recover this is by importing the last db backup.

Vikunja won’t delete anything all by itself. Only when you manually delete a user via the cli.

Thanks for the response, Hmm unfortunately I didn’t make a backup before it happened. I definitely didn’t do it, I didn’t even know there was a CLI until yesterday when I was researching this problem. Do you know of anyway I can look at the logs to see when it happened and if the CLI was used to delete them? I am the only person that should be able to SSH into the server, so something is definitely up if that happened.

You could check the logs to see if the cli was used to delete them but if you did not change the logs to go to a file instead of stdout there’s probably not much there.

Do you have the db volume persisted? My guess is the server restarted at some point which would have restarted the container. If the db volume is not persisted that might have removed the db data. If that’s the case you could see the Vikunja api service restarted when the data was gone.

I believe I have it bind mounted. I just did both a hard (pulled the plug) and soft (sudo reboot) on the server, and the new database persisted through all that. So I guess i’m still sort of at a loss for what may have caused it… seems very strange.

Seems very strange indeed. Did you check if only users were deleted or all data?

From what I can tell, everything was deleted. My only guess so far is that I am using watchtower to update my containers and mariadb pushed an update. When this happened, it deleted the container along with all the data.

Tarsnap is a good and cheap automatable off site backup option fwiw.

Since you’re running with docker, you might find my backup tool come in handy as well.