Tips for NextcloudPi booting from SSD and backing up to another SSD?

I’ve installed and reinstalled NC multiple times over the past three months trying to get my RPi based home server set up. Each time, something has happened that I wasn’t able to overcome, resulting in a fresh install. I finally found what I thought was a stable solution, running NextcloudPi on a RPi4 8GB, Raspbian Buster ARM64, and booting from a Kingston 480GB SSD. I was working on trying to figure out how to properly format a second SSD to use for my backup drive, when mariadb crashed. I think it might have been related to moving the location of my data folder, but I’m really not sure. . Either way, I haven’t been able to figure out how to fix it, so I’ve simply saved my data folder on the second SSD and plan to do a fresh install of NCP.

With that as background/context, I’m looking for tips or best practices on how to install and configure NCP given that I want to boot from one SSD (i.e. primary), and use the second as a backup for my data. NC has crashed on me so many times now that I don’t want to put anything on it until I have a robust backup strategy in place. I also still don’t exactly understand the difference between the nc-backup, nc-rsync, and nc-snapshot options in the NCP admin panel.

If you have tips, hints, or specific guidance for this particular setup approach, I’d very much appreciate it.

I use a similar setup. And some of the struggles you have sound very similar to me.
But as I consider myself still only a beginner+ I’m not sure if I can help much.

Here is a basic guide on how to set up USB boot on the Pi 4.

In such a setup, however, you will need to format the backup drive using terminal commands or another Linux machine. Because /root & /boot are on USB, if you use the format function it will attempt to format the boot drive and kill your NCP.

nc-backup is making full backups (if include data) or only user & Apps (if dataless) that’s the classical way of making a proper copy of all. But it will put your NCP into maintenance mode while doing the backup.
This Backup you can safe to ext4 or BTRFS formated drives and it works with a USB setup.

nc-snapshot is similar to Apple Time-Machine, if you know that. It kind of keeps a history of all your data. But you need to have a BTRFS drive and need to save it first to your data drive and only then you can sync it to the backup drive. With a USB boot as in the tutorial above, this is not possible. (Here more about the problem).

nc-rsync don’t quote me on that, but as I understand it, its syncing a nc-backup to a remote location.

For a more in dept explanation of the matter read through this post by @nachoparker NextCloudPi Backup Strategies

1 Like

Thank you michuvon! This is very helpful information, and I think definitely puts my on the right path.

I’ll experiment with this over the next few days and share how it goes.

1 Like