Convient backup of the Nextcloud Box

I am very satisfied with my Nextcloud box (10.0.2 on RPI2). I only have one concern: how do backup the box?

Is there already a handy backup script that saves database and files to an external medium (or other system)?

Thank you in advance!
Hexadezimalion

You can already backup your SD card:

The external disk can as well be copied manually.

There is no official documentation for an automated backup script. Need someone to step up and start something. If you canā€™t do it yourself, you can create a feature request on github.

It may well be that @enoch85 has something as part of the official VMs?

Yes, Iā€™m the VM guy.

Helpful :smiley:
Do you employ backup scripts with the official VMs for users to configure?

Haha, sorry. :slight_smile:

Nope, but Iā€™ve made a script here in the past: https://www.techandme.se/rsync-backup-script/

2 Likes

This might be helpful:

Hi mate,

Iā€™m having problem with the script. I appreciate if you could help. Here is what Iā€™m getting:

sudo: no tty present and no askpass program specified
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.1]

bash: -c: line 0: syntax error near unexpected token (' bash: -c: line 0:mysqldump --user=root --password=Supersecretpass --all-databases --lock-tables | bzip2ā€™

First hit on Google says its a user error. You must give your user sudo permissions.

Thanks for your reply, I already tried that but didnā€™t help. It actually doesnā€™t even accept the user password.

ubuntu@192.168.178.26ā€™s password:
sudo: no tty present and no askpass program specified
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.1]

Permission denied (publickey,password).

is it ubuntu@192.168.178.26 or root@192.168.178.26 ?

and for the user and password part, is it Nextcloud user or ubuntu user (ubuntu) or it stays as rootā€¦

I think i got a bit confusedā€¦ :slight_smile:

When i leave it as root, it asks me the password for root@192.168.178.26 which is supposed to be the ubuntu user password right? it doesā€™t accept itā€¦

I have no clue what youā€™re talking about to be honest. This is nothing related to the Nextcloud VM.

Are you using the Box?

Btw, Ubuntu has no root user, you canā€™t login as root, you can only become root with sudo -i.

Ohh okā€¦ I assumed its for nextcloud box given the Thread titleā€¦ Yes, i have the box and looking for a backup solution, mainly for data / contacts / calendar / notes . And i was trying to make your script workā€¦

Yes, this is a combined thread for all of those. :slight_smile: You where not wrong, I was just saying that this is not a VM issue.