Backup TrueNAS to Nextcloud possible?

Joined
Jun 24, 2017
Messages
338
Hey guys, wondering. Is it at all possible to automatically backup data hosted on a TrueNAS instance to a Nextclouc instance? (Say, if i have a second truenas machine at work, can i have it backup daily to my home system that hosts a nextcloud instance?)

And if so, anyone got tips or a write-up?
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
sure.... but ignore the nextcloud instance. It's a simple trueNAS to TrueNAS backup.. typically with ZFS replication.
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
There are a bunch of ways to do this and the ability to do it with Nextcloud is already baked in.

In the SCALE GUI to go Credentials>Cloud Credentials and click add. For provider choose WebDAV. Then you'll get a list of supported WebDAV providers - Nextcloud is the default. The rest (url, username, etc.) is self explanatory.

Once you've configured your Nextcloud credential head over the Data Protection menu >Cloud Sync tasks. Set up a new sync task using the credentials for Nextcloud you previously set up, choose the folders you want, etc. and there you have it.

There are other ways to do this via SSH, or setting up an S3 target on one system, and so on but if you are already hosting a working Nextcloud instance on your TrueNAS server the above is the simplest way to do it.

Edit: Simplest way assuming you are just wanting to back up certain files/folders on one system to a Nextcloud instance on a remote system, that is. If you are looking for full system replication then as Captain Morgan pointed out that can be done with ZFS snapshots on one system being replicated the other. That will take a little more setup as far as insuring you can ssh between the two but works quite well.
 
Last edited:
Joined
Jun 24, 2017
Messages
338
There are a bunch of ways to do this and the ability to do it with Nextcloud is already baked in.

In the SCALE GUI to go Credentials>Cloud Credentials and click add. For provider choose WebDAV. Then you'll get a list of supported WebDAV providers - Nextcloud is the default. The rest (url, username, etc.) is self explanatory.

Once you've configured your Nextcloud credential head over the Data Protection menu >Cloud Sync tasks. Set up a new sync task using the credentials for Nextcloud you previously set up, choose the folders you want, etc. and there you have it.

There are other ways to do this via SSH, or setting up an S3 target on one system, and so on but if you are already hosting a working Nextcloud instance on your TrueNAS server the above is the simplest way to do it.

Edit: Simplest way assuming you are just wanting to back up certain files/folders on one system to a Nextcloud instance on a remote system, that is. If you are looking for full system replication then as Captain Morgan pointed out that can be done with ZFS snapshots on one system being replicated the other. That will take a little more setup as far as insuring you can ssh between the two but works quite well.
PERFECT!!!! Thanks Ixian
 
Joined
Jun 24, 2017
Messages
338
any idea why it would throw a "x509: certificate signed by unknown authority" error when testing credentials? (its a cert created with ACME in PfSense). and, is there a way to bypass the error? (both machines are me, so... i sort of trust myself... most of the time)
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
Good question. I'm certain there's a way to bypass certificate checking in this chain, whether its exposed via the GUI is another matter. Doesn't look like it but I'll dig around.
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
In the meantime you should check out the Certificates section under credentials; SCALE makes it very simple to get free Letsencrypt certs going. There's a walkthrough in the docs: https://www.truenas.com/docs/scale/credentials/certificatesscale/

Since those are valid certs you won't have the issue you have now with your self-signed cert.
 
Joined
Jun 24, 2017
Messages
338
In the meantime you should check out the Certificates section under credentials; SCALE makes it very simple to get free Letsencrypt certs going. There's a walkthrough in the docs: https://www.truenas.com/docs/scale/credentials/certificatesscale/

Since those are valid certs you won't have the issue you have now with your self-signed cert.
So, used TrueNAS to create the certs.. and now ive got:

Error: <3>ERROR : : error listing: couldn't list files: 405 Method Not Allowed Failed to lsjson with 2 errors: last error was: error in ListJSON: couldn't list files: 405 Method Not Allowed


Note:
You need to add a trailing "/remote.php/dav/files/USERNAME/" to the url in your credentials.
 
Last edited:
Top