dietpi-software: implement ownCloud Infinite Scale #7886
Merged
+249
−464
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Request: #6210
Since ownCloud 10 still does not support PHP 8.x (and does not seem to be developed anymore), it cannot be installed on any supported Debian with DietPi 10. But there is ownCloud Infinite Scale since a few years.
Test installs: https://github.com/MichaIng/DietPi/actions/runs/20659277460
I was actually hoping it would include an embedded migration function to import all data and compatible metadata+settings, but such does not exist. Easiest is probably to sync files back from clients.
rcloneis an alternative to sync from WebDAV to WebDAV endpoint, but this does not work after upgrade to Debian Bookworm or above where ownCloud 10 cannot run anymore.However, a migration from ownCloud 10 to Nextcloud is possible, which preserves data, metadata, and settings: https://docs.nextcloud.com/server/latest/admin_manual/maintenance/migrating_owncloud.html
ownCloud and latest Nextcloud cannot run on the same PHP version. But the migration can be done regardless with a backup of the ownCloud instance, like created by
dietpi-software uninstall 47. Latest Nextcloud even declares migration support for more recent ownCloud versions, hence this seems to be the preferred way.Our Bookworm upgrade script and DietPi 10.0 update will inform users about ownCloud Infinite Scale and the alternative Nextcloud migration, which can be done with
dietpi-softwareas detailed below.Migrating from ownCloud 10 to Nextcloud
The steps adjust the data directory name, webroot and hence URL path from
/owncloudto/nextcloudas well, which hence needs to be adjusted in clients to connect to Nextcloud. It would be theoretically possible to keep using all old paths, reducing needed changes, but that could cause confusion later and would breakdietpi-software reinstall 114if needed any time later.In case, uninstall ownCloud, which will generate a database dump and install dir+config backup within the preserved data directory:
If you used our Debian Bookworm upgrade script recently, this might have happened already. Otherwise, if you are on DietPi 10.x already,
dietpi-softwarecannot be used to uninstall ownCloud anymore. Follow the manual uninstall steps below the "Manual ownCloud uninstall" heading instead.At best create a backup of
/mnt/dietpi_userdata/owncloud_dataif you do not already have a recent one:cd /mnt/dietpi_userdata cp -a owncloud_data /path/to/backup/owncloud_dataRename the ownCloud data dir to the Nextcloud data dir, and the database dump within. Move (only) the backed up
config.phpdir to its target location, and remove the install dir backup otherwise:cd /mnt/dietpi_userdata mv owncloud_data nextcloud_data mv nextcloud_data/dietpi-owncloud-database-backup.sql nextcloud_data/dietpi-nextcloud-database-backup.sql mkdir -p /var/www/nextcloud/config mv nextcloud_data/dietpi-owncloud-installation-backup/config/config.php /var/www/nextcloud/config/ rm -R nextcloud_data/dietpi-owncloud-installation-backupInstall Nextcloud, which will be the latest v25, the last version which supports PHP 7.4. It will restore the ownCloud database dump, and takes over its data dir and
config.php:The installation implies an
ncc upgradecall for the database migration. In case of complex setups, external apps, or future ownCloud updates, there is some chance that one of the steps fails. If so, please report this here, so we can find the needed database adjustments and fix this for all ownCloud users, and in case in Nextcloud's upstream code.In your clients, adjust the URL path
/owncloudto/nextcloud.Manual ownCloud uninstall (keeping data/config as backup) on DietPi 10.x
If you upgraded to DietPi v10.x already, ownCloud 10 can be uninstalled with the following commands, keeping all data, a database backup, and a backup of the instance files and config inside
/mnt/dietpi_userdata/owncloud_data, or the data dir you chose viadietpi.txt: