Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Backup unraid to another unraid server

Featured Replies

I guess this has been answered before, but I could not find the answer Im after :(

 

As far as I know, the best way to to backup an unraid server to another on the same LAN is rsync and setting up a cron job.

I know not much about rsync, and I know even less about cron :(

 

Does it exsict any plugins for unraid that kinda gives an gui on how to setup this, or is it more easy than I think it is from the terminal?

  • Community Expert

If the target server doesn't have password for root it's easy to setup a scheduled rsync using for example the user scripts plugin, if it has you need to look on how to create a ssh key for passwordless rsync.

  • 2 weeks later...
  • Author

what if I mount the share from server2 on server1 over NFS?

  • Community Expert

I never used NFS but that should work.

On 1/16/2018 at 8:53 AM, isvein said:

As far as I know, the best way to to backup an unraid server to another on the same LAN is rsync and setting up a cron job.

I know not much about rsync, and I know even less about cron :(

 

I recently went through this process and now have my server-to-server backup automated through rsync and a script managed by the User Scripts plugin set to run a weekly cron job.

 

Below is the guide I used.  I modified tr0910's script for my purposes and used the ssh setup suggested by ken-ji.

 

For now, both servers are on the same LAN but this will work over a WAN as well when I move the backup server offsite:

 

 

  • Author

Thanks :) I checked out the rsync syntax and it was more easy than I thougt so now it seems to work, I skipped the ssh part as I have the servers on the same lan and the backup folders on the target is mapped to the source with NFS.

 

But the scheduler of cron is confusing, if I choose weekly, weekly from when?

29 minutes ago, isvein said:

But the scheduler of cron is confusing, if I choose weekly, weekly from when?

 

My backup server is not always running, so mounting NFS shares is not the best option for me.  In fact, it only powers on via IPMI when the script runs.  After the backup, the script turns it off via IPMI.

 

My cron job through User Scripts plugin (I run the backup automatically with a script) is set to 0 1 * * 1 which is 1:00am every Monday.  You can find a good explanation and crontab generator at http://corntab.com/

 

The five positions in crontab are minutes, hours, day of month, month, day of week.  So my crontab is 0 minutes, after hour 1 (24-hour clock), * day of month not specified, * month not specified, on Monday (day 1).

Edited by Hoopster

  • Author

That make sense :)
Mine is on all the time.

I aslo guess it should be possible to make 2 versions of the same backup script, say the first one running each week and the other one each 90days and that one has the --delete flag on.

Would that make it so it takes backup each week and every 90 days it takes backup and delete off the files that has been deleted from the srource?

10 minutes ago, isvein said:

That make sense :)
Mine is on all the time.

I aslo guess it should be possible to make 2 versions of the same backup script, say the first one running each week and the other one each 90days and that one has the --delete flag on.

Would that make it so it takes backup each week and every 90 days it takes backup and delete off the files that has been deleted from the srource?

 

Yes, that should work. 

 

For now, I am not deleting anything on the backup server as I know that I can find a deleted file there if needed.  Eventually, I will be doing what you are doing as the backup server fills up. I also keep it off until the backup runs in case my main server gets hit with ransomware or some virus the corrupts files. Not having the backup on prevents anything on the network from affecting its contents.  Hopefully, I would catch file corruption or other issues before 1am on Monday or the corruption would be propagated to the backup as well. :)

  • Author

Hmmm, looks like the script wont run by itself, getting this message in systemlog:

Jan 27 12:19:11 oneroom crond[1620]: failed parsing crontab for user root: SAT /usr/local/emhttp/plugins/user.scripts/startCustom.php /boot/config/plugins/user.scripts/scripts/BackupMedia/script > /dev/null 2>&1

 

8 hours ago, isvein said:

Hmmm, looks like the script wont run by itself, getting this message in systemlog:


Jan 27 12:19:11 oneroom crond[1620]: failed parsing crontab for user root: SAT /usr/local/emhttp/plugins/user.scripts/startCustom.php /boot/config/plugins/user.scripts/scripts/BackupMedia/script > /dev/null 2>&1

 

 

How are you running the cron job and how is it formatted?  There should be a space between each element.  If not, it will not parse correctly,  My crontab for running backup every Monday at 1:00am is 0{space}1{space}*{space}*{space}1.  If entered as 01**1 it wont work. This is a common mistake.  Not saying that is your issue, but, it is worth checking.

  • Author

It is setup from Settings-->UserScripts and it is a space between them all.

Gona try to ask about this in the thread for the customScript plugin.

Edited by isvein

It is setup from Settings-->UserScripts and it is a space between them all.
Gona try to ask about this in the thread for the customScript plugin.
What is the SAT that's in there?
  • Author
22 minutes ago, Squid said:
59 minutes ago, isvein said:
It is setup from Settings-->UserScripts and it is a space between them all.
Gona try to ask about this in the thread for the customScript plugin.

What is the SAT that's in there?

aaaa that was the problem :D

Thanks, changed it from SAT(saturday) to 6 and now it seems to work just fine :)

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.