Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 46
Nextcloud
Connect to your device using SSH then run
snap run nextcloud.occ
Usually if upgrade fails because of apps Nextcloud may be left in a maintenance mode. The way out is to identify which apps are failing to upgrade and sisable them.
Here is the example for passwords app, apps will be different in your case:
snap run nextcloud.occ app:disable passwords
snap run nextcloud.occ maintenance:repair
snap run nextcloud.occ upgrade
snap run nextcloud.occ maintenance:mode --off
Install the app https://apps.nextcloud.com/apps/previewgenerator
snap run nextcloud.occ preview:generate-all -vvv
Use Nextcloud Client to sync your local files to Nextcloud device, it may take some time.
You may want to attach a disk with existing files, make sure they are in the right directory: /nextcloud/[user]/files
Then Attach it to Syncloud device and activate in storage settings.
Another way is to copy files to device into /data/nextcloud/[user]/files
sudo chown -R nextcloud:nextcloud /data/nextcloud
Scan files to Nextcloud by running this command on the device:
snap run nextcloud.occ files:scan --all
This will permanently remove all deleted files. It is also a workaround for Trash problems when Nextcloud is installed over existing deleted files in user storage directory.
snap run nextcloud.occ trashbin:cleanup --all-users
To enter a database shell use the folowing command:
snap run nextcloud.psql
cd /tmp
git clone https://codeberg.org/BernieO/calcardbackup.git
cd calcardbackup
mkdir backup
sudo chown -R nextcloud:nextcloud .
sudo -u nextcloud PATH="${PATH}:/snap/bin" ./calcardbackup /var/snap/nextcloud/current/nextcloud -p -o backup
Check
snap run nextcloud.psql -c "select * from oc_ldap_group_mapping"
Show groups:
snap run nextcloud.occ group:list
Make all admins
snap run nextcloud.psql -c "update oc_ldap_group_mapping set owncloud_name = 'admin'"
snap run nextcloud.occ config:system:set default_phone_region --value="GB"
With two letter code (Alpha 2) from here: Country codes
Nextcloud only allows one major version step at a time. If your device has been offline for a while it may be several majors behind, and a single refresh would try to skip versions.
Step through the majors that are still on the store, one at a time. Connect with SSH and run:
snap refresh nextcloud --revision=996
Wait for it to finish before going further. The web page shows "Nextcloud is upgrading" while the database migration runs, and
snap run nextcloud.repair-status
reports every step and any error. When it reports "done":true with no errors,
continue:
snap refresh nextcloud
Revisions currently on the store:
| revision | Nextcloud |
|---|---|
| 968 | 32 |
| 996 | 33 |
| 1011 | 34 |
Only the most recent revisions are kept; older ones are removed from the store. If your device is older than the oldest revision listed above there is no upgrade path left through the store - back up your data, remove and reinstall the app, then restore.