Nextcloud snap stopped working after an update. What can I do?
See FAQ’s and what to do if an update breaks my Nextcloud
First of all, let’s get you back up and running. Snaps were designed to have a robust upgrade story. In the case of the Nextcloud snap, every time it refreshes (updates), it takes a snapshot of the database and other version-specific things (not the raw data though, e.g. pictures and documents) and holds them alongside the old revision of the snap.
sudo snap revert nextcloud
With that command, you should be back up and running right at the moment before the update happened.
Now would be a good time to Backup your Nextcloud… just to be safe. see Backup, restore & migrate
Nextcloud snap stopped working, I have no Backup, where is my data?
There are various factors that could cause an issue with your Nextcloud snap instance. Your logs may help find a probable cause. There is a good chance someone in the community has had a similar issue and knows how to resolve it. That depends on how you request assistance. So read your request for tone, avoiding hyperbole and assuming good intentions.
IMPORTANT
Most importantly don’t panic! Relax, take a deep breath, get a cup of tea and consider your options. Recollect all steps taken and note recent changes and then structure that information. Do the basics and try to get a grasp of the situation.
See getting help
CAUTION
Not having a backup makes a bad situation worse. There is nothing anyone can do if you don’t backup your data. A good backup strategy will enable data recovery in the case of disaster. So depending on your backup frequency and how often you practice restoring your backup, you’ll have a good chance of system recovery within a couple of hours with limited data loss. See backup, restore & migrate Nextcloud snap.
TIP
Depending on the type of failure, there is a good chance of recovering your raw data. By default all the stuff you care about is in the
/var/snap/nextcloud
directory. So just copy the entire directory to another drive (or machine). In the worst case you lose your database, but at least you’ll preserve your raw data. Your raw data can be found in/var/snap/nextcloud/common/nextcloud/data
if you haven’t changed your data directory.