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.