server
server copied to clipboard
Migrating from ownCloud 10.10
Is your feature request related to a problem? Please describe. I have a up-to-date ownCloud server (version 10.10) and I want to migrate to nextCloud but I get the message "Exception: Updates between multiple major versions and downgrades are unsupported.". I have tried version 24.0.5 (last) and 20.0.14 of nextCloud with same results. In "version.php" file OC_VersionCanBeUpgradedFrom indicate migrations can only occurs from owncloud 10.5 .
Describe the solution you'd like Migrating from ownCloud 10.10 should be possible.
cc @PVince81
Hello, I have the same problem with owncloud 10.11.0 Regards
Try adding 10.10 or 10.11 here https://github.com/nextcloud/server/blob/master/version.php#L44
Best on a test/backup instance. Once confirmed working we can more easily go ahead with this.
Since there was barely activity on the database level it might work out pretty fine: https://github.com/owncloud/core/tree/master/core%2FMigrations
Thanks Joas for having a look! I only found these new migrations in owncloud core:
Yeah
- First one adds an index
- 2+3 do some filesystem stuff but no schema changes, so I'd assume it just works fine like with the old data
- last one adds a config 🤷🏼
I've tested the following:
- Download and setup ownCloud 10.11 in "owncloud" folder (needs PHP 7.4)
- Install "calendar" and "contacts" apps from the market
- Fill it with a bit of data: files, shares, calendar, contacts
- Download the Nextcloud 25.0.2rc1 tarball
- Rename the "owncloud" folder to "owncloud-old"
- Extract the Nextcloud 25.0.2rc1 tarball into the "owncloud"
- Delete "config" and "data", and copy the ones from the "owncloud-old" to the new one
- Create a folder "apps-external" (needed due to it being in the default owncloud config)
- Edit version.php and add "10.11" in the allowed upgrades
- Run
occ upgrade
- Reinstall calendar and contact apps:
occ app:enable calendar
andocc app:enable contacts
- Test in the web UI and check that the data is still there
=> the upgrade went fine!
So the only extra steps one needs to do right now is:
- create a "apps-external" folder, or alternatively remove it from config.php
- edit version.php and add "10.11" as allowed upgrade
for version.php I think this is something we can do officially in a PR. for the "apps-external" folder it would need to be mentioned in the upgrade documentation
PR here: https://github.com/nextcloud/server/pull/35471
Backport missing
waiting for the backport bot to wake up...
Hello,
I still have an issue following @PVince81 instructions :
2022/11/29 10:07:38 [error] 643641#643641: *110 FastCGI sent in stderr: "PHP message: {"reqId":"7UcAfu44frdqb6OtKCx9","level":3,"time":"2022-11-29T10:07:38+01:00","remoteAddr":"xxx","user":"--","app":"index","method":"GET","url":"/login","message":"Could not get appdata folder for theming","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","version":"25.0.2.0","exception":{"Exception":"RuntimeException","Message":"Could not get appdata folder for theming","Code":0,"Trace":[{"file":"/var/www/owncloud/lib/private/Files/AppData/AppData.php","line":147,"function":"getAppDataFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/owncloud/apps/theming/lib/ImageManager.php","line":326,"function":"newFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/owncloud/apps/theming/lib/ImageManager.php","line":108,"function":"getRootFolder","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/owncloud/apps/theming/lib/ThemingDefaults.php","line":431,"f...PHP message: {"reqId":"7UcAfu44frdqb6OtKCx9","level":3,"time":"2022-11-29T10:07:38+01:00","remoteAddr":"xxx","user":"--","app":"core","method":"GET","url":"/login","message":"Could not get appdata folder for theming","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","version":"25.0.2.0","exception":{"Exception":"RuntimeException","Message":"Could not get appdata folder for theming","Code":0,"Trace":[{"file":"/var/www/owncloud/lib/private/Files/AppData/AppData.php","line":147,"function":"getAppDataFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/owncloud/apps/theming/lib/ImageManager.php","line":326,"function":"newFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/owncloud/apps/theming/lib/ImageManager.php","line":108,"function":"getRootFolder","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/owncloud
Regards
owner of /var/www/owncloud is (recursively) www-data:www-data when runing occ maintenance:repair :
...
- Cleanup old theming cache
{"reqId":"6n6YpRgmDreNJcgahVG1","level":3,"time":"2022-11-29T10:13:03+01:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Exception while executing repair step Cleanup ol
d theming cache","userAgent":"--","version":"25.0.2.0","exception":{"Exception":"RuntimeException","Message":"Could not get appdata folder for theming","Code":0,"Trace":[{"file":"/var/www/owncloud/lib/private/File
s/AppData/AppData.php","line":155,"function":"getAppDataFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/owncloud/apps/theming/lib/Migration/CleanupOldCache.php","line":59,"function":"g
etDirectoryListing","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/owncloud/lib/private/Repair.php","line":127,"function":"run","class":"OCA\\Theming\\Migration\\CleanupOldCache","type":"->"}
,{"file":"/var/www/owncloud/core/Command/Maintenance/Repair.php","line":120,"function":"run","class":"OC\\Repair","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Command/Command.php","line":255,"f
unction":"execute","class":"OC\\Core\\Command\\Maintenance\\Repair","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Conso
le\\Command\\Command","type":"->"},{"file":"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":
"/var/www/owncloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/lib/private/Console/Application
.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/owncloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"}
,{"file":"/var/www/owncloud/occ","line":11,"args":["/var/www/owncloud/console.php"],"function":"require_once"}],"File":"/var/www/owncloud/lib/private/Files/AppData/AppData.php","Line":108,"message":"Exception whil
e executing repair step Cleanup old theming cache","exception":{},"CustomMessage":"Exception while executing repair step Cleanup old theming cache"}}
- ERROR: Could not get appdata folder for theming
...
@Rico29 I didn't see such errors.
I've checked the data directory after the upgrade and I can see that the theming folder exists:
data/appdata_occfonixenyd/
├── appstore
│ └── apps.json
├── avatar
│ ├── admin
│ │ ├── avatar.64.png
│ │ ├── avatar.png
│ │ └── generated
│ └── alice
│ ├── avatar.64.png
│ ├── avatar.png
│ └── generated
├── dav-photocache
│ └── 00ae4505df96edc37e9ea6891ada0e9a
│ └── nophoto
├── js
│ ├── core
│ │ ├── merged-template-prepend.js
│ │ ├── merged-template-prepend.js.deps
│ │ └── merged-template-prepend.js.gzip
│ └── files
│ ├── merged-index.js
│ ├── merged-index.js.deps
│ └── merged-index.js.gzip
├── preview
│ ├── 0
│ │ └── 3
│ │ └── a
│ │ └── f
│ │ └── d
│ │ └── b
│ │ └── d
│ │ └── 63
│ │ ├── 1024-1024-crop.jpg
│ │ └── 2333-3500-max.jpg
...
│
└── theming
└── global
└── 0
├── favIcon-calendar
├── favIcon-contacts
├── favIcon-core
├── favIcon-dashboard
├── favIcon-files
├── icon-core-#0082c9filetypes_application-pdf.svg
├── icon-core-#0082c9filetypes_folder-shared.svg
├── icon-core-#0082c9filetypes_folder.svg
├── icon-core-#0082c9filetypes_image.svg
├── icon-core-#0082c9filetypes_x-office-document.svg
├── touchIcon-calendar
├── touchIcon-contacts
├── touchIcon-core
├── touchIcon-dashboard
└── touchIcon-files
68 directories, 43 files
maybe you can check your app data folder before and after the upgrade ?
thanks for the quick response. My bad, I did not see that appadata folder was in data storage. My data folder is elsewhere that in owncloud root directory. I chowned it and I don't have the problem anymore. Sorry for my mistake, everything seems to work as expected now Regards
Thanks a million for the feedback and testing @Rico29 - highly appreciate this 💙
Have fun with your migrated Nextcloud instance 🎉
I still have a warning about file integrity for file version.php which has been modified to add "10.11" in the allowed upgrades any way to ack new checksum / force OK ? or should I remove "10.11" in version.php file ? Regards
@Rico29 you can ignore this for now. Once you upgrade to 25.0.2 final later on the warning will disappear because the change there will be official
Closing as the backport is merged
Welcome to Nextcloud @Rico29 I hope you'll have a good experience!