Jump to content
Sign in to follow this  
stormense

rsync to Synology NAS

5 posts in this topic Last Reply

Recommended Posts

I search for it but only find people how talk about the rsync plugin. Here some easy step in command line:

 

First I mounted my Synology rsync share to Unraid (NFS or SMB don't matter)

 

Here the Synology NFS premissions settings:

BqdONlP.png

 

And here the Unraid mounting settings (/mnt/disks/ip to Synology_NetBackup:
xnUT0so.png

Then the command window in Unraid an wrote: rsync OPTIONS (-av) SOURCE (my Unraid Shared folder to sync) DESTINATION (my shared rsync folder on Synology + the name of the shared folder at the end)

rsync -av /mnt/user/UBU/my_WWW/ /mnt/disks/192.168.0.50_NetBackup/my_WWW/

Done!

 

But how can a make a crone job (newer done a crone job) to do it with multiple shared maps an on every night?

I can do this but I don't now where to put the file och what else...

# * 1 * * * rsync -av /mnt/user/UBU/MapInShare/ /mnt/disks/192.168.0.50_NetBackup/MapOnSynology/

# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday;
# │ │ │ │ │                                       7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# * * * * *

# Run dayly cron jobs at 0:30:
30 0 * * 0 rsync -av /mnt/user/UBU/s-Dokument/ /mnt/disks/192.168.0.50_NetBackup/s-Dokument/
#
# Run dayly cron jobs at 1:00:
* 1 * * * rsync -av /mnt/user/UBU/my_WWW/ /mnt/disks/192.168.0.50_NetBackup/my_WWW/
#
# Run dayly  cron jobs at 1:30:
30 1 * * * rsync -av /mnt/user/UBU/Android_OnePlus/ /mnt/disks/192.168.0.50_NetBackup/Android_OnePlus/
#
# Run dayly cron jobs at 2:00:
* 2 * * * rsync -av /mnt/user/UBU/s-Andra_Dokument/ /mnt/disks/192.168.0.50_NetBackup/s-Andra_Dokument/
#
# Run dayly cron jobs at 2:30:
30 2 * * * rsync -av /mnt/user/UBU/s-photo/ /mnt/disks/192.168.0.50_NetBackup/s-photo/
#
# Run dayly cron jobs at 3:00:
* 3 * * *  rsync -av /mnt/user/UBU/video/ /mnt/disks/192.168.0.50_NetBackup/video/
#
# Run dayly cron jobs at 3:30:
30 3 * * * rsync -av /mnt/user/UBU/TV-Share/ /mnt/disks/192.168.0.50_NetBackup/TV-Share/
#
# Run dayly cron jobs at 4:00:
0 4 * * * rsync -av /mnt/user/UBU/Annso/ /mnt/disks/192.168.0.50_NetBackup/Annso/

Then I got a tips from #Squid to do it with a plugin called Userscript. Here what I do:

 

 

 

Yes, it work an no need to read the rest below

Thank you chode_1.thumb.jpg.6a1751a27373b9a6062a06!!!

Edited by stormense
solved the problem

Share this post


Link to post

Done some test with two test folders and no luck. Make the file with Nano in: /boot/config/plugins/cronjobs and call it backup.cron and then wrote update_cron in terminal.

55 * * * * * rsync -av /mnt/user/UBU/test_bakup_2/ /mnt/disks/192.168.0.50_NetBackup/test_bakup_2/ /dev/null
58 * * * * * rsync -av /mnt/user/UBU/test_bakup_1/ /mnt/disks/192.168.0.50_NetBackup/test_bakup_1/ /dev/null

4 our from scratch and no succés. I think I do it from Windows because I cant find a simple guide to do this for a beginner. 

Edited by stormense

Share this post


Link to post
27 minutes ago, stormense said:

55 * * * * *

There's only 5 entries in cron.  You've got 6

28 minutes ago, stormense said:

rsync

You may have to give it the full path to rsync

/usr/bin/rsync

 

29 minutes ago, stormense said:

/boot/config/plugins/cronjobs and call it backup.cron

That hasn't worked for quite a while.  You would need to put the .cron into the dynamix folder and then call update_cron  (or use the user scripts plugin)

Share this post


Link to post

Ok @Squid: move the crone job to dynamix folder and fix the syntax. But I can't run my test job in terminal and its fine but not with crone.

55 * * * * rsync -a /mnt/user/UBU/test_bakup_2/ /mnt/disks/192.168.0.50_NetBackup/test_bakup_2/
57 * * * * rsync -a /mnt/user/UBU/test_bakup_1/ /mnt/disks/192.168.0.50_NetBackup/test_bakup_1/

(Yes I try with: /usr/bin/rsync -a)

Edited by stormense

Share this post


Link to post

I fix it with the plugin User Scripts (A plugin to act as a simple front end for any user scripts to allow you to run them without entering the command line)

I gonna update my first post.

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this