NextCloud Easy Way to Backup ?

Gretor

Cadet
Joined
Jul 9, 2022
Messages
3
Hello dear TrueNAS users,

my question is about the NextCloud APP in TrueNAS Scale.

I just switched to TrueNAS Scale a few days ago with a self-built server ( Epyc 3101 32 GB RAM ECC 2x HDD 8TB mirror syncr.). Before that I was with the typical pre-built NAS manufacturers (qnap & co.)

I'm concerned as seen in the topic above about the possibility of a clean Nextcloud backup. Especially the data somehow from all users to back up properly is very important to me. After all, I want to put the data outside the house regularly to another place (for example, fire server).

All my datasets are encrypted via password. I have installed the Nextcloud in ix-applications completely normal. So everything is there also the data etc...

ix-applications I have also subsequently via. Password encrypted.

What is the easiest way to reliably back up my Nextcloud e.g. to another dataset, from which I could back it up e.g. to a large external drive. Of course I have already looked here and there were already posts about it. For example I read about creating a replication task to another dataset. But that doesn't help me either because somehow nothing really happens, nor is anything readable. Long story short.

I would be pleased about a Detalierte meaningful guidance to secure my NextCloud in the future reliably.
Gladly also a LINK where really step by step an explanation is executed. I do not help the words, just finish the one there. I would be happy about details.

Many thanks
and greetings

Gretor
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Do you mean simply backing up the files that get shared in/out of Nextcloud?

Or, do you also mean backing up the exact state of the Nextcloud app?

For the files, I highly recommend setting up a Cloud Sync Task with the built in TrueNAS Scale GUI: https://www.truenas.com/docs/scale/scaleuireference/dataprotection/cloud-sync-tasks/

You can use several different services. But, I also highly recommend connecting that to Backblaze B2. It's inexpensive and easy to use/manage: https://www.backblaze.com/b2/cloud-storage.html

You can point this at the folder(s) where your Nextcloud files are stored and cover those. But, restoring the state of Nextcloud if your install becomes broken is somewhat involved: https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html

There are a few Nextcloud apps for backing up and restoring. But, all of them seem to only work for very old versions.
 

Gretor

Cadet
Joined
Jul 9, 2022
Messages
3
Hello

Thank you for the feedback.

Cloud backup is not an option for me. Currently my Nextcloud data is in the dataset ix-applications . Neither can I view the data that is there nor can I in any way back up the structures that are there. For me it would simply be interesting to make everything that is under ix-applications visible for me in some form to then back it up regularly via a share on a drive outside the house.

As for the cloud backup, so I have nevertheless tried to make a cloud task. Unfortunately I have no access to the dataset ix-applications.

And right about the internal app of Nextcloud for backup, so it is noticeable that these are all for partly very very old version.... unfortunately.

greetings gretor
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
Starting with our Nextcloud App version 15.x.x, we've introduced a way to use a seperate mount for userdata.
While this does not save the db, you can easily set this to "hostPath(simple)" set the ownership on that dataset to (33:33) and make clean snapshots of the userdata itself :)
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Hello

Thank you for the feedback.

Cloud backup is not an option for me. Currently my Nextcloud data is in the dataset ix-applications . Neither can I view the data that is there nor can I in any way back up the structures that are there. For me it would simply be interesting to make everything that is under ix-applications visible for me in some form to then back it up regularly via a share on a drive outside the house.

Is cloud backup not an option because of where the data is? Or, do you have some other reason why you can't use cloud backup?

I think that as long as you leave the data within ix-applications you will have trouble. Technically, there might be some way to reach the data there. But, I would strongly recommend moving that data out and into an external path. There you will have a lot more options.

You should be able to make that transition in a few steps:

1) Download and install the Nextcloud desktop sync application.
2) In your desktop, move those files out of the Nextcloud folder into a temporary folder on your desktop.
3) In your Nextcloud app settings (within TrueNAS) change the data storage hostpath from "PVC" to "hostPath(simple)" and enter a new path to where you want your data to be. (Make a new dataset for it if necessary)
4) After rebooting the app and making sure it is connected to the desktop sync, etc. move your files from the temporary directory back into the synced Nextcloud directory.

After that syncs you should now have your files reachable in Nextcloud. But, residing in an external location. Now you should have more options for cloud backup from there.
 

Gretor

Cadet
Joined
Jul 9, 2022
Messages
3
Hello,

Thank you for the feedback. Now it has certainly resulted that I switched to TrueNAS Core. But also here the same problems arise that I am not able to perform a consistent backup, let alone even the data of the users.

Maybe move this thread to another forum.

But one crucial question remains.

A clear step by step guide to cleanly backup Nextcloud Jail on TrueNAS Core.

Are there any ideas or other topics for this, which also take one by the hand and help step by step ?

greetings gretor
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Hello,

Thank you for the feedback. Now it has certainly resulted that I switched to TrueNAS Core. But also here the same problems arise that I am not able to perform a consistent backup, let alone even the data of the users.

Maybe move this thread to another forum.

But one crucial question remains.

A clear step by step guide to cleanly backup Nextcloud Jail on TrueNAS Core.

Are there any ideas or other topics for this, which also take one by the hand and help step by step ?

greetings gretor

You may have trouble finding a step-by-step that is that specific. Because a backup setup that works for this case would apply to backing up any other dataset. So, you will likely have better luck searching for the more generic job of "how to back up a dataset to cloud" etc.

That said, I think your first step is simply getting your Nextcloud install (within core or scale) to use an external dataset for its data storage. Do you have that set up and working properly?
 
Top