Can't seem to get rsync to work...

  • Using the Web gui I can't seem to get rsync to work.

    I am trying to backup my openmediavault box to another nas.

    I keep getting an error no matter what I try.

    Rsync error: permission denied, please try again.

    Trying private key: /root/.ssh/id_rsa
    Next authentication method: password
    Read_passphrase: can't open /dev/tty: no such device or address.
    Authentication that can continue: publickey,password
    Permission denied, please try again
    Read_passphrase: can't open /dev/tty: no such device or address
    Permission denied (publickey,password).

    Unexplained error code 255.

    I am using username/password to authenticate.

    I have manually ssh to the remote nas from openmediavault and vise versa to get keys in the known host files.

    Seems as though rsync does not like username and pass for authentication and wants to try publickey.

  • Rsycn, in the GUI, is setup to sync shared folders. If you want to Rsync a local shared folder to a remote shared folder, the easiest way is to use the "Remote Mount" plugin.

    To use Remote Mount, you'll need a user name and password with write access to the remote share.
    (If this is successful, you'll see the remote share in Storage, File systems.)

    Then set up a local "shared folder", that uses the remotely mounted share as the "device". The path is "/" only. (This requires changing the default.)

    Finally, you'll set up a Local rsync job with a source (local shared folder) and destination (the remotely mounted shared folder). Don't get this wrong. For safety, it might be best leave the Delete option off until two full copies are confirmed.

  • That seems odd... considering you can use command line to backup from one server to another with rsync.

    IE: rsync -avr / rsync://

    I ran that manually and I was able to determine that the rsync daemon was not running on the remote Linux machine. I had to manually create the etc/rsyncd.conf file, the /etc/rsyncd.secrets and enable the rsync from false to true. I then tried the same command above and I am now getting..

    @ERROR: unknown module 'shares'

  • What I described works and it doesn't require an Rsync server on the remote machine.

    That seems odd... considering you can use command line to backup from one server to another with rsync.

    Of course this is correct. There are many methods for doing the exact same thing, on the command line. But the entire point behind OMV is to use the GUI where possible.

    If you're interested in a command line approach, I'd suggest Googling "Rsync", "Debian 9", "copy drive to remote host" (or server) and see what turns up.

  • I had my alias set wrong in my remote server, fixed that and now manually initiating the command is working fine.

    So I just want to be clear, the gui does not support rsync remote push or pull? Why is it an option in the module? Confusing why it wouldn't support local share to remote rsync when this is the basic and most utilized feature with rsync.

    If the gui does not support it I can just add my rsync commands to a cronjob.

    I would prefer to use rsync gui since I use rsync on a few other machines.

  • So I just want to be clear, the gui does not support rsync remote push or pull?

    Yes, the GUI supports push or pull. If using remote mount (which is essentially what you're doing on the command line); "push or pull" is just a matter of switching the source and destination in the GUI. In fact, the GUI will work with a remote Rsync server as well. (Again, there are lots of ways to do the same thing.)

    Also, instead of creating a cron job, any command line can be executed in the GUI using a Scheduled Job (the GUI's implementation of cron). After it's saved, it can be run on a schedule or manually.

  • Yeah, I saw that post. I made the assumption that I could just use the rsync Web gui to schedule rsync jobs remotely... Never had any luck. I kept fighting it thinking it was something I was doing. Come to find out it was the plug in not supporting remote rsync.

    I then decided to try using standard rsync commands and after a few minutes I was able to get rsync working properly.

    Using the gui and scheduled tasks (which is basically a gui to cron jobs). I input my rsync commands and off I went.

    In reality the rsync plug-in is kind of a waste without the remote rsync feature. Much quicker and easier to just input a line of rsync code into the scheduled task gui and let rsync do its thing.

  • My apology.

    I am trying to pull from folders on computers on my home network to my OMV server using rsync.

    My understanding is I can somehow:

    1 - In OMV, define a folder on one of my local computers as a some kind of share / access point
    2 - Tell the rsync plugin to read from that share point and copy to a share on the OMV server

    I may be wrong in this but I'm a little stumped

  • I am trying to pull from folders on computers on my home network to my OMV server using rsync.

    It's doable. Are you in a hurry?

    I can provide a short guide on how to do it, but it would be better if I'm home where my servers (and test VM's) are. I'm away right now and wouldn't want to try to write something from memory alone. In a few days, maybe Sunday or Monday?

  • That would be amazing. I can wait. I keep seeing questions on how, but there's no clear step by steps. For example, if I need to install anything on say my ubuntu desktop machine, what is that I need to install? Should I be using The OMV Plugin "Remote Mount" (been researching)? If so, how the hell do I set that up as I'm failing miserably at that too. It's a minefield for those of us less savvy. Anything step by step and logical would be really appreciated.

  • For example, if I need to install anything on say my ubuntu desktop machine, what is that I need to install

    Well, I was thinking your desktop was a windows machine. In order for what I had in mind to work and to keep it in the GUI, look into what it takes to get a Unbuntu desktop to put an SMB share on your network. With windows, that's simple, and the first requirement for doing this the easy way (in the GUI).

  • I mostly use rsync on the command line like this:

    rsync -a source destination

    That does a lot of the magic. There are other syntax for syncing and deleting or creating hardlinked snapshots and other stuff. I do all my backups between OMV servers using rsync snapshots from bash scripts, run automatically every day.

    source and destination are either paths to locally mounted filesystems or remote paths using SSH.

    There are a HUGE amount of tutorials on rsync on the internet. Very easy to find.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • Rsync in omv doesn’t work with pam login (Unix passwords), the password you set up there is in case the remote destination has a password protected rsync module. With password is super easy if both machines are omv, any other case setting a rsync server module not may do it. The other option is using ssh pub key. The key cannot be password encrypted. Last time I checked I think I left it clear in the docs. If not clear enough let me know so we can make some adjustments.

  • This process assumes that the user is pulling from a LAN client network share. (**Using the same process users can pull for an OMV network share, to an OMV backup server.**)

    In the following, a KUbuntu18 client was used.

    - First, You'll need to install Remote Mount, from OMVExtras, for the server side.
    - Second, you'll need a user and password for the "remote" workstation (or server).
    Configured at the remote workstation, this user will need at least "read" access to the network share. In the example below, a user was created named backup-1
    (*Note that you can't create a user with the same name as an existing system user. This is why the user name backup can't be used.*)

    (double click to expand)

    In this case, the Ubuntu client's Documents folder was shared using Samba and backup-1 is given read access.



    On the server side, under Storage, configure Remote Mount:
    (Unless users know that their Router supports local DNS and can resolve the clients name, use the client's IP address.)

    Name. Give the mount a name that will indicate the remote source and what the remote share is.
    Server: The remote clients IP address
    Share: The name of the share on the client (and how it appears on the network to other clients).
    Username: Your backup user. (This could be the username and logon password for the client, but there's a bit of risk in using them.)
    Password: The password of this user.


    Save it.
    (Note** An error may pop up here. This is because remote mount will look for write access. The backup-1 user has only "read" which is all that is needed. The save did take place so don't hit "cancel". Ignore the error and close dialog boxes with the "X" in the upper right hand corner.**)

    Go to Storage, File Systems. If your remote mount is successful, you'll see it as a mounted file system with the same name from above.


    Now that the remote share appears to be a local file system, we'll need to set up two shared folders. One will be truly local and, while Remote Mount makes the remote share appear to be a local device, the other share will be remote.

    The Local Shared Folder:
    Name: Give it a name so you'll know it's the local destination for a remote share. ("L" is a good designator and/or maybe put "Local" in comments.)
    Device: Select a local drive.
    Path: accept the default

    In the same place, create a new Share for the remote share.
    Name: Name it so that you know this is the remote side of the pair of shared folders
    Device: In the drop down, you'll select the new file system Remote Mount created in Storage, File Systems.
    Path: **Important** The default must be changed to a single slash. /


    Both shared Folders, as they may appear.


    Now, under Services, Rsync, configure an Rsync Job

    Note the Type field is LOCAL.
    The source is the remote share
    The destination is the local share.
    Schedule the time interval for replication.


    (*I couldn't get get the full configuration of this Rsync job in one capture. You'll need to scroll down to see the following screen.*)
    The following are suggested settings. Adjust for your case.
    Note the extra options: When files are pulled from a foreign volume, in the destination folder permissions will be set to root:root. These options can be used to reset incoming files so, if it works for your use case, you can reshare this data to the network from the server.


    Test the job. Hit the Run button and Start. If it's working a file list scrolls by. Depending on the amount of data in the remote share, the first run may take awhile


    If I made a mistake or clarification is needed, please reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!