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:
Flash USB of nextcloudpi to disk to boot rpi 4;
Setup a functional nextcloud setup, but…
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?
Congrats. You’ll be fine if you make a backup and restore it onto the new device.
Full backup of your data
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 . The way I do it is:
Map my new Pi by MAC address on the router.
3b. Install NextcloudPi on new device
Restore ncp profile data from backup
Restore data from backup
Check and resolve any router networking from old device to new: Port Forwarding, DNS, Domain.
nc-info from :4443 or ncp-config to confirm everything is working.
Take the old device offline.
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.
While I have yet to get to this as busy with work, etc. A few questions arose in my mind, however:
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?
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?