-
-
Notifications
You must be signed in to change notification settings - Fork 216
Managing Nextcloud snap with Snap
man snap
snap --help
snap <command> --help
also
snap <command> <option> --help
Documentation and further reading:
List enabled snaps on host
sudo snap list
List all snaps and revisions on host
sudo snap list --all
Enable Nextcloud snap to start automatically
sudo snap enable nextcloud
Disable Nextcloud snap from starting automatically
sudo snap disable nextcloud
Start Nextcloud snap manually
sudo snap start nextcloud
Stop Nextcloud snap manually
sudo snap stop nextcloud
Restart Nextcloud snap manually
sudo snap restart nextcloud
Update Nextcloud snap manually
sudo snap refresh nextcloud
Revert Nextcloud snap to last retained revision
sudo snap revert nextcloud
Revert Nextcloud snap to defined revision
sudo snap revert nextcloud --revision=xxxxx
Refresh to stable channel
sudo snap refresh nextcloud --stable
or defined channel
sudo snap refresh --channel=25/stable nextcloud
- Stop Nextcloud (optional but recommended)
sudo snap stop nextcloud
- Create snapshot
sudo snap save nextcloud
- Start Nextcloud (see 1.)
sudo snap start nextcloud#
-
Find snapshot (
*.zip
) in/var/lib/snapd/snapshots
and copy/move to backup media
The above procedure may be scripted (example script)
- When moving to new device, be sure to install Nextcloud snap first
- Snap restore replaces previous installation incl. certs, DB and data
- See documentation in
snap restore --help
and snapcraft
-
Copy snapshot (
*.zip
) from backup media to/var/lib/snapd/snapshots
-
Discover snapshot-ID using
snap saved
-
Restore snapshot
sudo snap restore "snapshot-ID"
sudo snap forget "snapshot-ID"
Use snap option refresh.retain
to set the maximum number of a snap revisions stored by the system after the next refresh:
Value = Number of revisions retained
sudo snap set system refresh.retain=2
This will remove Nextcloud snap from your system but will create a snapshot
sudo snap remove nextcloud
This will completely remove Nextcloud snap including revisions
sudo snap remove --purge nextcloud
WARNING!!
Be sure you want to remove snapd completely
This is final! All snaps, revisions, backups and settings will be removed
This will completely remove snapd including all installed enabled/disabled snaps and all revisions from your system
sudo apt remove snapd
Nextcloud snap Wiki, use all information and scripts at own risk