Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating from ownCloud 10.10 and 10.11 #34049

Closed
rmelior opened this issue Sep 13, 2022 · 18 comments · Fixed by #35471
Closed

Migrating from ownCloud 10.10 and 10.11 #34049

rmelior opened this issue Sep 13, 2022 · 18 comments · Fixed by #35471
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement

Comments

@rmelior
Copy link

rmelior commented Sep 13, 2022

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 rmelior added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Sep 13, 2022
@kesselb
Copy link
Contributor

kesselb commented Sep 16, 2022

cc @PVince81

@Rico29
Copy link

Rico29 commented Nov 23, 2022

Hello,
I have the same problem with owncloud 10.11.0
Regards

@nickvergessen
Copy link
Member

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

@szaimen
Copy link
Contributor

szaimen commented Nov 25, 2022

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

@nickvergessen
Copy link
Member

nickvergessen commented Nov 25, 2022

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

@AndyScherzinger AndyScherzinger changed the title Migrating from ownCloud 10.10 Migrating from ownCloud 10.10 and 10.11 Nov 28, 2022
@PVince81
Copy link
Member

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
Copy link
Member

PR here: #35471

@szaimen szaimen added this to the Nextcloud 25.0.2 milestone Nov 29, 2022
@szaimen
Copy link
Contributor

szaimen commented Nov 29, 2022

Backport missing

@szaimen szaimen reopened this Nov 29, 2022
@PVince81
Copy link
Member

waiting for the backport bot to wake up...

@Rico29
Copy link

Rico29 commented Nov 29, 2022

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
Copy link

Rico29 commented Nov 29, 2022

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
...

@PVince81
Copy link
Member

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

@Rico29
Copy link

Rico29 commented Nov 29, 2022

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

@AndyScherzinger
Copy link
Member

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

Have fun with your migrated Nextcloud instance 🎉

@Rico29
Copy link

Rico29 commented Nov 29, 2022

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

@PVince81
Copy link
Member

@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

@szaimen
Copy link
Contributor

szaimen commented Nov 29, 2022

Closing as the backport is merged

@szaimen szaimen closed this as completed Nov 29, 2022
@jospoortvliet
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants