Add a buddy backup system (Simular to HexOS) to TrueNAS

Buddy Backup (Simular to HexOS) in TrueNAS

Problem/Justification
In order to keep your data safe it is recommended to keep one copy off site (or in a different location). However it is currently difficult to setup in TrueNAS. Thats where the “buddy backup” feature comes in, you can ask one of your friends to give access to their TrueNAS server and have your files backup in a seperated sector that way encase anything happens to your server you can still access your important files. Both NAS servers act as backup targets for each other, ensuring that data from Device A is stored on Device B and vice versa. Additionally to ensure that your data is secure, the data sent to the friend needs to be encrypted.

To be able to easily setup buddy backup you can make people enter the local IP address of the friends server and you then get a private long hash key where you can paste it in to the friend server and vise versa.

Impact

Advantages
  1. Protection from Natural Disasters: If the data is stored in a different location from where you are and you suffer some disasters like fires, floods, theft, or hardware failures you data will still be safe as it is also stored in a different location away from that disaster where harm would not be able to reach it.

  2. Cost-Effective: Without a buddy backup system you need to use a cloud storage provide (like Google Drive or OneDrive) where you have to pay a monthly fee in order to use and where the storage options are limited. However with a buddy backup system you can avoid recurring cloud storage fees by using TrueNAS server in your friends house to backup your data instead of a proprietary cloud service provider.

  3. Private: The data will only be stored in your friends server and encrypted and out of the hands of giant corperations where you can’t trust that they will keep your data safe and secure and out of the reach of third-party services.

  4. Scalability: You can easily scale how much of your data gets backup depending on their storage configuration, if they dont use the full storage capasity you can increase your backup pool if they use more of their server you can then decrease your backup pool.

Disadvantages
  1. Network Dependency: If your friend’s internet goes down, you are no longer able to access your data. Additionally the buddy backup system depend on a stable internet connection for both parties (not just your internet, but your friend’s internet as well) as slow or unreliable connections can slow down your access to the data.

  2. Higher Initial Cost: Having a buddy backup system requires an investment in a second NAS server and storage drives, which can be expensive upfront. Your friend may not be able or willing to take up the cost.

  3. Depends on your Friend or a Second NAS server: The entire buddy backup system is based on having a secondary NAS server, not everyone has a second NAS system laying arround and is able to use the buddy backup system, for those people the entire buddy backup system would be useless for them.

  4. Complexity in Setup: Setting up buddy backup requires technical knowledge on both sides to configure backup jobs, network access, and encryption properly. Unless this is simplified (like in hexOS) it would be very complicated and could scare away new users.

User Impact
  1. Flexibility for Home Users: Home users with multiple NAS devices (e.g., one at home and another at a relative’s house) can back up critical personal data with minimal effort.

  2. Cost Savings for Enterprises: Organizations with multiple locations can implement buddy backups between branch offices, avoiding the recurring costs of cloud backup solutions.

  3. Increased Adoption Among Small Businesses: A robust buddy backup feature makes TrueNAS more appealing to small businesses looking for cost-effective and reliable backup solutions.

  4. Competitive Advantage: If TrueNAS implements buddy backup in a user-friendly way, it could attract new users from competing platforms that lack such capabilities.

It sounds like the Syncthing app addresses this need perfectly–and without the need to share IP addresses (which may change). Is there a reason it doesn’t meet your needs?

You really need a Docker compose file which contains a simple point to point VPN, a dynamic DNS client (if either end doesn’t have a fixed IP address) and a simple sync app of some sort.

For each buddy, you would then each create a hash and configure the list of your own directories to store remotely and the local dataset to store the buddy data in, and share your own DNS and hash with the buddy.

You would probably want to set some sort of quota on the buddy dataset too, and possibly some bandwidth controls (possibly time based) to avoid this from saturating an internet connection at one end or the other.

I suspect that ZFS replication would be the most efficient and broadly applicable sync protocol, but I also suspect that it might be too complex to set up.

Syncthing would be pretty simple to set up, so perhaps that would be the best sync solution.