Backup everything from Synology to OMV using pull

  • Hi everyone, this is my first OMV server, so be prepared for some major stupidity on my part.


    I want to backup everything from a Synology NAS (S) to an OMV (O) server. O will not be online all the time, so I want to configure O to use PULL from S. Because of that, the many tutorials online which deal with S and Hyperbackup (or similar) do not apply. Here's what I have done:


    - activate rsync on S

    - activate rsync user on S

    - activate ssh on S

    - verify ssh works (conect from O to S with user and password)


    - activate rsync server on O

    - create rsync job on O (remote, pull, rsync://synologyUsername@synologyIP/volume1/synData)


    I am not sure if the path (/volume1/synData) is correct, but that is what I get when I ssh into S and look for my data. I tried to vary that source parameter a bit (/*, :volume1/synData, ...), however I either don't get a conection or the sync finishes in less than a second with no files transferred. For example:


    with no path, no files transferred:

    Code
    2022/05/07 16:17:03 [15252] NetBackup           System default shared folder
    2022/05/07 16:17:03 [15252] synData             4TB Raid5
    2022/05/07 16:17:03 [15252] synScratch
    2022/05/07 16:17:03 [15252] home                ~
    2022/05/07 16:17:41 [15330] NetBackup           System default shared folder
    2022/05/07 16:17:41 [15330] synData             4TB Raid5
    2022/05/07 16:17:41 [15330] synScratch
    2022/05/07 16:17:41 [15330] home                ~


    volume1 seems to be unrecognized if I use it in the path:

    Code
    2022/05/07 16:19:42 [17058] @ERROR: Unknown module 'volume1'
    2022/05/07 16:19:42 [17058] rsync error: error starting client-server protocol (code 5) at main.c(1675) [Receiver=3.1.3]


    : and / don't seem to mix:

    Code
    2022/05/07 16:20:32 [18675] ERROR: The remote path must start with a module name not a /
    2022/05/07 16:20:32 [18675] rsync error: error starting client-server protocol (code 5) at main.c(1675) [Receiver=3.1.3]


    "no such file or directory" is also a popular message:

    Code
    2022/05/07 16:21:57 [21894] building file list
    2022/05/07 16:21:57 [21894] rsync: change_dir "/broozar@192.168.178.2/volume1" failed: No such file or directory (2)
    2022/05/07 16:21:57 [21894] sent 20 bytes  received 12 bytes  64.00 bytes/sec
    2022/05/07 16:21:57 [21894] total size is 0  speedup is 0.00
    2022/05/07 16:21:57 [21894] rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]


    Questions:

    - Can this work? Can O pull from S, or do I have this whole thing conceptually wrong?

    - Do I need to prepare O and/or S in another way?

    - What's the proper source parameter?


    Best regards, Felix

    • Offizieller Beitrag

    If both hosts are on the same network, take a look at -> this. The title is about Remote Mount, but there's instructions for setting up a full backup server. It's based on OMV5 but the same method can be used on OMV6. It uses network shares and remote mount so SSH and an Rsync server are not required.
    _________________________________________

    There are other ways to do the same thing. If you still want to use SSH and an Rsync server, there are posts on the forum that will support that effort.

  • Thank you very much for the quick reply, this helped a lot - but I am not quite there yet.


    I installed the extras, then the remotemount and rsnapshot plugins. I did get the error messages that were described in the tutorial, but everything seemed to be fine after a reboot. I can see the share, mount it, and create rsync/rsnapshot jobs.


    Unfortunately, the backups are all empty. The jobs finish immediately and the logs are clean:

    Code
    root@backup2u:~# cat /var/log/rsync.log
    2022/05/07 20:00:01 [3514] building file list
    2022/05/07 20:00:02 [3514] .d..tp.g... ./
    2022/05/07 20:00:02 [3514] sent 58 bytes  received 19 bytes  51.33 bytes/sec
    2022/05/07 20:00:02 [3514] total size is 0  speedup is 0.00
    2022/05/07 20:02:28 [3826] building file list
    2022/05/07 20:02:28 [3826] sent 51 bytes  received 12 bytes  126.00 bytes/sec
    2022/05/07 20:02:28 [3826] total size is 0  speedup is 0.00

    and

    Code
    root@backup2u:~# cat /var/log/rsnapshot.log
    [2022-05-07T20:11:30] /usr/bin/rsnapshot -c /var/lib/openmediavault/rsnapshot.d/rsnapshot-28cee9a7-48e8-4cfd-a0fb-9ceff3ce5be0.conf daily: started
    [2022-05-07T20:11:30] /usr/bin/rsnapshot -c /var/lib/openmediavault/rsnapshot.d/rsnapshot-28cee9a7-48e8-4cfd-a0fb-9ceff3ce5be0.conf daily: completed successfully


    I will continue looking into this tomorrow, I just thought that someone might have a suggestion in the meantime.

    • Offizieller Beitrag

    rsnapshot is not involved, in backing up a network share. rsnapshot is another animal.

    The remotemount tutorial is for backing up network shares to another server, potentially creating a backup server if all shares are replicated. If the tutorial is followed as written, there's no need to get on the command line.

  • I found the error. When I assigned the mount point to a shared folder, i put a folder name instead of a just a /, which means I created a folder on the remote synology NAS (which was of course empty) and then synced that empty folder instead of the whole share.


    I am still in the process of backing up a few TB, so it will take some time, but it looks like it's all going to work. Thanks again for your help. Instead of using rsync as described in the tutorial, I prefer rsnapshot so that I have the option to roll back a few days/weeks in case I did something stupid.


    I did not use the command line for tutorial, I just logged in to get a better look at the logs.

  • broozar

    Hat das Label gelöst hinzugefügt.
  • - activate rsync on S

    - activate rsync user on S

    - activate ssh on S

    - verify ssh works (conect from O to S with user and password)


    I know that you have solved this, but by the way, if you are using the rsync server with rsync users, it does not use ssh.


    You can use rsync over ssh but then it does not use a remote rsync server. But you get ssh encryption, which you don’t get with the rsync server method.

    • Offizieller Beitrag

    I know that you have solved this, but by the way, if you are using the rsync server with rsync users, it does not use ssh.


    You can use rsync over ssh but then it does not use a remote rsync server. But you get ssh encryption, which you don’t get with the rsync server method.

    When following the -> tutorial using Remote Mount, an rsync server, SSH, rsync users, etc., are not required. All rsync jobs are "local".

  • I do have rsync job which backsup synology to OMV - This has been running for more than a year now with no problems,

    Enclosed screenshotas an example


    Make sure the "user" (in the screenshot example "omvuser") you create in synology has READONLY access to synology folders!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!