How to revert Nextcloud snap after failed update

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.

To prevent subsequent snap updates until you’ve solved the issue you can hold automatic updates;

sudo snap hold nextcloud

IMPORTANT

Don’t forget to unhold automatic updates when the issue is solved;

sudo snap unhold nextcloud

Now would be a good time to Backup your Nextcloud… just to be safe. See Backup, restore & migrate

Once the issue is solved and you’d like to execute the update manually, issue the command;

sudo snap refresh nextcloud

See managing Nextcloud snap with snap


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.

see How to manage Nextcloud snap with snap
see How to backup, restore and migrate Nextcloud snap
see How to manage Nextcloud snap logs
see How to manage failed automatic update in Nextcloud snap
see How to manage Nextcloud snap with snap
see How to manage automatic updates in Nextcloud snap

2 Likes
How-to/FAQ WIKI
Internal server error: "no app in context"
always use HTTPS on production servers - where is the Apache VirtualHosts configuration file
How to manage failed automatic update in Nextcloud snap
Unable to log in and not able to understand the log in nextcloud/data/
Calendar app on Android does not sync with NextCloud anymore
Problems installing recognize dependencies
INVALID_HASH of Collabora_Online.AppImage
Nextcloud snap, welcome - automatic update failed
Nextcloud SNAP install suddenly satuats WAN on connection to github
MySql crashes on startup - Snap installation
Android Nextcloud app upload errors
Error in Desktop Notifications for Nextcloud Progressive Web App instance
Nextcloud Snap server stops working after installing custom SSL certificate from GoDaddy
Let nextcloud listen on one IP address only
Cookbook and reverse proxy
Let's Encrypt Zertifikat abgelaufen
Nextcloud (Snap) 0770 Permission Denied on rclone Google Drive Mount (chown has no effect)
Unable to see added storage of 2TB hdd within System disk free space.
Photos tab groups a JST JPEG under the next month despite EXIF OffsetTimeOriginal=+09:00 — known issue?
Cannot login with correct password and no error message
Snap updated to 32.0.9snap1 and encountering internal server error, reverting does not fix.
How to change SNAP_DATA
Delete spreed signaling server account on Nextcloud Snap
Snap: Can't update, add, or remove apps
Using Acme/LetsEncrypt for TLS Certificate for NextCloud and for VPN on Firewall
The dreaded generic "Internal Server Error"
Nextcloud snap, welcome - missing support template
No access to the Nextcloud snap - who can help
Nobody can connect to nextcloud anymore (Need support)
Limiting RAM Use
Self-Hosted Nextcloud, Data Directory to SSD Error