Nextcloudpi SD card backup during work


Sorry for my bad english.
I use Nextcloud on a raspberry with the raspberrypi image.
Now it runs without problems.
My problem is i will backup my SD card during the operation, if the SD card break i have a backup.

Nextcloud version (eg, 12.0.2):1
Operating system and version (eg, Ubuntu 17.04): raspberrypi

Well, technically there is not really a question to answer but I assume your question was how to backup the SD card?
If so, as far as I’m concerned, it’s highly recommended not to backup the SD card while in operation since probably not all files will be backed up.
Thus, I’ve done it according to this tutorial here.
Since you’re running a Raspberry Pi, I also can’t really imagine that it’s absolutely crucial that the system is available 24/7 and it honestly didn’t really take much more than 5-10 minutes until my system was up and running again after the backup.

If you still want to do it in operation - risking that the backup will not work later on when you need it - you could probably do it by writing an image file using the dd comand in the linux terminal, something like that:

dd if=/path/to/sdcard of=/path/to/image/file.img

Best regards and hope that helped,