Upgrade 32 bit to 64 bit

I currently have an odroid purchased from syncloud in 2019 that has 32 bit s/w on it. I need 64 bit to upgrade Nextcloud. It would also be useful to get everything onto a larger disk. How can I go about upgrading?

You will need a 64bit hardware, you can buy any from us at https://shop.syncloud.org we only sell 64 bit devices or you can get any supported device using our DIY instruction at Home Ā· syncloud/platform Wiki Ā· GitHub

Iā€™ve ordered a new device (with a larger disk). Am I right that once I have set it up and installed the apps all I need to do is copy the /data folder from the old disk?

(By the way, I was amused to see the Mastodon screenshot with my kidā€™s message right at the top. They were working on the encryption protocols for it at the time).

Yes that is one way (/data is a link to the root of external disk if it is activated).

Some migration guidance: Device migration Ā· syncloud/platform Wiki Ā· GitHub

The new Odroid machine arrived and I have spent a very frustrating evening trying to get the new machine to see the old disk. I activated the new machine OK. Iā€™ve tried plugging the old disk straight into the extra SATA port on the new box, and also using an external USB caddy, but it will not see it. If I try to activate either the old disk or the data partition on it on the new machine it gives an error every time saying ā€œPrevious Change cannot find existing uuid to useā€. The /opt/disk/internal and /opt/disk/external both seem to point to the data folder on the new disk.

I tried mounting all of the /dev/sd* on the new machine, but again I only seem to be able to see the new disk.

In the end I put the old disk back into the old machine, and tried to activate the old machine, but that is failing every time now, coming up with an Error box saying ā€œexit status 1ā€. If I PuTTY to the old machine now, I can see the data folder is there with all the data in it, but I canā€™t access anything through the web interfaces. Any attempt to access the server over the web takes me back to the activation page.

EDIT: The old machine just suddenly came back to life. Trying to go to the main page still takes me to the activate page, but the app pages are now there, and the nextcloud app on my windows machine has connected up.

Was disk activated on old device using disk or partition mode?
Probably copy is a better option for you so you do not accidentally lose the data.

There is an option of running new device as a mirror of the older one under different domain name so it can copy all the data automatically and when you are happy you can reactivate under your normal domain and shutdown the old device.

Iā€™m not sure how the disk was activated originally. It appears to have 2 partitions on it, one appears to be a boot partition and the other everything else.

When I try to activate the old device now I see this in the syslog

Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: info storage/storage.go:58 boot extend {ā€œoutputā€: ā€œ++ grep ā€˜MOUNTPOINT="/"ā€™\n++ lsblk -pP -o PKNAME,NAME,MOUNTPOINT\n+ BOOT_PARTITION_INFO=ā€˜PKNAME="/dev/sda" NAME="/dev/sda2" MOUNTPOINT="/"ā€™\n++ echo ā€˜PKNAME="/dev/sda"ā€™ ā€˜NAME="/dev/sda2"ā€™ ā€˜MOUNTPOINT="/"ā€™\n++ cut '-d ā€™ -f1\n++ cut -d= -f2\n++ tr -d ā€˜"ā€™\n+ DEVICE=/dev/sda\n++ echo ā€˜PKNAME="/dev/sda"ā€™ ā€˜NAME="/dev/sda2"ā€™ ā€˜MOUNTPOINT="/"ā€™\n++ cut '-d ā€™ -f2\n++ cut -d= -f2\n++ tr -d ā€˜"ā€™\n+ PARTITION=/dev/sda2\n+ PARTITION_NUM=2\n++ parted -sm /dev/sda unit B print\n++ grep -oP ā€˜/dev/sda:\K[0-9](?=B)'\n+ DEVICE_SIZE_BYTES=120034123776\n++ parted -sm /dev/sda unit B print\n++ grep -oP '^2:\K[0-9](?=B)ā€™\n+ PART_START_BYTES=135266816\n++ expr 135266816 / 512\n+ PART_START_SECTORS=264193\n++ expr 120034123776 / 512 - 1\n+ PART_END_SECTORS=234441647\n++ fdisk -l /dev/sda\n++ grep ā€˜Disklabel type:ā€™\n++ awk ā€˜{ print $3 }ā€™\nPartition 3 does not start on physical sector boundary.\n\n+ PTTYPE=dos\n+ [[ dos == \g\p\t ]]\n+ echo ā€˜\np\nd\n2\np\nn\np\n2\n264193\n234441647\np\nw\nq\nā€™\n+ fdisk /dev/sda\n\nWelcome to fdisk (util-linux 2.25.2).\nChanges will remain in memory only, until you decide to write them.\nBe careful before using the write command.\n\n\nCommand (m for help): \n\nCommand (m for help): Partition 3 does not start on physical sector boundary.\n\n\nDisk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 4096 bytes\nI/O size (minimum/optimal): 4096 bytes / 33553920 bytes\nDisklabel type: dos\nDisk identifier: 0x3cedfd53\n\nDevice Boot Start End Sectors Size Id Type\n/dev/sda1 2048 264191 262144 128M c W95 FAT32 (LBA)\n/dev/sda2 264193 234441647 234177455 111.7G 83 Linux\n\n\nCommand (m for help): Partition number (1,2, default 2): \nPartition 2 has been deleted.\n\nCommand (m for help): Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical/ph
Jul 7 11:53:00 odroid-xu3and4 odroid-xu3and4 nginx: 10.17.23.2 - - [07/Jul/2024:11:53:00 +0000] ā€œPOST /rest/activate/managed HTTP/2.0ā€ 500 44 ā€œhttps://myserver.syncloud.it/activateā€ ā€œMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0ā€
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: ysical): 512 bytes / 4096 bytes\nI/O size (minimum/optimal): 4096 bytes / 33553920 bytes\nDisklabel type: dos\nDisk identifier: 0x3cedfd53\n\nDevice Boot Start End Sectors Size Id Type\n/dev/sda1 2048 264191 262144 128M c W95 FAT32 (LBA)\n\n\nCommand (m for help): Partition type\n p primary (1 primary, 0 extended, 3 free)\n e extended (container for logical partitions)\nSelect (default p): Partition number (2-4, default 2): First sector (264192-234441647, default 327675): Last sector, +sectors or +size{K,M,G,T,P} (264193-234441647, default 234441647): \nCreated a new partition 2 of type ā€˜Linuxā€™ and of size 111.7 GiB.\n\nCommand (m for help): Partition 3 does not start on physical sector boundary.\n\nDisk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 4096 bytes\nI/O size (minimum/optimal): 4096 bytes / 33553920 bytes\nDisklabel type: dos\nDisk identifier: 0x3cedfd53\n\nDevice Boot Start End Sectors Size Id Type\n/dev/sda1 2048 264191 262144 128M c W95 FAT32 (LBA)\n/dev/sda2 264193 234441647 234177455 111.7G 83 Linux\n\n\nCommand (m for help): Re-reading the partition table failed.: Device or resource busy\n\nThe partition table has been altered.\nCalling ioctl() to re-read partition table.\n\nThe kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).\n\nā€}
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: error rest/middleware.go:94 error {ā€œerrorā€: ā€œexit status 1ā€}
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: github.com/syncloud/platform/rest.(*Middleware).Fail
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /drone/src/backend/rest/middleware.go:94
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: github.com/syncloud/platform/rest.(*Backend).Start.(*Middleware).Handle.func7
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /drone/src/backend/rest/middleware.go:86
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: github.com/syncloud/platform/rest.(*Backend).Start.(*Middleware).FailIfActivated.func8
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /drone/src/backend/rest/middleware.go:49
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: net/http.HandlerFunc.ServeHTTP
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /usr/local/go/src/net/http/server.go:2136
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: github.com/syncloud/platform/rest.(*Middleware).JsonHeader-fm.(*Middleware).JsonHeader.func1
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /drone/src/backend/rest/middleware.go:73
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: net/http.HandlerFunc.ServeHTTP
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /usr/local/go/src/net/http/server.go:2136
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: github.com/gorilla/mux.(*Router).ServeHTTP
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: net/http.serverHandler.ServeHTTP
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /usr/local/go/src/net/http/server.go:2938
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: net/http.(*conn).serve
Jul 7 11:53:00 odroid-xu3and4 platform.backend[440]: /usr/local/go/src/net/http/server.go:2009

I canā€™t see how to do the device mirror, as I canā€™t get to any of the system or appcenter pages on the old device now, so I canā€™t install Syncthing. Whatever I try to do it goes to the activate page.

Why are you trying to activate the old device?
At this point can you make sure your data is still on the original disk by using another PC for example?
Any wrong move now can trash the data.

If data is there I would not touch it anymore unless you have a full backup.

Iā€™m trying to activate the old device just so that I have a server I can use. The data is still there on the old disk because even though it has failed to activate completely I can still get to things like gogs and nextcloud.

Iā€™ve tried to back it up, but I donā€™t have any machines that can do it. The only linux boxes I have are VMs on a Windows machine, and that doesnā€™t seem to be able to access the disk from a USB caddy (sees it for a few seconds then drops it repeatedly).

(By the way, I wouldnā€™t be able to run 2 devices at the moment anyway, because the power supply for the new device only had a European plug with it, and the only adapter I have is the one on the old device).

Ok if you say it has two partitions, you can try activating the disk on the new device using partition mode.
If that fails we can try to restore the old device.

I remembered I did set up a way of backing up the data folder by mounting a folder on another nas and copying the folder across the network. Iā€™ve just set that running. It will take a while.

Iā€™ve used sftp to copy the partition from the old device to my PC, using Filezilla. I removed the old device and activated the new device, then tried to copy the files from the PC onto it. It looked to be going OK, but eventually I kept running into problems with it saying that files were already there, and it would have 4K or so of a much larger file. After a few goes deleting folders and files from the device and copying them again in smaller chunks I tried rebooting the device.

It gave a Server Error when I tried, so I unplugged it and tried to start it again. I canā€™t connect to it at all now. It boots up and I can ping it, and Discovery sees that the device is there, but no web server seems to have started. Whether I try to connect to the local address or use the syncloud.it address it just returns an ERR_CONNECTION_REFUSED.

I can get in using PuTTY. The device thinks the date is 14 Feb 2019. The date on the router is correct. I tried setting the time and rebooting it, but it rebooted again with 14 Feb 2019.

I think Iā€™ve worked out where it went haywire. Iā€™ve got my disk caddy working again, and can now see that the SATA disk is completely uninitialised. Iā€™ve been copying files onto the USB card, in the rootfs (32GB) partition, and have obviously completely filled it up. Iā€™ll try deleting everything I copied onto it (/opt/disk/internal) and see it boots then and if I can initialise the correct disk.

EDIT: This is looking much happier.

Iā€™ve copied the data files over, installed a few apps, and restored the backups but Iā€™m still having quite a bit of trouble. Iā€™ve used chown recursively to have all the files and folders owned by the correct app (they all copied across as being owned by root).

Gogs seems to be fine (web access, fetching and pushing).

Nextcloud only has my account (the admin account) and seems to have lost all the other users (their files are there). It has also lost all the apps I had installed. After reinstalling the contacts and calendar apps the data has all gone (which is a HUGE problem). Also the nextcloud app seems to be trying to sync all the files again.

Users has only the admin account, not the other accounts that I had set up in it.

Unfortunately currently you need to create users in Users app it will be improved in future.
As soon as you create them (same usernames) Nextcloud will find their files on the disk (may require full rescan).

How did you migrate nextcloud?
Did you install latest version and then restored backup? I think on arm32 nextcloud was much older and you need to install that specific version to be able to restore backup.

Latest on arm32 was v26 (706), using this instruction you can install that specific version: Nextcloud Ā· syncloud/platform Wiki Ā· GitHub

I would remove nextcloud first, added all users then install this version, restore backup for that version.

Check that it is usable and you can see all the data then upgraded nextcloud one by one to the latest using the same instruction. Making backups after each upgrade.

When you hit latest you will be in the auto upgrade mode since that point.

Iā€™ve followed this (only added some users in the users app) and Iā€™ve got quite a long way (Iā€™ve got my contacts and calendars back), but Iā€™ve now run into a problem similar to one I had a couple of years ago, I think when the users app was changed.
Another LDAP problem, I suspect - Syncloud
From what I remember, that time reinstalling Nextcloud fixed it.

This time I added some of the users that are local nextcloud users into the users app. It seems to have created a shadow set of users in nextcloud, rather than linking up to the ones that are there. In the nextcloud users list I see only the (local) members of the abtuse group, and that is the only group listed. I should be a member of that group, but Iā€™m not listed at all, and Iā€™m not recognised as an admin user. The ldap users donā€™t seem to be listed in nextcloud, and anyone not in a group (eg danny and sarah) isnā€™t listed.

It looks like something keeps removing and adding me to these groups, but nothing changes. I wasnā€™t even online 10 and 30 minutes ago.

Iā€™ve tried going through the suggestions in Nextcloud Ā· syncloud/platform Wiki (github.com)

snap run nextcloud.psql -c "select * from oc_ldap_group_mapping"
 owncloud_name |                 ldap_dn                  |            directory_uuid            |                           ldap_dn_hash
---------------+------------------------------------------+--------------------------------------+------------------------------------------------------------------
 admin         | cn=syncloud,ou=groups,dc=syncloud,dc=org | 2da7425f-c5ec-4f68-a086-85e0ce643681 | aac22646179b2b187a05c325be3431b95e39ef12a19def4ad4ea2e3aa0dc5123
 alex          | cn=alex,ou=groups,dc=syncloud,dc=org     | 819f3618-d234-103e-9e7e-552073deadc2 | 6a60e17d2543a3a6e93676b7898e964b9695c2f7a6e1dde854794d186f608205
 abtuse_2      | cn=abtuse,ou=groups,dc=syncloud,dc=org   | bced903e-d234-103e-9e80-552073deadc2 | e4917328e79527f8c2293ca8375ce19092433f5fadaea3014074c71f2cda19b5
 brian         | cn=brian,ou=groups,dc=syncloud,dc=org    | dcb10978-d234-103e-9e81-552073deadc2 | aa08486944bd66c3424c26c1a30b2504d82ee7afb0648693e22ce17084417f73
 bruce         | cn=bruce,ou=groups,dc=syncloud,dc=org    | ed689b46-d234-103e-9e83-552073deadc2 | 066e572295c0778d864b7145a33e1c051f114b2572cb3a5e2fb135b129e7f772
 danny         | cn=danny,ou=groups,dc=syncloud,dc=org    | 022d4f36-d235-103e-9e85-552073deadc2 | e860edba60ea8b63a39ceb04fb0d31ddcfa81fb22b438f309f73924241e5ba4e
 henry         | cn=henry,ou=groups,dc=syncloud,dc=org    | 190a66f8-d235-103e-9e87-552073deadc2 | 4c863f623b5b2a3931016028fc65b2a5e410e35f93301b2876920cd6f2c30e00
 sarah         | cn=sarah,ou=groups,dc=syncloud,dc=org    | 35fe65e8-d235-103e-9e89-552073deadc2 | 9ea3d167779a9513536a15f55ac308bb78299b4b6db1d4936ca6b33f4457d1a8
 scott         | cn=scott,ou=groups,dc=syncloud,dc=org    | 5897b794-d235-103e-9e8b-552073deadc2 | 3f65d32297c5a526e2f5ce08abff084d072d09d70359b3326dda702989ef4d6d
 admin_2       | cn=admin,ou=groups,dc=syncloud,dc=org    | d2eb8562-d25c-103e-87a6-e1e8812d67c6 | 30c386ffbe167bc48373c82e5d339e761940d44e0353105d2b4b02cfe0cb62f2

When I added some users to the users app it created a group for each of them. I also tried creating abtuse and admin groups in there and then deleted them.

I donā€™t know if this is out of date, or is showing a serious problem

snap run nextcloud.psql -c ā€œselect * from oc_ldap_group_membersā€
ERROR: relation ā€œoc_ldap_group_membersā€ does not exist
LINE 1: select * from oc_ldap_group_members

I havenā€™t tried make all admins.

According to this I am in the admin group:

snap run nextcloud.occ group:list
  - abtuse:
    - alex
    - andrei
    - brian
    - bruce
    - cameron
    - graham
    - henry
    - hyo
    - joshua
    - kuba
    - nathalia
    - rebecca
    - ruben
    - scott
  - admin:
    - trevor
  - alex:
    - alex_5164
  - abtuse_2:
    - alex_5164
    - brian_7662
    - bruce_7655
    - henry_8858
    - scott_3487
    - trevor
  - brian:
    - brian_7662
  - bruce:
    - bruce_7655
  - danny:
    - Danny_Moules
  - henry:
    - henry_8858
  - sarah:
    - sarah_5299
  - scott:
    - scott_3487

The users with numbers are the ones added by the users app.

I tried uninstalling and reinstalling nextcloud from the UI. Iā€™m not only not recognised as an admin now, but I donā€™t even have a users menu and the apps have disappeared. Maybe I should have expected that. The groups list looks more sensible, but Iā€™m still not seen as an admin.

 snap run nextcloud.occ group:list
  - admin:
    - trevor
  - alex:
    - alex
  - abtuse:
    - alex
    - brian
    - bruce
    - henry
    - scott
    - trevor
  - brian:
    - brian
  - bruce:
    - bruce
  - danny:
    - danny
  - henry:
    - henry
  - sarah:
    - sarah
  - scott:
    - scott

image