Upgrading nextcloudpi system from Raspberrypi 3B+ to 4

I am running a functional nextcloud setup on a raspberrypi 3B+ and would like to simply upgrade to a 4, with minimal reconfiguration if possible.

The current setup boots from the unchanging files on a USB stick, with data and write/system directories moved to a btrfs external hard disk.

I am thinking of roughly following the plan noted here, specifically:

" set up new environment (webserver/php/mariadb/etc)

set up mariadb user/password

copy nextcloud directory to new computer

backup old database (NC docs shows how)

restore database to new server

As long as you can log in to your new database with the credntials stored in config.php it should be good"

I’d like to ensure I am not missing anything crucial or doing anything beyond what I need, but also would rather not play around with my live drives until setup as I’d rather not be out of a functional system on error until I have time to reconfig. Please let me know if there are any missed or redundant things below:

  1. Flash USB of nextcloudpi to disk to boot rpi 4;
  2. Setup a functional nextcloud setup, but…
  3. Do I need to have the old system disconnected and use the same static IP on my router for the new drive or will a new IP suffice/last upon restore?
  4. Restore system from nc-restore
  5. Connect hard disk to new drive

Am I getting that right?

Thanks! :slight_smile:

One issue… make sure you are on 64bit raspbian.

Check your architecure with this command on any default Debian/Raspbian/Ubuntu install:
$ dpkg --print-architecture
armhf or arm64

I am running 64-bit. Any issues around not adding the drive until after restore (or during) and around ip address of new pi vs old or must they remain the same?

Any other issues I am not thinking of?

Congrats. You’ll be fine if you make a backup and restore it onto the new device.

  1. Full backup of your data
  2. Backup “export” your ncp specific profile data.

Both can be done in :4443 or ncp-config menu and saved to an external disk. Then you can leave you old device alone and just have it on standby in case you need it. Restore everything to the new installation and profit from getting your old settings and data back. You should have no need to dig into mariadb or any other environment variables, at least I wouldn’t :person_shrugging: . The way I do it is:

  1. Map my new Pi by MAC address on the router.
    3b. Install NextcloudPi on new device
  2. Restore ncp profile data from backup
  3. Restore data from backup
  4. Check and resolve any router networking from old device to new: Port Forwarding, DNS, Domain.
  5. nc-info from :4443 or ncp-config to confirm everything is working.
  6. Take the old device offline.
  7. Profit.

Nothing should stop you from having both devices online. Just change networking settings to the new device as you feel ready to, so it can run as expected. Keep in mind:

  • It is a new device with a new MAC address and new IP address.
  • It will only match up to your old device once you’ve restored your data and told your networking where it should be mapped so your devices can find it via your domain or whatever your setup requires.

Hope this helps. Keep backups. If you can, leave your old Pi alone and on stand-by. If you’ve done both of these precautions you should feel no fear in working on the new device. If unsure, just use the old one while you sort out the new.

Even if this all works fine, please do let us know how it goes @Anti. It helps us to know what things are working as you would expect. Or, we’ll tackle whatever issue you encounter.

1 Like

Will do. I may not get to it immediately. but I promise to report back (or, hopefully not, seek further assistance!).

Many thanks and report pending

While I have yet to get to this as busy with work, etc. A few questions arose in my mind, however:

  1. As I plan to use the same hard disk, the first device must go offline as of the restore; that shouldn’t be an issue even if the restore overwrites the data? If I restore the config, must I still do the whole data restore?
  2. clearly my dns is going to point to the new device as soon as the settings are restored, but again, provided there is no inherent threat here, esp with the backup, that shouldn’t be an issue?

Thanks again @anon75456558