I mistakenly deleted a whole team but managed to recover it #3713
denisgomesfranco
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone, I've been using Umami for quite a few months now to monitor my clients' Woocommerce stores. Umami has been great, everyone loves it! And I'd like to share a little story on how I messed up but managed to fix my mistake.
I was doing the rounds one day and went on to delete a website that wasn't being tracked anymore. But instead of going into the site configuration, I mistakenly opened the general configuration instead, and proceeded with the deletion. This deleted my whole team with 100+ sites in it.
I only noticed my mistake a couple days later. But since I had daily backups enabled on PikaPods I thought "Okay, I just need to restore a previous backup". So I learned how to use Restic to retrieve backups, but then another problem came up: the dump files were over 7 GB. PikaPods provides Adminer for database administration but there's no way I can upload a 7 GB dump file. So I asked them for help and they said to upload the file somewhere where they'll download and then restore the dump for me.
Then I had to check which file I should send for restoration, as it would have to be the file from the day before I deleted the team. And while checking that, and looking at the database structure on Adminer, I noticed something: the sites from that team were actually still in there, with all their events and everything! Plus, Umami was still recording events for those (presumably deleted) websites.
So, all I had to do was to restore the team, restore the team user, and then reassociate the websites with that team. I opened the dump file on Notepad++ with the help of the BigFiles plugin, searched for the missing information, added them manually via Adminer, and voilà: everything is now back on track and working just fine like before, with all the events from the previous days still recorded just fine.
Afterwards I went on to delete that one site I meant to delete in the first place and now I noticed something else: Umami took quite some time to complete the operation. It seems that this time Umami really wiped all the data from that site. When I deleted the team, Umami did it very quickly, that is, it did not delete the sites nor the data when deleting the team. And I'm very, very glad that it did not do this cleanup when deleting the team! So the sites were kinda "orphaned" and because of that I was able to fix my mistake.
I am glad I have backups but I am also glad that Umami is like this. It really saved my butt 😆
Beta Was this translation helpful? Give feedback.
All reactions