server icon indicating copy to clipboard operation
server copied to clipboard

Migrating from ownCloud 10.10

Open rmelior opened this issue 2 years ago • 1 comments

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.

rmelior avatar Sep 13 '22 11:09 rmelior

cc @PVince81

kesselb avatar Sep 16 '22 15:09 kesselb

Hello, I have the same problem with owncloud 10.11.0 Regards

Rico29 avatar Nov 23 '22 12:11 Rico29

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

nickvergessen avatar Nov 25 '22 22:11 nickvergessen

Thanks Joas for having a look! I only found these new migrations in owncloud core: image

szaimen avatar Nov 25 '22 22:11 szaimen

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 🤷🏼

nickvergessen avatar Nov 25 '22 23:11 nickvergessen

I've tested the following:

  1. Download and setup ownCloud 10.11 in "owncloud" folder (needs PHP 7.4)
  2. Install "calendar" and "contacts" apps from the market
  3. Fill it with a bit of data: files, shares, calendar, contacts
  4. Download the Nextcloud 25.0.2rc1 tarball
  5. Rename the "owncloud" folder to "owncloud-old"
  6. Extract the Nextcloud 25.0.2rc1 tarball into the "owncloud"
  7. Delete "config" and "data", and copy the ones from the "owncloud-old" to the new one
  8. Create a folder "apps-external" (needed due to it being in the default owncloud config)
  9. Edit version.php and add "10.11" in the allowed upgrades
  10. Run occ upgrade
  11. Reinstall calendar and contact apps: occ app:enable calendar and occ app:enable contacts
  12. 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

PVince81 avatar Nov 28 '22 20:11 PVince81

PR here: https://github.com/nextcloud/server/pull/35471

PVince81 avatar Nov 28 '22 20:11 PVince81

Backport missing

szaimen avatar Nov 29 '22 08:11 szaimen

waiting for the backport bot to wake up...

PVince81 avatar Nov 29 '22 08:11 PVince81

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

Rico29 avatar Nov 29 '22 09:11 Rico29

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 avatar Nov 29 '22 09:11 Rico29

@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 ?

PVince81 avatar Nov 29 '22 09:11 PVince81

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

Rico29 avatar Nov 29 '22 10:11 Rico29

Thanks a million for the feedback and testing @Rico29 - highly appreciate this 💙

Have fun with your migrated Nextcloud instance 🎉

AndyScherzinger avatar Nov 29 '22 10:11 AndyScherzinger

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 avatar Nov 29 '22 11:11 Rico29

@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

PVince81 avatar Nov 29 '22 12:11 PVince81

Closing as the backport is merged

szaimen avatar Nov 29 '22 13:11 szaimen

Welcome to Nextcloud @Rico29 I hope you'll have a good experience!

jospoortvliet avatar Nov 29 '22 20:11 jospoortvliet