SOLVED Truenas backup to dedicated server

jamiec1

Dabbler
Joined
Jan 28, 2021
Messages
11
I have TrueNas working nicely but It is about time I got an offsite backup.

I have recently taken a dedicated server with a provider and thought, instead of paying for Backblaze B2 etc. I could use some of the resources of my own cloud server for the backup.

The cloud box will have Ubuntu Server 20.04 LTS installed. I have root.

Has anyone got any nice guide / video on getting this setup?
What I would have to install and configure on the cloud box, if any ?

I assume it would be over rsync ?
What's your ideas on the best method for this?

Thanks
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Install your remote server with ZFS. Use snapshot and replication tasks. Win :wink:
 

jamiec1

Dabbler
Joined
Jan 28, 2021
Messages
11
Hey thanks for that.

I have watched a video on this but i wasn't planning on putting TrueNas on the cloud server.
Everything I have seen seems to have TrueNas setup on the source and destination.

Is there any other ways?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
A FreeBSD or Linux system with password-less SSH access should be enough for a "push" configuration. OpenZFS 2.0, of course. I'd try FreeBSD 13 first for minimum effort.
 

jamiec1

Dabbler
Joined
Jan 28, 2021
Messages
11
Thanks. I want to push from my TrueNas at home to the cloud server that is running Ubuntu 20.04. If I install ZFS to the cloud box, could that work?
This could then use ZFS replication ?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If I install ZFS to the cloud box, could that work?
That's the idea. It must be OpenZFS 2.0 or newer. I suggested FreeBSD 13, because it has got that builtin.
 

jamiec1

Dabbler
Joined
Jan 28, 2021
Messages
11
Do you know of any guides for this

Most I have seen are TrueNas to TrueNas
My destination server will be doing other things, hence why I didn't just install TrueNas natively

What else to install /config to the cloud box apart from OpenZFS 2, to receive the data?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
  • Create a ZFS pool, of course
  • Create SSH key pair and place the private key into the root account on TrueNAS
  • Place the public key into the authorized_keys file for root on Ubuntu
  • Test from the TrueNAS if you can logon to the Ubuntu without a password - PermitRootLogin prohibit-password is the Ubuntu default, so that should do. And you are still safe from bots brute-forcing passwords for "root".
  • Create an SSH connection in the TrueNAS UI
  • Create a snapshot task in the TrueNAS UI
  • Create a replication task in the TrueNAS UI
 

jamiec1

Dabbler
Joined
Jan 28, 2021
Messages
11
I am making progress!

I have set the snapshot and replication task but am getting an error as follows

Error:
Encryption requested for destination dataset 'backupcloud', but it already exists and is not encrypted.

Logs:
[2021/06/18 00:00:00] INFO [Thread-5] [zettarepl.paramiko.replication_task__task_1] Connected (version 2.0, client OpenSSH_8.2p1)
[2021/06/18 00:00:00] INFO [Thread-5] [zettarepl.paramiko.replication_task__task_1] Authentication (publickey) successful!
[2021/06/18 00:00:01] ERROR [replication_task__task_1] [zettarepl.replication.run] For task 'task_1' non-recoverable replication error ReplicationError("Encryption requested for destination dataset 'backupcloud', but it already exists and is not encrypted.")


Is this because I originally had not enabled encryption on my Pool and have set it to encrypt the data in the replication settings ?

1624008281276.png


Also, should I enable Stream Compression to Lz4 like the source pool (highlighted in yellow) ?

Thanks in advance
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Sorry, I don't use encrypted datasets. Could you just create one without encryption and try to replicate that to prove it works fundamentally?
Someone else will have to step up for your encryption issues.
 

jamiec1

Dabbler
Joined
Jan 28, 2021
Messages
11
Yeah, I was thinking the same, just do a test.
From checking online, if you hadn't originally enabled encryption, you can't change later (easily).
So i'll just leave as is!
 
Top