Skip to content

Backup Your UDM Backup Files to Another Server

knaackville edited this page May 18, 2022 · 6 revisions

You can create a scheduled copy of your UDM[Pro]'s backup files (*.unf) to another server like Unraid with a script.

  1. Create this script on unRAID (can be adopted on any bash shell).
  2. Edit the values in the script as needed, and setup the prerequisites noted in the script.
  3. Make the script executable by running chmod +x ./filename.sh
  4. Set the script to run daily.

This will overcome a bunch of issues, like unRAID not having some of the command-line options (SSHPASS), as well as RSA keys being wiped on reboot of UDM-Pro.


Specific case use for Unraid 6.9+ and 6.10 update

Note: Must be for Unraid 6.9+ as this update set up simlink between /root/.ssh and config/ssh/root on USB flash drive. Also, the newest script linked below "fixes" the RSA issue with 6.10 and above. Unraid 6.9 uses openssh version 8.4p1 while Unraid 6.10 uses openssh version 8.8p1, which does not allow RSA by default. https://www.openssh.com/txt/release-8.7

  1. Download User Scripts Plugin from Community Applications
  2. Create new script from here and edit values in "User adjustable variables" as needed.
  3. SSH into Unraid (can do so from Terminal option in main Dashboard).
  4. Run "ssh-keygen" and hit enter to all default options
  5. SSH into UDM Pro once from Unraid terminal - type "ssh root@UDMIP" with UDMIP being the IP of your UDM.
  6. Copy 15-add-root-ssh-keys.sh to /mnt/data/on_boot.d on UDM and make executable by running "chmod +x /mnt/data/on_boot.d/15-add-root-ssh-keys.sh"
  7. Open public key located at /root/.ssh/id_rsa.pub on Unraid server and copy entire text from file. Paste as MY_SSH_KEY in 15-add-root-ssh-keys.sh on UDM.
  8. Run "/mnt/data/on_boot.d/15-add-root-ssh-keys.sh" or restart UDM.
  9. Run script on Unraid created in step 2.
  10. Set up daily running of Unraid script (or your preference) in User Scripts plugin.

This eliminates need for storing password on Unraid for UDM and should last between reboots on both UDM and Unraid side.