Backup with rsnapshot to NAS, how to do it?

  • Hi to all,


    I installed the backup plugins in my OMV (The one running off the Raspberry Pi+RTC+USB hard drive), and would like to back up its installation on the other NAS.
    However, I don't see any option to connect to the other NAS and set it as a target for backup.


    How would I do that?


    It may be useful to know that the NAS uses a self-signed certificate.

    • Offizieller Beitrag

    Use the backup plugin to back to a data drive. Create a shared folder in the same location that the backup plugin backs up to. Then rsync that shared folder to a remote shared folder.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • If I get it correctly, this would require:

    • Additional data drive as a target for the backup plugin
    • Create a shared folder redirecting to the new data drive's folder (say, "bckp")
    • rsync "bckp" to a remote shared folder…But the rsync plugin doesn't allow me to select a remote server, only local folders


    Would you mean automatically mounting the remote folder to a local one (for example, with SSHFS) and sending backups to the local folder, rsyncing to the remote one?

    • Offizieller Beitrag

    1 - yes
    2 - No. The folder that the backup plugin backs up to is hard coded to the omvbackup folder on the data drive you select.
    3 - rsync can backup to a remote server if you have an rsync server running on the remote server. Otherwise, you would probably have the best luck with sshfs mounted in remoteshare.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I still don't get it, sorry. Would you provide clear instructions for this configuration panel?

    The origin directory doesn't provide me with the option of backing up / folder


    And as for the remote server destination, what should I enter?


    I already tried to put Syno.local, but it didn't ask for any password or anything. The Add Shared Folder dialog doesn't provide the option of specifying a remote server:


    Should I go to the rsync plugin first, set up the server from here, and use it for Rsnapshot?

    • Offizieller Beitrag

    Your post is very confusing.


    rsync is not the same as rsnapshot. rsnapshot can only sync from one shared folder to another shared folder. It cannot sync to a remote server (unless a shared folder is a locally mounted remote filesystem created with another plugin).


    Neither rsync nor rsnapshot can backup the root (/) folder.


    If you want to be able to sync the backup plugin's backup, create a shared folder on the same data drive that you selected in backup plugin. Use /omvbackup for the path of that shared folder. Then create an rsyncd module on the remote server. Create an rsync job on local server that syncs the newly create omvbackup shared folder to the remote server's rsyncd module.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I'll try to make it clearer with the devices' names:



    Neither rsync nor rsnapshot can backup the root (/) folder.

    That's annoying. How would I create a working clone of the root tree ready to restore if anything goes wrong? I thought there would be a Time Machine-style backup method available for OMV, especially considering the trouble I have getting CUPS to work properly (as per recommendations, I do have a RTC and USB hard drive running the installation on this RPi).


    Zitat

    If you want to be able to sync the backup plugin's backup, create a shared folder on the same data drive (meaning: USB drive hosting OMV) that you selected in backup plugin. Use /omvbackup for the path of that shared folder (so as to be able to tell it apart from the working shared folder). Then create an rsyncd module on the remote server (Synology provides a tutorial for that. I have rsync_bckp created on the Synology NAS, with its own r_user and password, and read-write permissions to this folder, and denied permissions from the other shared folders. I intend to use this r_user for all devices requiring rsync backups). Create an rsync job on local server (OMV) that syncs the newly created /omvbackup shared folder to the remote server's rsyncd module.


    You mean the backup is done in two steps?
    1- from the working local shared folder to another local shared folder with rsnapshot; 2- from the local (non-working) shared folder to the server using rsync?


    From my understanding, this would require twice the disk space just to host the copy of the working shared folder, this I don't currently have.


    As a test, I have done a manual rsync done according to Synology's tutorial that appears to work:
    Command was:

    Code
    # rsync -av /media/55160f00-ef96/Webdav/ rsync_user@Synology.local::rsync_bckp/omvbackup/Webdav/
    Password:


    But the matching task created in OMV's GUI does not:


    Error is:

    Zitat

    @ERROR: auth failed on module rsync_bckp
    rsync error: error starting client-server protocol (code 5) at main.c(1534) [sender=3.0.9]
    av/> ...


    What does it mean?



    I thought the rsync protocol had the capability of doing daily copies to a remote server without requiring a second local copy, and the rsync plugin seems to have this capability. Is the two-step process recommended for safety reasons, so as not to mix files open for writing with what will be sent to the remote server?

    • Offizieller Beitrag

    We are having too many misunderstandings and this is making my head hurt...


    OMV has never allowed anything to be done with the OS drive. That will not change. If you don't have space for a second backup, I can't help. You will have to write a script to do it then.


    What I was proposing only copies the OS drive (not the data drives) to a data drive. This should not be large and I would hope you have space for it. You then create a shared folder in the same location that the backup plugin copies the OS files to. This does not duplicate data. It just allows you to access the OS backup. Then you sync that folder to another server.


    If you want to sync your data (not OS files) to another server, that data already has shared folders and you can sync it in a separate sync.


    So, the only thing that has an extra copy is the OS files which should be less than 2gb on most systems.


    I really hope that makes sense because I can't explain it any better.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Indeed I mixed things up, that's why it got confusing. My bad.


    1- Use the Backup plugin to create a backup of data


    2- set omvbackup/ as a shared folder


    3- rsync this shared folder to the rsync server


    But I still get the same error as I try to execute the task:

    Code
    @ERROR: auth failed on module rsync_bckp
    rsync error: error starting client-server protocol (code 5) at main.c(1534) [sender=3.0.9]
    ...


    What is the source of that issue? I can manually rsync, but not automatically?

  • @Cubytus Could you please post the complete config window of your rsync job, including all the options (if you switch to english this might be helpfull as well).


    It looks like the NAS is not accepting your credentials. How are you authenticating against the NAS?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Sure, this is the config:


    Indeed I got things mixed up. I had to use Backup plugin first, clone data folder from here, then create a rsync job with rsync plugin to sync to the other NAS. I forgot that, and that's why it got confusing, sorry for that.


    Why would this config fail compared to the manual command issued?


    With the manual command, authentication is asked directly on the command line, and under the large dots in the config window is the exact same password I am typing in the command line.

Jetzt mitmachen!

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