Unraid NAS - auto backup share to external USB

Soldato
Joined
16 Jul 2004
Posts
4,461
Location
Home
As title, how do I do this?
I currently am running rsync which I manually types in to move a photo folder from the array to the external USB drive (it's taking a long time...).

But anyway, I used to use Synology which when you plugged in the drive and hit backup, it would run a process to backup the share which was speedy as only updated the backup drive with files that had changed.

I have read from the unraid forums that using a script in unassigned devices would do this, but in all honesty I am bamboozled by the task.
There is a sample script on the Unraid forum
but my questions begin with:

Where do I create and save the script?
What parts of the script do I need to edit?
How do I tell unassigned devices plugin to run the script?

Does anyone have an idiot proof starter guide on doing this?
 
Thanks guys - I think I'm just not totally clear on script creation and execution and there's lots of parts of that sample script that I don't understand, like all references to $ terms, am I meant to fill in the details that are unique to my setup?
What is the first line even about ?!
#!/bin/bash
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

so many bins

I assume I would create the script in nano and save it as a sh file? Would I need to make it executable or not?

Sorry - I have done some scripting before but this just scares me more for some reason, as much as I want to give it a go!


Granted I don't NEED to use this script - as I said, I have used the rsync command in a terminal window in the unraid webgui to test backing up a single folder successfully.

But, from my experience with other Linux commands via SSH, they have terminated when the ssh connection closes. Therefore I feel like if I ran rsync from a terminal window, I would need to leave the window open until the command completes, which would be HOURS for the first backup... Or am I wrong with this?
 
Back
Top Bottom